XenevaOS
Loading...
Searching...
No Matches
Classes | Macros | Functions
xhci.c File Reference
#include "xhci.h"
#include <stdbool.h>
#include <pcie.h>
#include <aucon.h>
#include <string.h>
#include <_null.h>
#include <Mm/pmmngr.h>
#include <Mm/vmmngr.h>
#include <Hal/AA64/aa64lowlevel.h>
#include <Hal/AA64/aa64cpu.h>
#include <Hal/AA64/gic.h>
#include <Drivers/uart.h>
Include dependency graph for xhci.c:

Classes

struct  Trb
 
struct  Ring
 

Macros

#define RING_N   256
 
#define TRB_LINK   6
 
#define TRB_ENABLE_SLOT   9
 
#define TRB_ADDR_DEV   11
 
#define TRB_CFG_EP   12
 
#define TRB_SETUP   2
 
#define TRB_DATA   3
 
#define TRB_STATUS   4
 
#define TRB_NORMAL   1
 
#define TRB_EVENT_XFER   32
 
#define TRB_EVENT_CMD   33
 
#define XCT_NONE   0 /* nothing connected on this port */
 
#define XCT_BT   1 /* bluetooth adapter claimed */
 
#define XCT_NOTBT   2 /* a device answered, but it is not a BT adapter */
 
#define XCT_FAIL   -1 /* enumeration error, worth one retry */
 

Functions

bool AuIsPCIeInitialized (void)
 
void AuXhciInitialize (void)
 

Macro Definition Documentation

◆ RING_N

#define RING_N   256

◆ TRB_ADDR_DEV

#define TRB_ADDR_DEV   11

◆ TRB_CFG_EP

#define TRB_CFG_EP   12

◆ TRB_DATA

#define TRB_DATA   3

◆ TRB_ENABLE_SLOT

#define TRB_ENABLE_SLOT   9

◆ TRB_EVENT_CMD

#define TRB_EVENT_CMD   33

◆ TRB_EVENT_XFER

#define TRB_EVENT_XFER   32

◆ TRB_LINK

#define TRB_LINK   6

◆ TRB_NORMAL

#define TRB_NORMAL   1

◆ TRB_SETUP

#define TRB_SETUP   2

◆ TRB_STATUS

#define TRB_STATUS   4

◆ XCT_BT

#define XCT_BT   1 /* bluetooth adapter claimed */

◆ XCT_FAIL

#define XCT_FAIL   -1 /* enumeration error, worth one retry */

◆ XCT_NONE

#define XCT_NONE   0 /* nothing connected on this port */

◆ XCT_NOTBT

#define XCT_NOTBT   2 /* a device answered, but it is not a BT adapter */

Function Documentation

◆ AuIsPCIeInitialized()

bool AuIsPCIeInitialized ( void  )
extern

BSD 2-Clause License

Copyright (c) 2022-2026, Manas Kamal Choudhury All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

◆ AuXhciInitialize()

void AuXhciInitialize ( void  )