OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
fsw_efi_base.h File Reference

Go to the source code of this file.

Macros

#define FSW_LITTLE_ENDIAN   (1)
 
#define fsw_alloc(size, ptrptr)
 
#define fsw_free(ptr)
 
#define fsw_memzero(dest, size)
 
#define fsw_memcpy(dest, src, size)
 
#define fsw_memeq(p1, p2, size)
 
#define FSW_MSGSTR(s)
 
#define FSW_MSGFUNC(params)
 
#define FSW_U64_SHR(val, shiftbits)
 
#define FSW_U64_DIV(val, divisor)
 

Typedefs

typedef INT8 fsw_s8
 
typedef UINT8 fsw_u8
 
typedef INT16 fsw_s16
 
typedef UINT16 fsw_u16
 
typedef INT32 fsw_s32
 
typedef UINT32 fsw_u32
 
typedef INT64 fsw_s64
 
typedef UINT64 fsw_u64
 

Detailed Description

Base definitions for the EFI host environment.

Definition in file fsw_efi_base.h.

Macro Definition Documentation

◆ fsw_alloc

#define fsw_alloc ( size,
ptrptr )
Value:
(((*(ptrptr) = AllocatePool(size)) == NULL) ? FSW_OUT_OF_MEMORY : FSW_SUCCESS)
UINT32 size
@ FSW_SUCCESS
Definition fsw_core.h:159
@ FSW_OUT_OF_MEMORY
Definition fsw_core.h:160

Allocate memory on the heap. This function or macro allocates size bytes of memory using host-specific methods. The address of the allocated memory block is stored into the pointer variable pointed to by ptrptr. A status code is returned; FSW_SUCCESS if the block was allocated or FSW_OUT_OF_MEMORY if there is not enough memory to allocated the requested block.

Definition at line 61 of file fsw_efi_base.h.

◆ fsw_free

#define fsw_free ( ptr)
Value:
FreePool(ptr)

Release allocated memory. This function or macro returns an allocated memory block to the heap for reuse. Does not return a status.

Definition at line 62 of file fsw_efi_base.h.

◆ FSW_LITTLE_ENDIAN

#define FSW_LITTLE_ENDIAN   (1)

Definition at line 44 of file fsw_efi_base.h.

◆ fsw_memcpy

#define fsw_memcpy ( dest,
src,
size )
Value:
CopyMem(dest,src,size)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)

Copies a block of memory from src to dest. The two memory blocks must not overlap, or the result of the operation will be undefined. Does not return a status.

Definition at line 67 of file fsw_efi_base.h.

◆ fsw_memeq

#define fsw_memeq ( p1,
p2,
size )
Value:
(CompareMem(p1,p2,size) == 0)
INTN EFIAPI CompareMem(IN CONST VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)

Compares two blocks of memory for equality. Returns boolean true if the memory blocks are equal, boolean false if they are different.

Definition at line 68 of file fsw_efi_base.h.

◆ fsw_memzero

#define fsw_memzero ( dest,
size )
Value:
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)

Initializes a block of memory with zeros. Does not return a status.

Definition at line 66 of file fsw_efi_base.h.

◆ FSW_MSGFUNC

#define FSW_MSGFUNC ( params)
Value:
DEBUG(params)

Definition at line 73 of file fsw_efi_base.h.

◆ FSW_MSGSTR

#define FSW_MSGSTR ( s)
Value:
DEBUG_INFO, s

Definition at line 72 of file fsw_efi_base.h.

◆ FSW_U64_DIV

#define FSW_U64_DIV ( val,
divisor )
Value:
DivU64x32((val), (divisor), NULL)
#define DivU64x32(x, y, z)

Definition at line 78 of file fsw_efi_base.h.

◆ FSW_U64_SHR

#define FSW_U64_SHR ( val,
shiftbits )
Value:
RShiftU64((val), (shiftbits))
UINT64 EFIAPI RShiftU64(IN UINT64 Operand, IN UINTN Count)
Definition UserMath.c:86

Definition at line 77 of file fsw_efi_base.h.

Typedef Documentation

◆ fsw_s16

typedef INT16 fsw_s16

Signed 16-bit integer.

Definition at line 51 of file fsw_efi_base.h.

◆ fsw_s32

typedef INT32 fsw_s32

Signed 32-bit integer.

Definition at line 53 of file fsw_efi_base.h.

◆ fsw_s64

typedef INT64 fsw_s64

Signed 64-bit integer.

Definition at line 55 of file fsw_efi_base.h.

◆ fsw_s8

typedef INT8 fsw_s8

Signed 8-bit integer.

Definition at line 49 of file fsw_efi_base.h.

◆ fsw_u16

typedef UINT16 fsw_u16

Unsigned 16-bit integer.

Definition at line 52 of file fsw_efi_base.h.

◆ fsw_u32

typedef UINT32 fsw_u32

Unsigned 32-bit integer.

Definition at line 54 of file fsw_efi_base.h.

◆ fsw_u64

typedef UINT64 fsw_u64

Unsigned 64-bit integer.

Definition at line 56 of file fsw_efi_base.h.

◆ fsw_u8

typedef UINT8 fsw_u8

Unsigned 8-bit integer.

Definition at line 50 of file fsw_efi_base.h.