soc: Remove copyright notices
[coreboot.git] / src / soc / intel / common / acpi / sgx.asl
blob350c31984217628d423d902ca3005625504e9d19
1 /*
2  * This file is part of the coreboot project.
3  *
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; version 2 of the License.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  */
15 Scope(\_SB)
17         // Secure Enclave memory
18         Device (EPC)
19         {
20                 Name (_HID, EISAID ("INT0E0C"))
21                 Name (_STR, Unicode ("Enclave Page Cache 1.0"))
22                 Name (_MLS, Package () {
23                         Package (2) { "en", Unicode ("Enclave Page Cache 1.0") }
24                 })
26                 Name (RBUF, ResourceTemplate ()
27                 {
28                         // _MIN, _MAX and  _LEN get patched runtime
29                         QWordMemory (
30                         ResourceConsumer, // ResourceUsage
31                         PosDecode,        // Decode             _DEC
32                         MinNotFixed,      // IsMinFixed         _MIF
33                         MaxNotFixed,      // IsMaxFixed         _MAF
34                         NonCacheable,     // Cacheable          _MEM
35                         ReadWrite,        // ReadAndWrite       _RW
36                         0,                // AddressGranularity _GRA
37                         0,                // AddressMinimum     _MIN
38                         0,                // AddressMaximum     _MAX
39                         0,                // AddressTranslation _TRA
40                         1,                // RangeLength        _LEN
41                         ,                 // ResourceSourceIndex
42                         ,                 // ResourceSource
43                         BAR0              // DescriptorName
44                         )
45                 })
47                 Method (_CRS, 0x0, NotSerialized)
48                 {
49                         CreateQwordField (RBUF, ^BAR0._MIN, EMIN)
50                         CreateQwordField (RBUF, ^BAR0._MAX, EMAX)
51                         CreateQwordField (RBUF, ^BAR0._LEN, ELEN)
52                         Store (EMNA, EMIN)
53                         Store (ELNG, ELEN)
54                         Subtract (Add (EMNA, ELNG), 1, EMAX)
55                         Return (RBUF)
56                 }
58                 Method (_STA, 0x0, NotSerialized)
59                 {
60                         If (LNotEqual (EPCS, 0))
61                         {
62                                 Return (0xF)
63                         }
64                         Return (0x0)
65                 }
67         } // end EPC Device
68 } // End of Scope(\_SB)