ACPI 中文文档ACPI 中文文档
首页
第 1 章
第 2 章
第 3 章
第 4 章
第 5 章
第 6 章
第 7 章
第 8 章
第 9 章
第 10 章
第 11 章
第 12 章
第 13 章
第 14 章
第 15 章
第 16 章
第 17 章
第 18 章
第 19 章
第 20 章
第 21 章
附录 A
首页
第 1 章
第 2 章
第 3 章
第 4 章
第 5 章
第 6 章
第 7 章
第 8 章
第 9 章
第 10 章
第 11 章
第 12 章
第 13 章
第 14 章
第 15 章
第 16 章
第 17 章
第 18 章
第 19 章
第 20 章
第 21 章
附录 A
  • 第 9 章

    • 总览
    • 9.1. 设备对象名称冲突
    • 9.2. \_SI 系统指示器
    • 9.3. 环境光传感器设备
    • 9.4. 电池设备
    • 9.5. 控制方法盖板设备
    • 9.6. 控制方法电源按钮和睡眠按钮设备
    • 9.7. 嵌入式控制器设备
    • 9.8. 通用容器设备
    • 9.9. ATA 控制器设备
    • 9.10. 软盘控制器设备对象
    • 9.11. GPE 块设备
    • 9.12. 模块设备
    • 9.13. 内存设备
    • 9.14. _UPC(USB 端口能力)
    • 9.15. PC/AT RTC/CMOS 设备
    • 9.16. 用户存在检测设备
    • 9.17. I/O APIC 设备
    • 9.18. 时间和报警设备
    • 9.19. 通用按钮设备
    • 9.20. NVDIMM 设备
      • 9.20.1. 概述
      • 9.20.2. NVDIMM 根设备
      • 9.20.3. NVDIMM 设备
      • 9.20.4. 示例
      • 9.20.5. 加载 NVDIMM 驱动程序
      • 9.20.6. 热插拔支持
      • 9.20.7. NVDIMM 根设备 _DSMs
      • 9.20.8. NVDIMM 设备方法

9.14. _UPC(USB 端口能力)

此可选对象是一个方法,它允许平台向操作系统传达某些当前 USB 主机总线适配器规范(例如 UHCI、OHCI 和 EHCI)未提供的 USB 端口能力。如果平台实现了该对象,则对于给定 USB 主机总线适配器上的每个 USB 端口(子节点)都会存在该对象;操作系统软件可以在引导时检查这些特征,以便了解系统的 USB 拓扑、可用 USB 端口等信息。此方法适用于 USB 根集线器端口,以及通过集成 USB 集线器实现的端口。

参数

无

返回值

如下所述的一个 Package

返回值信息

Package {
   Connectable             // Integer (BYTE)
   Type                    // Integer (BYTE)
   Reserved0               // Integer
   Reserved1               // Integer)
}

表 9.11 UPC 返回 Package 值

元素对象类型描述
ConnectableInteger (BYTE)如果该值非零,则该端口可连接。如果该值为零,则该端口不可连接。
TypeInteger (BYTE)指定主机连接器类型。如果该端口对用户不可见,则 OSPM 将忽略它:0x00:‘A’ 型连接器 0x01:Mini-AB 连接器 0x02:ExpressCard 0x03:USB 3 Standard-A 连接器 0x04:USB 3 Standard-B 连接器 0x05:USB 3 Micro-B 连接器 0x06:USB 3 Micro-AB 连接器 0x07:USB 3 Power-B 连接器 0x08:Type C 连接器 - 仅 USB2 0x09:Type C 连接器 - USB2 和带切换开关的 SS 0x0A:Type C 连接器 - USB2 和不带切换开关的 SS 0x0B- 0xFE:保留 0xFF:专有连接器
Reserved0Integer该值保留供将来使用,且必须为零。
Reserved1Integer该值保留供将来使用,且必须为零。

附加说明:

可连接端口的定义取决于特定平台中 USB 端口的实现方式。例如:

  • 如果 USB 端口对用户可见(由 _PLD 对象指示)且可连接,则最终用户可以自由地将 USB 设备连接到该 USB 端口并从中断开。

  • 如果 USB 端口对用户不可见但可连接,则最终用户不能自由地将 USB 设备连接到该 USB 端口并从中断开。直接“硬连线”到 USB 端口上的 USB 设备就是对用户不可见但可连接的 USB 端口的一个示例。

  • 如果 USB 端口对用户不可见且不可连接,则该 USB 端口在物理上由 USB 主机控制器实现,但平台并未使用它,因此最终用户无法访问它。

USB 端口不能同时指定为可见和不可连接。

Type-C 连接器的引脚支持一对 USB2 信号线(D+/D-)和两对 SuperSpeed 信号线(SSTXp1/SSTXn1 和 SSRXp2/SSRXn2)。使用两对 SS 信号线可使 CC 线和 USB SuperSpeed 数据总线线缆在线缆通道内用于信号传输时不必考虑线缆的方向和扭转。

Type C 连接器 - 仅 USB2 插座

这些仅实现 USB2 信号线对,不实现 SS 信号线对。

Type C 连接器 - 带切换开关的 USB2 和 SS 插座

这些实现 USB2 信号线对,以及一个带有物理多路复用器的功能切换开关,该多路复用器根据 Type-C 插头方向,用于将两个插座 SuperSpeed 信号线对中的一个动态连接到单个 USB 主机控制器端口。

Type C 连接器 - 不带 切换开关的 USB2 和 SS 插座

这些实现 USB2 信号线对,并通过将每个插座 SuperSpeed 信号线对连接到单独的 USB 主机控制器端口来实现功能切换开关。

注意

更多信息请参见位于 https://www.usb.org/documents 的 USB Type-C 规范。

示例

以下是一个为 USB 主机控制器根集线器实现的端口特征对象示例,其中:

  • 实现了三个端口;端口 1 对用户不可见/不可连接,端口 2 和 3 对用户可见且可连接。

  • 端口 2 位于后面板上

  • 端口 3 具有一个集成的 2 端口集线器。请注意,由于该端口承载一个集成集线器,因此它不能与另一个主机控制器共享(例如,如果该集成集线器是一个 USB2.0 集线器,则该端口绝不能与 USB1.1 伴随控制器共享)。

  • 通过嵌入式集线器提供的端口位于前面板上,并且彼此相邻。

../_images/ACPIdefined_Devices_and_DeviceSpecificObjects-5.png

图 9.4 USB 端口

