雷达智富

首页 > 内容 > 程序笔记 > 正文

程序笔记

PCIe配置空间(PCIE Configuration Space) – 类型码(Class Code)

2024-07-19 105

前言

PCIe配置空间(PCIE Configuration Space)中的类型码(Class Code),记录了PCIe类型设备的类型、子类型和功能,不同的PCIe设备,根据其类型和功能,有不同的类型码、子类型码和功能码。

PCIe配置空间

PCIE Configuration Space

Class Code

Class Code The upper byte (at offset 0Bh) is a base class code which broadly classifies the type of function the device performs
The middle byte (at offset 0Ah) is a sub-class code which identifies more specifically the function of the device
The lower byte (at offset 09h) identifies a specific register-level programming interface (if any) so that device independent software can interact with the device

Class Code(类型码), Subclass(子类型码), 和Prog IF寄存器分别用于标识设备的类型、设备的功能和设备的寄存器级编程接口。下表列出了可能的设备类型:

Class Code Description
0x00 Device was built prior definition of the class code field
0x01 Mass Storage Controller
0x02 Network Controller
0x03 Display Controller
0x04 Multimedia Controller
0x05 Memory Controller
0x06 Bridge Device
0x07 Simple Communication Controllers
0x08 Base System Peripherals
0x09 Input Devices
0x0A Docking Stations
0x0B Processors
0x0C Serial Bus Controllers
0x0D Wireless Controllers
0x0E Intelligent I/O Controllers
0x0F Satellite Communication Controllers
0x10 Encryption/Decryption Controllers
0x11 Data Acquisition and Signal Processing Controllers
0x12 ~ 0xFE Reserved
0xFF Device does not fit any defined class.

下表列出了PCI(e)可能的设备功能:

