Add EFI-related status codes and definitions
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
2022-07-29 08:49:52 +02:00
parent 075c4650cf
commit c2eea0e6b5
3 changed files with 53 additions and 0 deletions

View File

@@ -39,6 +39,9 @@
/* Macro for accessing the base address of a structure from a structure member */
#define CONTAIN_RECORD(Address, Type, Field) ((Type *)(((ULONG_PTR)Address) - (ULONG_PTR)(&(((Type *)0)->Field))))
/* EFI size to pages conversion macro */
#define EFI_SIZE_TO_PAGES(Size) (((Size) >> EFI_PAGE_SHIFT) + (((Size) & EFI_PAGE_MASK) ? 1 : 0))
/* Macro for calculating byte offset of a field in the structure */
#define FIELD_OFFSET(Structure, Field) ((LONG)(LONG_PTR)&(((Structure *)0)->Field))