summaryrefslogtreecommitdiff
path: root/src/soc/intel/xeon_sp/acpi/iiostack.asl
blob: 91a5c6cd4d894ee7725f4356c8664856360b6b4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/* SPDX-License-Identifier: GPL-2.0-only */

#define MAKE_IIO_DEV(id,rt)						\
	Device (PC##id)							\
	{								\
		Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */)	\
		Name (_CID, EisaId ("PNP0A03") /* PCI Bus */)		\
		Name (_UID, 0x##id)					\
		Method (_PRT, 0, NotSerialized)				\
		{							\
			If (PICM)					\
			{						\
				Return (\_SB_.AR##rt)			\
			}						\
			Return (\_SB_.PR##rt)				\
		}							\
		External(\_SB.RT##id)					\
		Method (_CRS, 0, NotSerialized)				\
		{							\
			Return (\_SB.RT##id)				\
		}							\
		Name (SUPP, 0x00)					\
		Name (CTRL, 0x00)					\
		Name (_PXM, 0x00)  /* _PXM: Device Proximity */		\
		Method (_OSC, 4, NotSerialized)				\
		{							\
			CreateDWordField (Arg3, 0x00, CDW1)		\
			If ((Arg0 == ToUUID ("33db4d5b-1ff7-401c-9657-7441c03dd766") /* PCI Host Bridge Device */))  \
			{							\
				CreateDWordField (Arg3, 0x04, CDW2)		\
				If ((Arg2 > 0x02))				\
				{						\
					CreateDWordField (Arg3, 0x08, CDW3)	\
				}						\
				SUPP = CDW2					\
				CTRL = CDW3					\
				If ((AHPE || ((SUPP & 0x16) != 0x16)))		\
				{						\
					CTRL &= 0x1E				\
					Sleep (0x03E8)				\
				}						\
				/* Never allow SHPC (no SHPC controller in system) */ \
				CTRL &= 0x1D					\
				/* Disable Native PCIe AER handling from OS */	\
				CTRL &= 0x17					\
				If ((Arg1 != 1)) /* unknown revision */	\
				{						\
					CDW1 |= 0x08				\
				}						\
				If ((CDW3 != CTRL)) /* capabilities bits were masked */ \
				{						\
					CDW1 |= 0x10				\
				}						\
				CDW3 = CTRL					\
				Return (Arg3)					\
			}							\
			Else							\
			{							\
				/* indicate unrecognized UUID */		\
				CDW1 |= 0x04					\
				DBG0 = 0xEE					\
				Return (Arg3)					\
			}							\
		}								\
	}

MAKE_IIO_DEV(00, 00)
MAKE_IIO_DEV(01, 10)
MAKE_IIO_DEV(02, 20)
MAKE_IIO_DEV(03, 28)

#if (CONFIG_MAX_SOCKET > 1)
MAKE_IIO_DEV(06, 40)
MAKE_IIO_DEV(07, 50)
MAKE_IIO_DEV(08, 60)
MAKE_IIO_DEV(09, 68)
#endif