Implant scratchpad buffer functions

This commit is contained in:
xj 2024-07-05 01:11:33 -07:00
parent d2164713b3
commit ab573e238e
2 changed files with 8 additions and 1 deletions

View File

@ -698,6 +698,7 @@ static int xhci_dcbaa_alloc ( struct xhci_host *xhci ) {
}
xhci->dcbaa_addr = dcbaap_addr;
xhci->dcbaa.context = (void *)dcbaap_phy;
#if 0
if ( ! xhci->dcbaa.context ) {
@ -707,7 +708,7 @@ static int xhci_dcbaa_alloc ( struct xhci_host *xhci ) {
}
#endif
memset ( xhci->dcbaa.context, 0, len );
memset ( (void *)xhci->dcbaa_addr, 0, len );
/* Program DCBAA pointer */
// dcbaap = (uintptr_t)( xhci->dcbaa.context );

View File

@ -75,6 +75,12 @@ struct xhci_scratchpad {
uintptr_t buffer;
/** Scratchpad array */
uint64_t *array;
/*
* vir_addr: Vitual address array. It holds all the virtual address of the pages allocated to xHCI scratchpad buffer.
* array_phy: Physical address of array.
*/
uint64_t *vir_addr;
uintptr_t array_phy;
};
/** An input control context */