| 1 |
/* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 |
|
| 3 |
#if CONFIG(SOC_INTEL_COMMON_BLOCK_SGX_ENABLE) |
| 4 |
Scope(\_SB) |
| 5 |
{ |
| 6 |
// Secure Enclave memory |
| 7 |
Device (EPC) |
| 8 |
{ |
| 9 |
External (EPCS, IntObj) |
| 10 |
External (EMNA, IntObj) |
| 11 |
External (ELNG, IntObj) |
| 12 |
Name (_HID, EISAID ("INT0E0C")) |
| 13 |
Name (_STR, Unicode ("Enclave Page Cache 1.0")) |
| 14 |
Name (_MLS, Package () { |
| 15 |
Package (2) { "en", Unicode ("Enclave Page Cache 1.0") } |
| 16 |
}) |
| 17 |
|
| 18 |
Name (RBUF, ResourceTemplate () |
| 19 |
{ |
| 20 |
// _MIN, _MAX and _LEN get patched runtime |
| 21 |
QWordMemory ( |
| 22 |
ResourceConsumer, // ResourceUsage |
| 23 |
PosDecode, // Decode _DEC |
| 24 |
MinNotFixed, // IsMinFixed _MIF |
| 25 |
MaxNotFixed, // IsMaxFixed _MAF |
| 26 |
NonCacheable, // Cacheable _MEM |
| 27 |
ReadWrite, // ReadAndWrite _RW |
| 28 |
0, // AddressGranularity _GRA |
| 29 |
0, // AddressMinimum _MIN |
| 30 |
0, // AddressMaximum _MAX |
| 31 |
0, // AddressTranslation _TRA |
| 32 |
1, // RangeLength _LEN |
| 33 |
, // ResourceSourceIndex |
| 34 |
, // ResourceSource |
| 35 |
BAR0 // DescriptorName |
| 36 |
) |
| 37 |
}) |
| 38 |
|
| 39 |
Method (_CRS, 0x0, NotSerialized) |
| 40 |
{ |
| 41 |
CreateQwordField (RBUF, ^BAR0._MIN, EMIN) |
| 42 |
CreateQwordField (RBUF, ^BAR0._MAX, EMAX) |
| 43 |
CreateQwordField (RBUF, ^BAR0._LEN, ELEN) |
| 44 |
EMIN = EMNA |
| 45 |
ELEN = ELNG |
| 46 |
EMAX = EMNA + ELNG - 1 |
| 47 |
Return (RBUF) |
| 48 |
} |
| 49 |
|
| 50 |
Method (_STA, 0x0, NotSerialized) |
| 51 |
{ |
| 52 |
If (EPCS != 0) |
| 53 |
{ |
| 54 |
Return (0xF) |
| 55 |
} |
| 56 |
Return (0x0) |
| 57 |
} |
| 58 |
|
| 59 |
} // end EPC Device |
| 60 |
} // End of Scope(\_SB) |
| 61 |
#endif |