Document xHCI port registers

This commit is contained in:
Josh Holtrop 2023-09-23 19:28:35 -04:00
parent 0ae3c6c96d
commit eb0a4b2a4d

View File

@ -203,12 +203,54 @@ struct XHCI
/** /**
* Located at offset 0x400 from start of Operational Registers. * Located at offset 0x400 from start of Operational Registers.
*
* There is one set of these registers for each port of the root hub.
*/ */
struct PortRegisters struct PortRegisters
{ {
/**
* Port Status and Control
*
* 0 Current Connect Status
* 1 Port Enabled/Disabled
* 2 reserved
* 3 Over-current active
* 4 Port Reset
* 8:5 Port Link State
* 9 Port Power
* 13:10 Port Speed
* 15:14 Port Indicator Control
* 16 Port Link State Write Strobe
* 17 Connect Status Change
* 18 Port Enable/Disable Change
* 19 Warm Port Reset Change
* 20 Over-current Change
* 21 Port Reset Change
* 22 Port Link State Change
* 23 Port Config Error Change
* 24 Cold Attach Status
* 25 Wake on Connect Enable
* 26 Wake on Disconnect Enable
* 27 Wake on Over-current Enable
* 29:28 reserved
* 30 Device Removable
* 31 Warm Port Reset
*/
uint portsc; uint portsc;
/**
* Port Power Management Status and Control
*/
uint portpmsc; uint portpmsc;
/**
* Port Link Info
*/
uint portli; uint portli;
/**
* Port Hardware LPM Control (xHCI v1.1+)
*/
uint porthlpmc; uint porthlpmc;
} }
static assert(PortRegisters.sizeof == 0x10u); static assert(PortRegisters.sizeof == 0x10u);