summaryrefslogtreecommitdiff
path: root/ReferenceCode/AcpiTables/SsdtIRMT/IntelRMT.asl
blob: a37c052994d1f0f46a6f7f581c0b4b1728e143b5 (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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
//
// Defined as an SSDT to be able to dynamically load based on BIOS
// setup options
// 
DefinitionBlock (
  "IntelRMT.aml",
  "SSDT",
  0x01,
  "Intel",
  "IntelRMT",
  0x1000
  )
  

{
External(\ADBG, MethodObj)
External(P8XH, MethodObj) 
External(INSC, IntObj)


  Scope(\_SB)
  { 
    Device (INSD)
    {
        Name (_HID, "INT3398")
        Name (_CID, EISAID("PNP0C02"))
        Name (_UID, 0x00)

        Name (NBT1, 0) // Intel Intelr RMT Technology local variable
        // Intelr RMT Modes
        // 0: Exit Intelr RMT
        // 1: Enter Intelr RMT Active State
        // 2: Enter Intelr RMT Idle State
        // 3: Enter Intelr RMT Do Not Disturb State
        // 4: Enter Suspend

        Method(GNSC, 0, NotSerialized)
        {
        // DEBUG START //
        Store(INSC, Local0)
        P8XH(0,0xAA)
        ADBG("GNSC: ")
        ADBG(ToHexString(Local0))
        // DEBUG END //
        return (INSC)
        }

        Method(GNSM, 0, Serialized)
        {
        Store(NBT1, Local0)
        // DEBUG START //
        P8XH(0,0x71)
        ADBG("GNSM: ")
        ADBG(ToHexString(Local0))
        // DEBUG END //
        Return (Local0)
        }

        Method(SNSM, 1, Serialized)
        {
        Store(Arg0, NBT1)
        Store(NBT1, Local0)
            Switch(ToInteger(Local0))
            {
                Case (0)
                {
                ADBG("case 0: ")
                // 0: Exit Intelr RMT
                // TODO: Add platform specific code here
                }
                Case (1)
                {
                ADBG("case 1: ")
                // 1: Enter Intelr RMT Active State
                // TODO: Add platform specific code here
                }
                Case (2)
                {
                ADBG("case 2: ")
                // 2: Enter Intelr RMT Idle State
                // TODO: Add platform specific code here
                }
                Case (3)
                {
                ADBG("case 3: ")
                // 3: Enter Intelr RMT Do Not Disturb State
                // TODO: Add platform specific code here
                }
                Case (4)
                {
                ADBG("case 4: ")
                // 4: Enter Suspend
                // TODO: Add platform specific code here
                }

            }

        // DEBUG START //
        P8XH(0,0x72)
        ADBG("SNSM: ")
        ADBG(ToHexString(Local0))
        // DEBUG END //
        }

    } // Device (INSD)

  } // end \_SB scope
} // end SSDT