hc
2024-03-22 a0752693d998599af469473b8dc239ef973a012f
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
109
110
111
112
113
114
115
116
/** @file
  ACPI DSDT table
 
Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
 
**/
 
 
Scope (\_SB.PCI0){
 
  Device(PDRC)
  {
    //
    // PCI Device Resource Consumption
    //
 
    Name(_HID,EISAID("PNP0C02"))        
 
    Name(_UID,1)
 
    Name(BUF0,ResourceTemplate()
    {
      //
      // MCH BAR _BAS will be updated in _CRS below according to B0:D0:F0:Reg.48h
      //
      Memory32Fixed(ReadWrite,0,0x08000,MCHB) 
      //
      // DMI BAR _BAS will be updated in _CRS below according to B0:D0:F0:Reg.68h
      //
      Memory32Fixed(ReadWrite,0,0x01000,DMIB) 
      //
      // EP BAR _BAS will be updated in _CRS below according to B0:D0:F0:Reg.40h
      //
      Memory32Fixed(ReadWrite,0,0x01000,EGPB)
      //
      // PCI Express BAR _BAS and _LEN will be updated in _CRS below according to B0:D0:F0:Reg.60h
      //
      Memory32Fixed(ReadWrite,0,0,PCIX)  
 
      //
      // MISC ICH TTT base address reserved for the TxT module use. Check if the hard code meets the real configuration.
      // If not, dynamically update it like the _CRS method below.
      //
      Memory32Fixed(ReadWrite,0xFED20000,0x20000)   
      
      //
      // VTD engine memory range. Check if the hard code meets the real configuration.
      // If not, dynamically update it like the _CRS method below.
      //
      Memory32Fixed(ReadOnly, 0xFED90000, 0x00004000)
      
      //
      // MISC ICH. Check if the hard code meets the real configuration.
      // If not, dynamically update it like the _CRS method below.
      //
      Memory32Fixed(ReadWrite,0xFED45000,0x4B000,TPMM)
      
      //
      // FLASH range
      //
      Memory32Fixed (ReadOnly, 0xFF000000, 0x1000000, FIOH) //16MB as per IOH spec
      
      //
      // Local APIC range(0xFEE0_0000 to 0xFEEF_FFFF)
      //
      Memory32Fixed (ReadOnly, 0xFEE00000, 0x100000, LIOH)
      
      //
      // Sx handler reserved MMIO
      //
      Memory32Fixed (ReadWrite, 0, 0, SXRE)
      
      //
      // Reserve HPET address decode range
      //
      Memory32Fixed (ReadWrite, 0, 0, HPET)
 
    })
 
 
    Method(_CRS,0,Serialized)
    {
 
      CreateDwordField(BUF0,^MCHB._BAS,MBR0)
      Store(\_SB.PCI0.GMHB(), MBR0)
 
      CreateDwordField(BUF0,^DMIB._BAS,DBR0)
      Store(\_SB.PCI0.GDMB(), DBR0)
 
      CreateDwordField(BUF0,^EGPB._BAS,EBR0)
      Store(\_SB.PCI0.GEPB(), EBR0)
 
      CreateDwordField(BUF0,^PCIX._BAS,XBR0)
      Store(\_SB.PCI0.GPCB(), XBR0)
 
      CreateDwordField(BUF0,^PCIX._LEN,XSZ0)
      Store(\_SB.PCI0.GPCL(), XSZ0)
 
      CreateDwordField(BUF0,^SXRE._BAS,SXRA)
      Store(SXRB, SXRA)
      CreateDwordField(BUF0,^SXRE._LEN,SXRL)
      Store(SXRS, SXRL)
 
      // HPET device claims the resource in LPC_DEV.ASL.
      If(LNOT(HPTE)){
        CreateDwordField(BUF0,^HPET._BAS,HBAS)
        CreateDwordField(BUF0,^HPET._LEN,HLEN)
        Store(HPTB, HBAS)
        Store(0x400, HLEN)
      }
 
      Return(BUF0)
    }
  } //end of PDRC
} // end of SB