|
| | Xhci (Device *device) |
| |
| bool | initialiseController () |
| |
| void | getName (String &name) override |
| |
| bool | controllerAssignsAddresses () const override |
| |
| bool | supportsHubDevices () const override |
| |
| bool | prepareDevice (uint8_t address, const UsbEndpoint &endpoint) override |
| |
| bool | addressDevice (uint8_t address, const UsbEndpoint &endpoint) override |
| |
| bool | resetEndpoint (const UsbEndpoint &endpoint) override |
| |
| uintptr_t | createTransaction (UsbEndpoint endpoint) override |
| | Creates a new transaction with the given endpoint data.
|
| |
| void | addTransferToTransaction (uintptr_t transaction, bool toggle, UsbPid pid, uintptr_t buffer, size_t bytes) override |
| | Adds a new transfer to an existent transaction.
|
| |
| bool | doAsync (uintptr_t transaction, void(*callback)(uintptr_t, ssize_t)=nullptr, uintptr_t parameter=0) override |
| |
| void | cancelAsyncAndDrain (uintptr_t transaction, void(*callback)(uintptr_t, ssize_t), uintptr_t parameter) override |
| |
| bool | addInterruptInHandler (UsbEndpoint endpoint, uintptr_t buffer, uint16_t bytes, void(*callback)(uintptr_t, ssize_t), UsbInterruptInHandle &handle, uintptr_t parameter=0) override |
| | Adds an owned recurring interrupt-IN transaction.
|
| |
| bool | portReset (uint8_t port, bool errorResponse=false) override |
| | Gets a UsbDevice from a given vendor:product pair.
|
| |
| IrqDisposition | irq (irq_id_t) override |
| |
| | UsbHub (Device *p) |
| |
| RootConnection | rootConnectionForChild (uint8_t childPort) const |
| |
| virtual Type | getType () |
| |
| bool | deviceConnected (uint8_t nPort, UsbSpeed speed) |
| | Called when a device is connected to a port on the hub.
|
| |
| void | deviceDisconnected (uint8_t nPort) |
| | Called when a device is disconnected from a port on the hub.
|
| |
| ssize_t | doSync (uintptr_t nTransaction, uint32_t timeout=5000) |
| |
| | Device (Device *p) |
| |
| Device * | getParent () const |
| |
| void | setParent (Device *p) |
| |
| virtual const String & | getSpecificType () |
| |
| virtual void | setSpecificType (String str) |
| |
| void | setPciPosition (uint32_t bus, uint32_t device, uint32_t func) |
| |
| void | setPciIdentifiers (uint8_t classCode, uint8_t subclassCode, uint16_t vendorId, uint16_t deviceId, uint8_t progIf) |
| |
| void | setPciConfigHeader (const PciBus::ConfigSpace &space) |
| |
| PciBus::ConfigSpace | getPciConfigHeader () const |
| |
| uint8_t | getPciClassCode () |
| |
| uint8_t | getPciSubclassCode () |
| |
| uint16_t | getPciVendorId () |
| |
| uint16_t | getPciDeviceId () |
| |
| uint8_t | getPciProgInterface () |
| |
| uint32_t | getPciBusPosition () |
| |
| uint32_t | getPciDevicePosition () |
| |
| uint32_t | getPciFunctionNumber () |
| |
| virtual void | dump (String &str) |
| |
| virtual Vector< Address * > & | addresses () |
| |
| virtual uintptr_t | getInterruptNumber () |
| |
| virtual void | setInterruptNumber (uintptr_t n) |
| |
| void | addChild (Device *pDevice) |
| |
| Device * | getChild (size_t n) |
| |
| size_t | getNumChildren () |
| |
| void | removeChild (size_t n) |
| |
| void | removeChild (Device *d) |
| |
| void | replaceChild (Device *src, Device *dest) |
| |
| | RequestQueue (const String &name) |
| |
| virtual void | initialise () |
| |
| virtual void | destroy () |
| |
| MUST_USE_RESULT uint64_t | addRequest (size_t priority, uint64_t p1=0, uint64_t p2=0, uint64_t p3=0, uint64_t p4=0, uint64_t p5=0, uint64_t p6=0, uint64_t p7=0, uint64_t p8=0) |
| |
| MUST_USE_RESULT uint64_t | addRequest (size_t priority, ActionOnDuplicate action, uint64_t p1=0, uint64_t p2=0, uint64_t p3=0, uint64_t p4=0, uint64_t p5=0, uint64_t p6=0, uint64_t p7=0, uint64_t p8=0) |
| |
| uint64_t | addAsyncRequest (size_t priority, uint64_t p1=0, uint64_t p2=0, uint64_t p3=0, uint64_t p4=0, uint64_t p5=0, uint64_t p6=0, uint64_t p7=0, uint64_t p8=0) |
| |
| bool | canWaitForCompletion () |
| |
| MUST_USE_RESULT bool | waitForPreallocated (PreallocatedRequest &request) |
| |
| MUST_USE_RESULT PreallocatedPublishResult | publishPreallocated (PreallocatedRequest &request, size_t priority, uint64_t p1=0, uint64_t p2=0, uint64_t p3=0, uint64_t p4=0, uint64_t p5=0, uint64_t p6=0, uint64_t p7=0, uint64_t p8=0) |
| |
| MUST_USE_RESULT PreallocatedPublishResult | republishPreallocatedWhileReleasing (PreallocatedRequest &request, size_t priority, uint64_t p1=0, uint64_t p2=0, uint64_t p3=0, uint64_t p4=0, uint64_t p5=0, uint64_t p6=0, uint64_t p7=0, uint64_t p8=0) |
| |
| MUST_USE_RESULT bool | halt () |
| |
| MUST_USE_RESULT bool | resume () |
| |
| LifecycleState | getLifecycleState () |
| |
| bool | drain () |
| |
|
| void | releaseDeviceAddress (uint8_t address) override |
| |
| bool | cancelInterruptInAndDrain (const UsbInterruptInToken &, void(*)(uintptr_t, ssize_t), uintptr_t, bool producerAlreadyStopped) override |
| |
| bool | inInterruptCallbackContext () const override |
| |
| size_t | currentRootPortGeneration (size_t port) const override |
| |
| void | replaySuppressedConnectionChange (size_t port) override |
| |
| uint64_t | executeRequest (uint64_t port, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t generation) override |
| |
| void | cancelRequest (const Request &request) override |
| |
| virtual bool | beginStartupActivity () |
| |
| virtual void | endStartupActivity (UsbStartup::Outcome) |
| |
| MUST_USE_RESULT bool | publishInterruptInHandle (UsbInterruptInHandle &handle, const UsbInterruptInToken &token, void(*callback)(uintptr_t, ssize_t), uintptr_t parameter) |
| |
| void | disconnectAllDevices () |
| |
| void | retainDisconnectedAddressesUntilControllerTeardown () |
| |
| void | attachToUpstreamHub (UsbHub *upstream, const RootConnection &connection) |
| |
| UsbHub * | rootHub () const |
| |
| MUST_USE_RESULT bool | suppressConnectionChanges (size_t port, ConnectionChangeSuppression &suppression) |
| |
| MUST_USE_RESULT bool | deferConnectionChangeIfSuppressed (size_t port) |
| |
|
| NOT_COPYABLE_OR_ASSIGNABLE (Device) |
| |
Protected Member Functions inherited from IrqHandler |
| virtual | ~IrqHandler () |
| |
Protected Member Functions inherited from IrqHandlerBase |
| virtual | ~IrqHandlerBase () |
| |
| virtual bool | workerPlacement (ThreadPlacement &) const |
| |
|
| RequestQueue (const RequestQueue &) |
| |
|
void | operator= (const RequestQueue &) |
| |
| virtual bool | compareRequests (const Request &a, const Request &b) |
| |
| int | work () |
| |
| NextRequestResult | getNextRequest (Request *&request) |
| |
| bool | drainIntakeLocked (size_t priority) |
| |
| void | publishRequest (Request *request) |
| |
| Request * | findDuplicate (const Request &request) |
| |
| void | discardRequest (Request *request) |
| |
| uint64_t | addAsyncRequestInternal (size_t priority, uint64_t p1, uint64_t p2, uint64_t p3, uint64_t p4, uint64_t p5, uint64_t p6, uint64_t p7, uint64_t p8) |
| |
| PreallocatedPublishResult | publishPreallocatedRequest (PreallocatedRequest &request, PreallocatedRequest::State availableState, size_t priority, uint64_t p1, uint64_t p2, uint64_t p3, uint64_t p4, uint64_t p5, uint64_t p6, uint64_t p7, uint64_t p8) |
| |
| void | releasePreallocatedRequest (Request *request) |
| |
| void | invokeCancelRequest (const Request &request) |
| |
| bool | callbackActiveOnCurrentThread () const |
| |
| void | releaseRequest (Request *request) |
| |
| uint64_t | waitForRequest (Request *request) |
| |
| bool | startWorker () |
| |
| bool | stopWorker () |
| |
| void | closePreallocatedAdmission () |
| |
| void | waitForPreallocatedPublishers () |
| |
|
| uint32_t | read (size_t offset) const |
| |
| void | write (size_t offset, uint32_t value) |
| |
| void | write64 (size_t offset, uint64_t value) |
| |
| bool | wait (size_t offset, uint32_t mask, uint32_t expected, size_t milliseconds) |
| |
| bool | parseCapabilities (uint32_t hcc) |
| |
| bool | command (XhciHw::Trb trb, uint8_t *returnedSlot=nullptr) |
| |
| bool | collectEventsLocked (bool fromInterrupt) |
| |
| bool | transferEventLocked (const XhciHw::Trb &event) |
| |
| void | notifyPortLocked (size_t port) |
| |
| bool | halt () |
| |
| void | failLocked () |
| |
| void | shutdown () |
| |
| Endpoint * | ensureEndpoint (uint8_t slot, const UsbEndpoint &description) |
| |
| uint8_t | findSlot (const UsbEndpoint &endpoint) const |
| |
| uint32_t * | inputContext (size_t index) |
| |
| uint32_t * | outputContext (uint8_t slot, size_t index) |
| |
| bool | resetEndpointHardware (uint8_t slot, uint8_t dci, bool stop) |
| |
| bool | submitLocked (Transaction &transaction) |
| |
| bool | accept (uintptr_t transaction, void(*callback)(uintptr_t, ssize_t), uintptr_t parameter, UsbInterruptInHandle *handle) |
| |
| void | finishLocked (Transaction &transaction, ssize_t result, bool natural) |
| |
| void | enqueueDeliveryLocked (UsbHcd::CallbackDeliveryQueue::Record *delivery) |
| |
| void | freeTransactionLocked (uintptr_t transaction) |
| |
| void | cancelTransfer (uintptr_t transaction, size_t generation, bool recurring, void(*callback)(uintptr_t, ssize_t), uintptr_t parameter) |
| |
|
| enum | Type {
Generic
, Root
, Disk
, Bus
,
Display
, Network
, Sound
, Console
,
Mouse
, Controller
, UsbController
, UsbGeneric
,
UsbContainer
} |
| |
| typedef Device *(* | Callback) (Device *) |
| |
| enum class | OverrunStatus { Clear
, Armed
, Stalled
, Overloaded
} |
| |
| enum class | PreallocatedPublishResult {
Accepted
, TokenBusy
, QueueStopped
, QueueFull
,
InvalidPriority
} |
| |
| enum | ActionOnDuplicate { Block
, NewRequest
, ReturnImmediately
} |
| |
| enum class | LifecycleState { Stopped
, Accepting
, Stopping
, Destroyed
} |
| |
| static void | foreach (Callback callback, Device *root=0) |
| |
| template<class F , class... Args> |
| static void | foreach (pedigree_std::Callable< F > &callback, Device *root, Args... args) |
| |
| static void | addToRoot (Device *device) |
| |
| static void | searchByVendorId (uint16_t vendorId, void(*callback)(Device *), Device *root=0) |
| |
| static void | searchByVendorIdAndDeviceId (uint16_t vendorId, uint16_t deviceId, void(*callback)(Device *), Device *root=0) |
| |
| static void | searchByClass (uint16_t classCode, void(*callback)(Device *), Device *root=0) |
| |
| static void | searchByClassAndSubclass (uint16_t classCode, uint16_t subclassCode, void(*callback)(Device *), Device *root=0) |
| |
| static void | searchByClassSubclassAndProgInterface (uint16_t classCode, uint16_t subclassCode, uint8_t progInterface, void(*callback)(Device *), Device *root=0) |
| |
| enum class | NextRequestResult { Item
, Empty
, Retry
} |
| |
| static Device & | root () |
| |
| static int | trampoline (void *p) |
| |
| static void | completeRequest (Request *request, uint64_t returnValue, bool rejected) |
| |
| static void | retainRequest (Request *request) |
| |
| Vector< Address * > | m_Addresses |
| |
| Vector< Device * > | m_Children |
| |
| Device * | m_pParent |
| |
| uintptr_t | m_InterruptNumber |
| |
| String | m_SpecificType |
| |
| PciBus::ConfigSpace | m_ConfigHeader |
| |
| uint8_t | m_ClassCode |
| |
| uint8_t | m_SubclassCode |
| |
| uint16_t | m_VendorId |
| |
| uint16_t | m_DeviceId |
| |
| uint8_t | m_ProgInterface |
| |
| uint32_t | m_PciBusPos |
| |
| uint32_t | m_PciDevicePos |
| |
| uint32_t | m_PciFunctionNum |
| |
| IntakeLane | m_IntakeLanes [REQUEST_QUEUE_NUM_PRIORITIES] |
| |
| Request * | m_pRequestQueue [REQUEST_QUEUE_NUM_PRIORITIES] |
| |
| Request * | m_pRequestQueueTail [REQUEST_QUEUE_NUM_PRIORITIES] |
| |
| Request * | m_pActiveRequest |
| |
| Atomic< size_t > | m_State |
| |
| Mutex | m_LifecycleMutex |
| |
| WaitQueue | m_RequestQueueWaiters |
| |
| WaitQueue | m_WorkerWaiters |
| |
| Thread * | m_pThread |
| |
| Atomic< PerProcessorScheduler * > | m_pWorkerScheduler |
| |
| SchedulerWorkerWake | m_WorkerWake |
| |
| Atomic< size_t > | m_bWorkerReady |
| |
| Atomic< size_t > | m_bWorkerActive |
| |
| size_t | m_WorkerProgressGeneration |
| |
| RequestQueueOverrunChecker | m_OverrunChecker |
| |
| Timer * | m_pOverrunTimer |
| |
| Atomic< size_t > | m_PublicationState |
| |
| size_t | m_nMaxAsyncRequests |
| |
| Atomic< size_t > | m_nAsyncRequests |
| |
| Atomic< size_t > | m_nTotalRequests |
| |
| Atomic< size_t > | m_nActiveRequests |
| |
| NormalStaticString | m_Name |
| |
| static Device | m_Root |
| |
| static Mutex | m_TreeLock |
| |
| static constexpr size_t | PublicationClosed = static_cast<size_t>(1) << ((sizeof(size_t) * 8) - 1) |
| |
| static constexpr size_t | PublicationCountMask = ~PublicationClosed |
| |
Definition at line 16 of file Xhci.h.