xhci: Check and report interface version
* We could also check to make sure it isn't 0xffff and bail if it is... not really a solution but helps prevent kdl's if our mapped memory is corrupted. * That seems like more of a hack though, i'd like to solve the real problem.
This commit is contained in:
@@ -185,6 +185,8 @@ XHCI::XHCI(pci_info *info, Stack *stack)
|
|||||||
TRACE("mapped runtime registers: 0x%p\n", fRuntimeRegisters);
|
TRACE("mapped runtime registers: 0x%p\n", fRuntimeRegisters);
|
||||||
TRACE("mapped doorbell registers: 0x%p\n", fDoorbellRegisters);
|
TRACE("mapped doorbell registers: 0x%p\n", fDoorbellRegisters);
|
||||||
|
|
||||||
|
TRACE("interface version: 0x%04" B_PRIx32 "\n",
|
||||||
|
HCI_VERSION(ReadCapReg32(XHCI_HCI_VERSION)));
|
||||||
TRACE("structural parameters1: 0x%08" B_PRIx32 "\n",
|
TRACE("structural parameters1: 0x%08" B_PRIx32 "\n",
|
||||||
ReadCapReg32(XHCI_HCSPARAMS1));
|
ReadCapReg32(XHCI_HCSPARAMS1));
|
||||||
TRACE("structural parameters2: 0x%08" B_PRIx32 "\n",
|
TRACE("structural parameters2: 0x%08" B_PRIx32 "\n",
|
||||||
@@ -195,6 +197,7 @@ XHCI::XHCI(pci_info *info, Stack *stack)
|
|||||||
ReadCapReg32(XHCI_HCCPARAMS));
|
ReadCapReg32(XHCI_HCCPARAMS));
|
||||||
|
|
||||||
uint32 cparams = ReadCapReg32(XHCI_HCCPARAMS);
|
uint32 cparams = ReadCapReg32(XHCI_HCCPARAMS);
|
||||||
|
|
||||||
uint32 eec = 0xffffffff;
|
uint32 eec = 0xffffffff;
|
||||||
uint32 eecp = HCS0_XECP(cparams) << 2;
|
uint32 eecp = HCS0_XECP(cparams) << 2;
|
||||||
for (; eecp != 0 && XECP_NEXT(eec); eecp += XECP_NEXT(eec) << 2) {
|
for (; eecp != 0 && XECP_NEXT(eec); eecp += XECP_NEXT(eec) << 2) {
|
||||||
|
|||||||
@@ -28,7 +28,8 @@
|
|||||||
// Host Controller Capability Registers
|
// Host Controller Capability Registers
|
||||||
#define XHCI_HCI_CAPLENGTH 0x00 // HCI Capability Register Length
|
#define XHCI_HCI_CAPLENGTH 0x00 // HCI Capability Register Length
|
||||||
#define HCI_CAPLENGTH(p) (((p) >> 0) & 0xff)
|
#define HCI_CAPLENGTH(p) (((p) >> 0) & 0xff)
|
||||||
#define HCI_VERSION(p) (((p) >> 16) & 0xffff) // HCI Version
|
#define XHCI_HCI_VERSION 0x02 // HCI Interface Version Number
|
||||||
|
#define HCI_VERSION(p) (((p) >> 0) & 0xffff)
|
||||||
#define XHCI_HCSPARAMS1 0x04 // Structural Parameters 1
|
#define XHCI_HCSPARAMS1 0x04 // Structural Parameters 1
|
||||||
// HCSPARAMS1
|
// HCSPARAMS1
|
||||||
#define HCS_MAX_SLOTS(p) (((p) >> 0) & 0xff)
|
#define HCS_MAX_SLOTS(p) (((p) >> 0) & 0xff)
|
||||||
|
|||||||
Reference in New Issue
Block a user