mirror of
https://xff.cz/git/u-boot/
synced 2025-10-27 16:43:32 +01:00
efi_loader: use an enum for the memory allocation types
For type checking we need an enum. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
@@ -125,6 +125,34 @@ struct efi_table_hdr {
|
|||||||
u32 reserved;
|
u32 reserved;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Allocation types for calls to boottime->allocate_pages*/
|
||||||
|
/**
|
||||||
|
* enum efi_allocate_type - address restriction for memory allocation
|
||||||
|
*/
|
||||||
|
enum efi_allocate_type {
|
||||||
|
/**
|
||||||
|
* @EFI_ALLOCATE_ANY_PAGES:
|
||||||
|
* Allocate any block of sufficient size. Ignore memory address.
|
||||||
|
*/
|
||||||
|
EFI_ALLOCATE_ANY_PAGES,
|
||||||
|
/**
|
||||||
|
* @EFI_ALLOCATE_MAX_ADDRESS:
|
||||||
|
* Allocate a memory block with an uppermost address less or equal
|
||||||
|
* to the indicated address.
|
||||||
|
*/
|
||||||
|
EFI_ALLOCATE_MAX_ADDRESS,
|
||||||
|
/**
|
||||||
|
* @EFI_ALLOCATE_ADDRESS:
|
||||||
|
* Allocate a memory block starting at the indicatged adress.
|
||||||
|
*/
|
||||||
|
EFI_ALLOCATE_ADDRESS,
|
||||||
|
/**
|
||||||
|
* @EFI_MAX_ALLOCATE_TYPE:
|
||||||
|
* Value use for range checking.
|
||||||
|
*/
|
||||||
|
EFI_MAX_ALLOCATE_TYPE,
|
||||||
|
};
|
||||||
|
|
||||||
/* Enumeration of memory types introduced in UEFI */
|
/* Enumeration of memory types introduced in UEFI */
|
||||||
enum efi_mem_type {
|
enum efi_mem_type {
|
||||||
EFI_RESERVED_MEMORY_TYPE,
|
EFI_RESERVED_MEMORY_TYPE,
|
||||||
@@ -224,12 +252,6 @@ struct efi_mem_desc {
|
|||||||
|
|
||||||
#define EFI_MEMORY_DESCRIPTOR_VERSION 1
|
#define EFI_MEMORY_DESCRIPTOR_VERSION 1
|
||||||
|
|
||||||
/* Allocation types for calls to boottime->allocate_pages*/
|
|
||||||
#define EFI_ALLOCATE_ANY_PAGES 0
|
|
||||||
#define EFI_ALLOCATE_MAX_ADDRESS 1
|
|
||||||
#define EFI_ALLOCATE_ADDRESS 2
|
|
||||||
#define EFI_MAX_ALLOCATE_TYPE 3
|
|
||||||
|
|
||||||
/* Types and defines for Time Services */
|
/* Types and defines for Time Services */
|
||||||
#define EFI_TIME_ADJUST_DAYLIGHT 0x1
|
#define EFI_TIME_ADJUST_DAYLIGHT 0x1
|
||||||
#define EFI_TIME_IN_DAYLIGHT 0x2
|
#define EFI_TIME_IN_DAYLIGHT 0x2
|
||||||
|
|||||||
Reference in New Issue
Block a user