6.2.8. _HPP(热插拔参数)
此可选对象求值为一个 Package,其中包含在配置插入热插拔插槽中的 PCI 设备时使用的缓存行大小、延迟计时器、SERR 启用和 PERR 启用值,或者用于在系统启动时未由平台启动固件配置的 PCI 设备上执行配置。该对象放置在希望具有此行为的 PCI 总线之下,例如带有热插拔插槽的总线。_HPP 提供的设置适用于所有子总线,直到遇到另一个 _HPP 对象为止。
参数:
无
返回值:
一个包含 Integer 热插拔参数的 Package
示例:
Method (_HPP, 0) {
Return (Package(4){
0x08, // CacheLineSize in DWORDS
0x40, // LatencyTimer in PCI clocks
0x01, // Enable SERR (Boolean)
0x00 // Enable PERR (Boolean)
})
}
表 6.7 HPP Package 内容
| 字段 | 对象类型 | 定义 |
|---|---|---|
| 缓存行大小 | Integer | 以 DWORD 数量表示的缓存行大小。 |
| 延迟计时器 | Integer | 以 PCI 时钟周期数表示的延迟计时器值。 |
| 启用 SERR | Integer | 当设置为 1 时,表示必须执行操作以在命令寄存器中启用 SERR。 |
| 启用 PERR | Integer | 当设置为 1 时,表示必须执行操作以在命令寄存器中启用 PERR。 |
示例:使用 _HPP
Scope(\_SB) {
Device(PCI0) { // Root PCI Bus
Name(_HID, EISAID("PNP0A03")) // \_HID for root device
Method (_CRS,0){ // Need current resources for root dev
// Return current resources for root bridge 0
}
Name(_PRT, Package(){ // Need PCI IRQ routing for PCI bridge
// Package with PCI IRQ routing table information
})
Device (P2P1) { // First PCI-to-PCI bridge (No Hot Plug slots)
Name(_ADR,0x000C0000) // Device#Ch, Func#0 on bus PCI0
Name(_PRT, Package(){ // Need PCI IRQ routing for PCI bridge
// Package with PCI IRQ routing table information
})
} // end P2P1
Device (P2P2) {
// Second PCI-to-PCI bridge (Bus contains Hot plug slots)
Name(_ADR,0x000E0000) // Device#Eh, Func#0 on bus PCI0
Name(_PRT, Package(){ // Need PCI IRQ routing for PCI bridge
// Package with PCI IRQ routing table information
})
Name(_HPP, Package(){0x08,0x40, 0x01, 0x00})
// Device definitions for Slot 1- HOT PLUG SLOT
Device (S1F0) { // Slot 1, Func#0 on bus P2P2
Name(_ADR,0x00020000)
Method(_EJ0, 1) { // Remove all power to device}
}
Device (S1F1) { // Slot 1, Func#1 on bus P2P2
Name(_ADR,0x00020001)
Method(_EJ0, 1) { // Remove all power to device}
}
Device (S1F2) { // Slot 1, Func#2 on bus P2P2
Name(_ADR,0x000200 02)
Method(_EJ0, 1) { // Remove all power to device}
}
Device (S1F3) { // Slot 1, Func#3 on bus P2P2
Name(_ADR,0x00020003)
Method(_EJ0, 1) { // Remove all power to device}
}
Device (S1F4) { // Slot 1, Func#4 on bus P2P2
Name(_ADR,0x00020004)
Method(_EJ0, 1) { // Remove all power to device}
}
Device (S1F5) { // Slot 1, Func#5 on bus P2P2
Name(_ADR,0x00020005)
Method(_EJ0, 1) { // Remove all power to device}
}
Device (S1F6) { // Slot 1, Func#6 on bus P2P2
Name(_ADR,0x00020006)
Method(_EJ0, 1) { // Remove all power to device}
}
Device (S1F7) { // Slot 1, Func#7 on bus P2P2
Name(_ADR,0x00020007)
Method(_EJ0, 1) { // Remove all power to device}
}
// Device definitions for Slot 2- HOT PLUG SLOT
Device (S2F0) { // Slot 2, Func#0 on bus P2P2
Name(_ADR,0x00030000)
Method(_EJ0, 1) { // Remove all power to device}
}
Device (S2F1) { // Slot 2, Func#1 on bus P2P2
Name(_ADR,0x00030001)
Method(_EJ0, 1) { // Remove all power to device}
}
Device (S2F2) { // Slot 2, Func#2 on bus P2P2
Name(_ADR,0x00030002)
Method(_EJ0, 1) { // Remove all power to device}
}
Device (S2F3) { // Slot 2, Func#3 on bus P2P2
Name(_ADR,0x00030003)
Method(_EJ0, 1) { // Remove all power to device}
}
Device (S2F4) { // Slot 2, Func#4 on bus P2P2
Name(_ADR,0x00030004)
Method(_EJ0, 1) { // Remove all power to device}
}
Device (S2F5) { // Slot 2, Func#5 on bus P2P2
Name(_ADR,0x00030005)
Method(_EJ0, 1) { // Remove all power to device}
}
Device (S2F6) { // Slot 2, Func#6 on bus P2P2
Name(_ADR,0x00030006)
Method(_EJ0, 1) { // Remove all power to device}
}
Device (S2F7) { // Slot 2, Func#7 on bus P2P2
Name(_ADR,0x00030007)
Method(_EJ0, 1) { // Remove all power to device}
}
} // end P2P2
} // end PCI0
} // end Scope (\_SB)
OSPM 将为热插入到插槽 1 或插槽 2 中的卡上的 PCI 设备进行配置,缓存行大小为 32(注意该字段以 DWORD 为单位),延迟定时器为 64,启用 SERR,但保持 PERR 不变。