const XHCI_PCI_CLASS
pub const XHCI_PCI_CLASS = 0x0CPurpose
PCI Class/Subclass/ProgIF for xHCI
#core/xhciStandard library package `#core/xhci`.
const XHCI_PCI_CLASSpub const XHCI_PCI_CLASS = 0x0CPCI Class/Subclass/ProgIF for xHCI
const XHCI_PCI_SUBCLASSpub const XHCI_PCI_SUBCLASS = 0x03Constant XHCI_PCI_SUBCLASS, defining protocol or algorithm parameters.
const XHCI_PCI_PROGIFpub const XHCI_PCI_PROGIF = 0x30Constant XHCI_PCI_PROGIF, defining protocol or algorithm parameters.
const XHCI_USBCMD_RSpub const XHCI_USBCMD_RS = 0x1USBCMD Register Bits
const XHCI_USBCMD_HCRSTpub const XHCI_USBCMD_HCRST = 0x2Constant XHCI_USBCMD_HCRST, defining protocol or algorithm parameters.
const XHCI_USBCMD_INTEpub const XHCI_USBCMD_INTE = 0x4Constant XHCI_USBCMD_INTE, defining protocol or algorithm parameters.
const XHCI_USBSTS_HCHpub const XHCI_USBSTS_HCH = 0x1USBSTS Register Bits
const XHCI_USBSTS_CNRpub const XHCI_USBSTS_CNR = 0x800Constant XHCI_USBSTS_CNR, defining protocol or algorithm parameters.
const XHCI_TRB_TYPE_SHIFTpub const XHCI_TRB_TYPE_SHIFT = 10TRB Control & Type Constants
const XHCI_TRB_LINKpub const XHCI_TRB_LINK = 6Constant XHCI_TRB_LINK, defining protocol or algorithm parameters.
const XHCI_TRB_ENABLE_SLOTpub const XHCI_TRB_ENABLE_SLOT = 9Constant XHCI_TRB_ENABLE_SLOT, defining protocol or algorithm parameters.
const XHCI_TRB_DISABLE_SLOTpub const XHCI_TRB_DISABLE_SLOT = 10Constant XHCI_TRB_DISABLE_SLOT, defining protocol or algorithm parameters.
const XHCI_TRB_ADDRESS_DEVICEpub const XHCI_TRB_ADDRESS_DEVICE = 11Constant XHCI_TRB_ADDRESS_DEVICE, defining protocol or algorithm parameters.
const XHCI_TRB_NOOP_CMDpub const XHCI_TRB_NOOP_CMD = 23Constant XHCI_TRB_NOOP_CMD, defining protocol or algorithm parameters.
const XHCI_TRB_CMD_COMPLETIONpub const XHCI_TRB_CMD_COMPLETION = 33Constant XHCI_TRB_CMD_COMPLETION, defining protocol or algorithm parameters.
const XHCI_TRB_PORT_STATUS_CHANGEpub const XHCI_TRB_PORT_STATUS_CHANGE = 34Constant XHCI_TRB_PORT_STATUS_CHANGE, defining protocol or algorithm parameters.
const XHCI_CC_SUCCESSpub const XHCI_CC_SUCCESS = 1Completion Codes
const XHCI_PORTSC_CCSpub const XHCI_PORTSC_CCS = 0x1PORTSC Register Bits
const XHCI_PORTSC_PEDpub const XHCI_PORTSC_PED = 0x2Constant XHCI_PORTSC_PED, defining protocol or algorithm parameters.
const XHCI_CMD_RING_TRBSpub const XHCI_CMD_RING_TRBS = 64Ring sizes (each 64 * 16 = 1024 bytes, fitting comfortably in a 4 KiB page)
const XHCI_EVT_RING_TRBSpub const XHCI_EVT_RING_TRBS = 64Constant XHCI_EVT_RING_TRBS, defining protocol or algorithm parameters.
const XHCI_DMA_MIN_BYTESpub const XHCI_DMA_MIN_BYTES = 16384Constant XHCI_DMA_MIN_BYTES, defining protocol or algorithm parameters.
struct XhciTrbpub struct XhciTrb {
pub param u64
pub status u32
pub control u32
}Structure encapsulating param, status, control.
param u64status u32control u32struct XhciErstEntrypub struct XhciErstEntry {
pub ring_base u64
pub ring_size u32
pub reserved u32
}Structure encapsulating ring_base, ring_size, reserved.
ring_base u64ring_size u32reserved u32struct XhciControllerpub struct XhciController {
pub mmio_base u64
pub op_base u64
pub rt_base u64
pub db_base u64
pub hci_version u16
pub max_slots u8
pub max_ports u8
pub dcbaa_pa u64
pub cmd_ring_pa u64
pub evt_ring_pa u64
pub erst_pa u64
pub cmd_enq u32
pub cmd_cycle u8
pub evt_deq u32
pub evt_cycle u8
}Structure encapsulating mmio_base, op_base, rt_base, db_base, hci_version.
mmio_base u64op_base u64rt_base u64db_base u64hci_version u16max_slots u8max_ports u8dcbaa_pa u64cmd_ring_pa u64evt_ring_pa u64erst_pa u64cmd_enq u32cmd_cycle u8evt_deq u32evt_cycle u8xhci_trb_makepub fn xhci_trb_make(param u64, status u32, trb_type u32, slot_id u8, cycle bool) XhciTrbXhci trb make.
param u64status u32trb_type u32slot_id u8cycle boolXhciTrb — a value of this type
xhci_trb_typepub fn xhci_trb_type(ctrl u32) u32Xhci trb type.
ctrl u32u32 — a value of this type
xhci_trb_ccpub fn xhci_trb_cc(status u32) u8Xhci trb cc.
status u32u8 — a value of this type
xhci_trb_slotpub fn xhci_trb_slot(ctrl u32) u8Xhci trb slot.
ctrl u32u8 — a value of this type
xhci_find_pcipub fn xhci_find_pci(out *raw pci.PciDevice) boolXhci find pci.
out *raw pci.PciDevicebool — true or false
xhci_controller_initpub fn xhci_controller_init(ctrl *raw XhciController, mmio_base u64, dma_base u64, dma_bytes u64) boolXhci controller init.
ctrl *raw XhciControllermmio_base u64dma_base u64dma_bytes u64bool — true or false
xhci_submit_cmdpub fn xhci_submit_cmd( ctrl *raw XhciController, trb_type u32, param u64, slot_id u8, out_cc *raw u8, out_slot *raw u8 ) boolXhci submit cmd.
ctrl *raw XhciControllertrb_type u32param u64slot_id u8out_cc *raw u8out_slot *raw u8bool — true or false
xhci_nooppub fn xhci_noop(ctrl *raw XhciController) boolXhci noop.
ctrl *raw XhciControllerbool — true or false
xhci_enable_slotpub fn xhci_enable_slot(ctrl *raw XhciController, out_slot *raw u8) boolXhci enable slot.
ctrl *raw XhciControllerout_slot *raw u8bool — true or false
xhci_port_scpub fn xhci_port_sc(ctrl *raw XhciController, port_1based u32) u32Xhci port sc.
ctrl *raw XhciControllerport_1based u32u32 — a value of this type
xhci_port_connectedpub fn xhci_port_connected(ctrl *raw XhciController, port_1based u32) boolXhci port connected.
ctrl *raw XhciControllerport_1based u32bool — true or false
xhci_port_speedpub fn xhci_port_speed(ctrl *raw XhciController, port_1based u32) u8Xhci port speed.
ctrl *raw XhciControllerport_1based u32u8 — a value of this type