TianoCore EDK2 master
Loading...
Searching...
No Matches
UsbHcMem.h File Reference
#include <Uefi.h>
#include <IndustryStandard/Pci22.h>

Go to the source code of this file.

Data Structures

struct  _USBHC_MEM_BLOCK
 
struct  _USBHC_MEM_POOL
 

Macros

#define USB_HC_BIT(a)   ((UINTN)(1 << (a)))
 
#define USB_HC_BIT_IS_SET(Data, Bit)    ((BOOLEAN)(((Data) & USB_HC_BIT(Bit)) == USB_HC_BIT(Bit)))
 
#define USB_HC_HIGH_32BIT(Addr64)    ((UINT32)(RShiftU64((UINTN)(Addr64), 32) & 0XFFFFFFFF))
 
#define USBHC_MEM_UNIT   64
 
#define USBHC_MEM_UNIT_MASK   (USBHC_MEM_UNIT - 1)
 
#define USBHC_MEM_DEFAULT_PAGES   16
 
#define USBHC_MEM_ROUND(Len)   (((Len) + USBHC_MEM_UNIT_MASK) & (~USBHC_MEM_UNIT_MASK))
 
#define NEXT_BIT(Byte, Bit)
 

Typedefs

typedef struct _USBHC_MEM_BLOCK USBHC_MEM_BLOCK
 
typedef struct _USBHC_MEM_POOL USBHC_MEM_POOL
 

Functions

EFI_PHYSICAL_ADDRESS UsbHcGetPciAddressForHostMem (IN USBHC_MEM_POOL *Pool, IN VOID *Mem, IN UINTN Size)
 

Detailed Description

Private Header file for Usb Host Controller PEIM

Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file UsbHcMem.h.

Macro Definition Documentation

◆ NEXT_BIT

#define NEXT_BIT (   Byte,
  Bit 
)
Value:
do { \
(Bit)++; \
if ((Bit) > 7) { \
(Byte)++; \
(Bit) = 0; \
} \
} while (0)

Definition at line 60 of file UsbHcMem.h.

◆ USB_HC_BIT

#define USB_HC_BIT (   a)    ((UINTN)(1 << (a)))

Definition at line 16 of file UsbHcMem.h.

◆ USB_HC_BIT_IS_SET

#define USB_HC_BIT_IS_SET (   Data,
  Bit 
)     ((BOOLEAN)(((Data) & USB_HC_BIT(Bit)) == USB_HC_BIT(Bit)))

Definition at line 18 of file UsbHcMem.h.

◆ USB_HC_HIGH_32BIT

#define USB_HC_HIGH_32BIT (   Addr64)     ((UINT32)(RShiftU64((UINTN)(Addr64), 32) & 0XFFFFFFFF))

Definition at line 21 of file UsbHcMem.h.

◆ USBHC_MEM_DEFAULT_PAGES

#define USBHC_MEM_DEFAULT_PAGES   16

Definition at line 53 of file UsbHcMem.h.

◆ USBHC_MEM_ROUND

#define USBHC_MEM_ROUND (   Len)    (((Len) + USBHC_MEM_UNIT_MASK) & (~USBHC_MEM_UNIT_MASK))

Definition at line 55 of file UsbHcMem.h.

◆ USBHC_MEM_UNIT

#define USBHC_MEM_UNIT   64

Definition at line 50 of file UsbHcMem.h.

◆ USBHC_MEM_UNIT_MASK

#define USBHC_MEM_UNIT_MASK   (USBHC_MEM_UNIT - 1)

Definition at line 52 of file UsbHcMem.h.

Typedef Documentation

◆ USBHC_MEM_BLOCK

Definition at line 24 of file UsbHcMem.h.

Function Documentation

◆ UsbHcGetPciAddressForHostMem()

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.

Parameters
PoolThe memory pool of the host controller.
MemThe pointer to host memory.
SizeThe size of the memory region.
Returns
the pci memory address

Definition at line 223 of file UsbHcMem.c.