Class Code (offset 0x0B) Sub-class (offset 0x0A) ProgIF (offset 0x09) Description
0x00 0x00 0x00 Any device except for VGA-Compatible devices
0x01 0x00 VGA-Compatible Device
0x01 0x00 0x00 SCSI Bus Controller
0x01 0x– IDE Controller
0x02 0x00 Floppy Disk Controller
0x03 0x00 IPI Bus Controller
0x04 0x00 RAID Controller
0x05 0x20 ATA Controller (Single DMA)
0x30 ATA Controller (Chained DMA)
0x06 0x00 Serial ATA (Vendor Specific Interface)
0x01 Serial ATA (AHCI 1.0)
0x07 0x00 Serial Attached SCSI (SAS)
0x80 0x00 Other Mass Storage Controller
0x02 0x00 0x00 Ethernet Controller
0x01 0x00 Token Ring Controller
0x02 0x00 FDDI Controller
0x03 0x00 ATM Controller
0x04 0x00 ISDN Controller
0x05 0x00 WorldFip Controller
0x06 0x– PICMG 2.14 Multi Computing
0x80 0x00 Other Network Controller
0x03 0x00 0x00 VGA-Compatible Controller
0x01 8512-Compatible Controller
0x01 0x00 XGA Controller
0x02 0x00 3D Controller (Not VGA-Compatible)
0x80 0x00 Other Display Controller
0x04 0x00 0x00 Video Device
0x01 0x00 Audio Device
0x02 0x00 Computer Telephony Device
0x03 0x00 Multimedia Device
0x05 0x00 0x00 RAM Controller
0x01 0x00 Flash Controller
0x80 0x00 Other Memory Controller
0x06 0x00 0x00 Host Bridge
0x01 0x00 ISA Bridge
0x02 0x00 EISA Bridge
0x03 0x00 MCA Bridge
0x04 0x00 PCI-to-PCI Bridge
0x01 PCI-to-PCI Bridge (Subtractive Decode)
0x05 0x00 PCMCIA Bridge
0x06 0x00 NuBus Bridge
0x07 0x00 CardBus Bridge
0x08 0x– RACEway Bridge
0x09 0x40 PCI-to-PCI Bridge (Semi-Transparent, Primary)
0x80 PCI-to-PCI Bridge (Semi-Transparent, Secondary)
0x0A 0x00 InfiniBrand-to-PCI Host Bridge
0x80 0x00 Other Bridge Device
0x07 0x00 0x00 Generic XT-Compatible Serial Controller
0x01 16450-Compatible Serial Controller
0x02 16550-Compatible Serial Controller
0x03 16650-Compatible Serial Controller
0x04 16750-Compatible Serial Controller
0x05 16850-Compatible Serial Controller
0x06 16950-Compatible Serial Controller
0x01 0x00 Parallel Port
0x01 Bi-Directional Parallel Port
0x02 ECP 1.X Compliant Parallel Port
0x03 IEEE 1284 Controller
0xFE IEEE 1284 Target Device
0x02 0x00 Multiport Serial Controller
0x03 0x00 Generic Modem
0x01 Hayes Compatible Modem (16450-Compatible Interface)
0x02 Hayes Compatible Modem (16550-Compatible Interface)
0x03 Hayes Compatible Modem (16650-Compatible Interface)
0x04 Hayes Compatible Modem (16750-Compatible Interface)
0x04 0x00 IEEE 488.1/2 (GPIB) Controller
0x05 0x00 Smart Card
0x80 0x00 Other Communications Device
0x08 0x00 0x00 Generic 8259 PIC
0x01 ISA PIC
0x02 EISA PIC
0x10 I/O APIC Interrupt Controller
0x20 I/O(x) APIC Interrupt Controller
0x01 0x00 Generic 8237 DMA Controller
0x01 ISA DMA Controller
0x02 EISA DMA Controller
0x02 0x00 Generic 8254 System Timer
0x01 ISA System Timer
0x02 EISA System Timer
0x03 0x00 Generic RTC Controller
0x01 ISA RTC Controller
0x04 0x00 Generic PCI Hot-Plug Controller
0x80 0x00 Other System Peripheral
0x09 0x00 0x00 Keyboard Controller
0x01 0x00 Digitizer
0x02 0x00 Mouse Controller
0x03 0x00 Scanner Controller
0x04 0x00 Gameport Controller (Generic)
0x10 Gameport Contrlller (Legacy)
0x80 0x00 Other Input Controller
0x0A 0x00 0x00 Generic Docking Station
0x80 0x00 Other Docking Station
0x0B 0x00 0x00 386 Processor
0x01 0x00 486 Processor
0x02 0x00 Pentium Processor
0x10 0x00 Alpha Processor
0x20 0x00 PowerPC Processor
0x30 0x00 MIPS Processor
0x40 0x00 Co-Processor
0x0C 0x00 0x00 IEEE 1394 Controller (FireWire)
0x10 IEEE 1394 Controller (1394 OpenHCI Spec)
0x01 0x00 ACCESS.bus
0x02 0x00 SSA
0x03 0x00 USB (Universal Host Controller Spec)
0x10 USB (Open Host Controller Spec)
0x20 USB2 Host Controller (Intel Enhanced Host Controller Interface)
0x30 USB3 XHCI Controller
0x80 Unspecified USB Controller
0xFE USB
(Not Host Controller)
0x04 0x00 Fibre Channel
0x05 0x00 SMBus
0x06 0x00 InfiniBand
0x07 0x00 IPMI SMIC Interface
0x01 IPMI Kybd Controller Style Interface
0x02 IPMI Block Transfer Interface
0x08 0x00 SERCOS Interface Standard (IEC 61491)
0x09 0x00 CANbus
0x0D 0x00 0x00 iRDA Compatible Controller
0x01 0x00 Consumer IR Controller
0x10 0x00 RF Controller
0x11 0x00 Bluetooth Controller
0x12 0x00 Broadband Controller
0x20 0x00 Ethernet Controller (802.11a)
0x21 0x00 Ethernet Controller (802.11b)
0x80 0x00 Other Wireless Controller
0x0E 0x00 0x– I20 Architecture
0x00 Message FIFO
0x0F 0x01 0x00 TV Controller
0x02 0x00 Audio Controller
0x03 0x00 Voice Controller
0x04 0x00 Data Controller
0x10 0x00 0x00 Network and Computing Encrpytion/Decryption
0x10 0x00 Entertainment Encryption/Decryption
0x80 0x00 Other Encryption/Decryption
0x11 0x00 0x00 DPIO Modules
0x01 0x00 Performance Counters
0x10 0x00 Communications Syncrhonization Plus Time and Frequency Test/Measurment
0x20 0x00 Management Card
0x80 0x00 Other Data Acquisition/Signal Processing Controller
更新于:4个月前
赞一波!2

文章评论

评论问答