TianoCore EDK2 master
|
#include "Uhci.h"
Go to the source code of this file.
Functions | |
USBHC_MEM_BLOCK * | UsbHcAllocMemBlock (IN USBHC_MEM_POOL *Pool, IN UINTN Pages) |
VOID | UsbHcFreeMemBlock (IN USBHC_MEM_POOL *Pool, IN USBHC_MEM_BLOCK *Block) |
VOID * | UsbHcAllocMemFromBlock (IN USBHC_MEM_BLOCK *Block, IN UINTN Units) |
EFI_PHYSICAL_ADDRESS | UsbHcGetPciAddressForHostMem (IN USBHC_MEM_POOL *Pool, IN VOID *Mem, IN UINTN Size) |
VOID | UsbHcInsertMemBlockToPool (IN USBHC_MEM_BLOCK *Head, IN USBHC_MEM_BLOCK *Block) |
BOOLEAN | UsbHcIsMemBlockEmpty (IN USBHC_MEM_BLOCK *Block) |
VOID | UsbHcUnlinkMemBlock (IN USBHC_MEM_BLOCK *Head, IN USBHC_MEM_BLOCK *BlockToUnlink) |
USBHC_MEM_POOL * | UsbHcInitMemPool (IN EFI_PCI_IO_PROTOCOL *PciIo, IN BOOLEAN Check4G, IN UINT32 Which4G) |
EFI_STATUS | UsbHcFreeMemPool (IN USBHC_MEM_POOL *Pool) |
VOID * | UsbHcAllocateMem (IN USBHC_MEM_POOL *Pool, IN UINTN Size) |
VOID | UsbHcFreeMem (IN USBHC_MEM_POOL *Pool, IN VOID *Mem, IN UINTN Size) |
The routine procedure for uhci memory allocate/free.
Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file UsbHcMem.c.
VOID * UsbHcAllocateMem | ( | IN USBHC_MEM_POOL * | Pool, |
IN UINTN | Size | ||
) |
Allocate some memory from the host controller's memory pool which can be used to communicate with host controller.
Pool | The host controller's memory pool. |
Size | Size of the memory to allocate. |
Definition at line 419 of file UsbHcMem.c.
USBHC_MEM_BLOCK * UsbHcAllocMemBlock | ( | IN USBHC_MEM_POOL * | Pool, |
IN UINTN | Pages | ||
) |
Allocate a block of memory to be used by the buffer pool.
Pool | The buffer pool to allocate memory for. |
Pages | How many pages to allocate. |
Definition at line 22 of file UsbHcMem.c.
VOID * UsbHcAllocMemFromBlock | ( | IN USBHC_MEM_BLOCK * | Block, |
IN UINTN | Units | ||
) |
Alloc some memory from the block.
Block | The memory block to allocate memory from. |
Units | Number of memory units to allocate. |
Definition at line 152 of file UsbHcMem.c.
VOID UsbHcFreeMem | ( | IN USBHC_MEM_POOL * | Pool, |
IN VOID * | Mem, | ||
IN UINTN | Size | ||
) |
Free the allocated memory back to the memory pool.
Pool | The memory pool of the host controller. |
Mem | The memory to free. |
Size | The size of the memory to free. |
Definition at line 493 of file UsbHcMem.c.
VOID UsbHcFreeMemBlock | ( | IN USBHC_MEM_POOL * | Pool, |
IN USBHC_MEM_BLOCK * | Block | ||
) |
Free the memory block from the memory pool.
Pool | The memory pool to free the block from. |
Block | The memory block to free. |
Definition at line 120 of file UsbHcMem.c.
EFI_STATUS UsbHcFreeMemPool | ( | IN USBHC_MEM_POOL * | Pool | ) |
Release the memory management pool.
Pool | The USB memory pool to free. |
Definition at line 385 of file UsbHcMem.c.
EFI_PHYSICAL_ADDRESS UsbHcGetPciAddressForHostMem | ( | IN USBHC_MEM_POOL * | Pool, |
IN VOID * | Mem, | ||
IN UINTN | Size | ||
) |
Calculate the corresponding pci bus address according to the Mem parameter.
Pool | The memory pool of the host controller. |
Mem | The pointer to host memory. |
Size | The size of the memory region. |
Definition at line 223 of file UsbHcMem.c.
USBHC_MEM_POOL * UsbHcInitMemPool | ( | IN EFI_PCI_IO_PROTOCOL * | PciIo, |
IN BOOLEAN | Check4G, | ||
IN UINT32 | Which4G | ||
) |
Initialize the memory management pool for the host controller.
PciIo | The PciIo that can be used to access the host controller. |
Check4G | Whether the host controller requires allocated memory from one 4G address space. |
Which4G | The 4G memory area each memory allocated should be from. |
Definition at line 348 of file UsbHcMem.c.
VOID UsbHcInsertMemBlockToPool | ( | IN USBHC_MEM_BLOCK * | Head, |
IN USBHC_MEM_BLOCK * | Block | ||
) |
Insert the memory block to the pool's list of the blocks.
Head | The head of the memory pool's block list. |
Block | The memory block to insert. |
Definition at line 274 of file UsbHcMem.c.
BOOLEAN UsbHcIsMemBlockEmpty | ( | IN USBHC_MEM_BLOCK * | Block | ) |
Is the memory block empty?
Block | The memory block to check. |
Definition at line 294 of file UsbHcMem.c.
VOID UsbHcUnlinkMemBlock | ( | IN USBHC_MEM_BLOCK * | Head, |
IN USBHC_MEM_BLOCK * | BlockToUnlink | ||
) |
Unlink the memory block from the pool's list.
Head | The block list head of the memory's pool. |
BlockToUnlink | The memory block to unlink. |
Definition at line 317 of file UsbHcMem.c.