//
// Root hub device for this host controller.
// This controller implements 3 root hub ports.
//
Device( RHUB) {
   Name( \_ADR, 0x00000000)         // Value of 0 is reserved for root HUB
   //
   // Root hub, port 1
   //
   Device( PRT1) {
      // Address object for port 1. This value must be 1.
      Name( \_ADR, 0x00000001)
      // USB port capabilities object. This object returns the system
      // specific USB port configuration information for port number 1
      // Because this port is not connectable it is assumed to be not visible.
      // Therefore a \_PLD descriptor is not required.
      Name( \_UPC, Package(){
         0x00,                      // Port is not connectable
         0xFF,                      // Connector type (N/A for non-visible ports)
         0x00000000,                // Reserved 0 - must be zero
         0x00000000})               // Reserved 1 - must be zero
   }                                // Device( PRT1)
   //
   // Root Hub, Port 2
   //
   Device( PRT2) {
      // Address object for port 2. This value must be 2
      Name(_ADR, 0x00000002)
      Name( \_UPC, Package(){
         0xFF,                      // Port is connectable
         0x00,                      // Connector type - Type 'A'
         0x00000000,                // Reserved 0 - must be zero
         0x00000000})               // Reserved 1 - must be zero
                                    // provide physical port location info
      Name( \_PLD, Package(1) {
         Buffer(0x14) {
            0x82,0x00,0x00,0x00,    // Revision 2, Ignore color
                                    // Color (ignored), width and height not
            0x00,0x00,0x00,0x00,    // required as this is a standard USB 'A' type
                                    // connector
            0x69,0x0c,0x00,0x00,    // User visible, Back panel, Vertical
                                    // Center, shape = vert. rectangle
            0x03,0x00,0x00,0x00,    // ejectable, requires OPSM eject assistance
            0xFF,0xFF,0xFF,0xFF})}  // Vert. and Horiz. Offsets not supplied
   }                                // Device( PRT2)
   //
   // Root Hub, Port 3
   //
   Device( PRT3) {                  // This device is the integrated USB hub.
                                    // Address object for port 3. This value must be 3
      Name(_ADR, 0x00000003)
      // Because this port is not connectable it is assumed to be not visible.
      // Therefore a \_PLD descriptor is not required.
      Name( \_UPC, Package(){
         0xFF,                      // Port is connectable
         0xFF,                      // Connector type (N/A for non-visible ports)
         0x00000000,                // Reserved 0 - must be zero
         0x00000000})               // Reserved 1 - must be zero
         //
         // Integrated hub, port 1
         //
         Device( PRT1) {
         // Address object for the port. Because the port is implemented on
         // integrated hub port #1, this value must be 1
         Name( \_ADR, 0x00000001)
         // USB port characteristics object. This object returns the system
         // specific USB port configuration information for integrated hub port
         // number 1
         Name( \_UPC, Package(){
            0xFF,                   // Port is connectable
            0x00,                   // Connector type - Type 'A'
            0x00000000,             // Reserved 0 - must be zero
            0x00000000})            // Reserved 1 - must be zero
                                    // provide physical port location info
         Name( \_PLD, Package(1) {
            Buffer(0x14) {
            0x82,0x00,0x00,0x00,,   // Revision 2, Ignore color
                                    // Color (ignored), width and height not
            0x00,0x00,0x00,0x00,    // required as this is a standard USB 'A' type
                                    // connector
            0xa1,0x10,0x00,0x00,    // User visible, front panel, Vertical
                                    // lower, horz. Left, shape = horz. rectangle
            0x03,0x00,0x00,0x00,    // ejectable, requires OPSM eject assistance
            0xFF,0xFF,0xFF,0xFF})}  // Vert. and Horiz. Offsets not supplied
         }                          // Device( PRT1)
         //
         // Integrated hub, port 2
         //
         Device( PRT2) {            // Address object for the port. Because the port
                                    // is implemented on integrated hub port #2,
                                    // this value must be 2
            Name( \_ADR, 0x00000002)
                                    // USB port characteristics object. This object
                                    // returns the system-specific USB port configuration
                                    // information for integrated hub port number 2
            Name( \_UPC, Package(){
               0xFF,                // Port is connectable
               0x00,                // Connector type - Type 'A'
               0x00000000,          // Reserved 0 - must be zero
               0x00000000})         // Reserved 1 - must be zero
            Name( \_PLD, Package(1) {
               Buffer(0x14) {
               0x82,0x00,0x00,0x00, // Revision 2, Ignore color
                                    // Color (ignored), width and height not
               0x00,0x00,0x00,0x00, // required as this is a standard USB 'A' type
                                    // connector
               0xa1,0x12,0x00,0x00, // User visible, front panel, Vertical
                                    // lower, horz. right, shape = horz. rectangle
               0x03,0x00,0x00,0x00, // ejectable, requires OPSM eject assistance
               0xFF,0xFF,0xFF,0xFF}) // Vert. and Horiz. Offsets not supplied
      }                             // Device( PRT2)
   }                                // Device( PRT3)
}                                   // Device( RHUB)

9.14.1. USB 2.0 主机控制器以及 _UPC 和 _PLD

实现由一个或多个符合 USB1.1 的伴随控制器(例如 UHCI 或 OHCI)组成的 USB2.0 主机控制器的平台,必须为每个可在 EHCI 主机控制器及其关联的伴随控制器之间路由的 USB 端口实现一个 _UPC 和一个 _PLD 对象。之所以要求这样,是因为如果 OSPM 禁用了父主机控制器,则为 EHCI 主机控制器的子端口实现的 USB 端口能力对象可能不可用。例如,如果 EHCI 主机控制器上的根端口 1 可路由到其伴随控制器上的根端口 1,则命名空间必须在每个主机控制器关联的端口 1 子对象下提供一个 _UPC 和一个 _PLD 对象。

示例

Scope(\_SB) {
...
Device(PCI0) {
...
                     // Host controller (EHCI)
Device( USB0) {
                     // PCI device#/Function# for this HC. Encoded as specified in the ACPI
                     // specification
Name(_ADR, 0xyyyyzzzz)
                     // Root hub device for this HC #1.
Device(RHUB) {
Name(_ADR, 0x00000000) // must be zero for USB root hub
                     // Root hub, port 1
Device(PRT1) {

Name(_ADR, 0x00000001)
                     // USB port configuration object. This object returns the system
                     // specific USB port configuration information for port number 1
                     // Must match the \_UPC declaration for USB1.RHUB.PRT1 as it is this
                     // host controller's companion
Name( \_UPC, Package(){
   0xFF,             // Port is connectable
   0x00,             // Connector type - Type 'A'
   0x00000000,       // Reserved 0 - must be zero
   0x00000000})      // Reserved 1 - must be zero

                     // provide physical port location info for port 1
                     // Must match the \_UPC declaration for USB1.RHUB.PRT1 as it is this
                     // host controller's companion
   Name( \_PLD, Package(1) {
      Buffer(0x14) {
      0x82,0x00,0x00,0x00, // Revision 2, Ignore color
                     // Color (ignored), width and height not
      0x00,0x00,0x00,0x00, // required as this is a standard USB 'A'
                     // type connector

      0xa1,0x10,0x00,0x00, // User visible, front panel, Vertical
                     // lower, horz. Left, shape = horz. Rect.
      0x03,0x00,0x00,0x00, // ejectable, needs OPSM eject assistance
            0xFF,0xFF,0xFF,0xFF})} // Vert. and Horiz. Offsets not supplied

   }                 // Device( PRT1)
                     //
                     // Define other ports, control methods, etc
   ...
   ...
   }                 // Device( RHUB)
   }                 // Device( USB0)

                     // Companion Host controller (OHCI or UHCI)
   Device( USB1) {
                     // PCI device#/Function# for this HC. Encoded as specified in the ACPI
                     // specification
   Name(_ADR, 0xyyyyzzzz)
                     // Root hub device for this HC #1.
   Device(RHUB) {
   Name(_ADR, 0x00000000) // must be zero for USB root hub
                     // Root hub, port 1
   Device(PRT1) {
   Name(_ADR, 0x00000001)
                     // USB port configuration object. This object returns the system
                     // specific USB port configuration information for port number 1
                     // Must match the \_UPC declaration for USB0.RHUB.PRT1 as this host
                     // controller is a companion to the EHCI host controller
                     // provide physical port location info for port 1
   Name( \_UPC, Package(){
   0xFF,             // Port is connectable
   0x00,             // Connector type - Type 'A'
   0x00000000,       // Reserved 0 - must be zero
   0x00000000})      // Reserved 1 - must be zero

                     // Must match the \_PLD declaration for USB0.RHUB.PRT1 as this host
                     // controller is a companion to the EHCI host controller
   Name( \_PLD, Package(1) {
      Buffer( 0x14) {
      0x82,0x00,0x00,0x00, // Revision 2, Ignore color
                     // Color (ignored), width and height not
      0x00,0x00,0x00,0x00, // required as this is a standard USB 'A'
                     // type connector

      0xa1,0x10,0x00,0x00, // User visible, front panel, Vertical
                     // lower, horz. Left, shape = horz. Rect.
      0x03,0x00,0x00,0x00, // ejectable, requires OPSM eject assistance
            0xFF,0xFF,0xFF,0xFF})} // Vert. and Horiz. Offsets not supplied
   }                 // Device( PRT1)
                     //
                     // Define other ports, control methods, etc
   ...
   ...
   }                // Device( RHUB)
   }                // Device( USB1)
   }                // Device( PCI0)
   }                // Scope( \_\SB)
Prev
9.13. 内存设备
Next
9.15. PC/AT RTC/CMOS 设备