6
Copyright (c) 1998 Intel Corporation
23
typedef UINT16 CHAR16;
25
typedef UINT8 BOOLEAN;
28
#define TRUE ((BOOLEAN) 1)
29
#define FALSE ((BOOLEAN) 0)
33
#define NULL ((VOID *) 0)
36
typedef UINTN EFI_STATUS;
37
typedef UINT64 EFI_LBA;
38
typedef UINTN EFI_TPL;
39
typedef VOID *EFI_HANDLE;
40
typedef VOID *EFI_EVENT;
44
// Prototype argument decoration for EFI parameters to indicate
47
// IN - argument is passed into the function
48
// OUT - argument (pointer) is returned from the function
49
// OPTIONAL - argument is optional
76
UINT16 Year; // 1998 - 20XX
77
UINT8 Month; // 1 - 12
80
UINT8 Minute; // 0 - 59
81
UINT8 Second; // 0 - 59
83
UINT32 Nanosecond; // 0 - 999,999,999
84
INT16 TimeZone; // -1440 to 1440 or 2047
89
// Bit definitions for EFI_TIME.Daylight
90
#define EFI_TIME_ADJUST_DAYLIGHT 0x01
91
#define EFI_TIME_IN_DAYLIGHT 0x02
93
// Value definition for EFI_TIME.TimeZone
94
#define EFI_UNSPECIFIED_TIMEZONE 0x07FF
118
typedef UINT64 EFI_PHYSICAL_ADDRESS;
119
typedef UINT64 EFI_VIRTUAL_ADDRESS;
128
//Preseve the attr on any range supplied.
129
//ConventialMemory must have WB,SR,SW when supplied.
130
//When allocating from ConventialMemory always make it WB,SR,SW
131
//When returning to ConventialMemory always make it WB,SR,SW
132
//When getting the memory map, or on RT for runtime types
136
EfiReservedMemoryType,
141
EfiRuntimeServicesCode,
142
EfiRuntimeServicesData,
143
EfiConventionalMemory,
145
EfiACPIReclaimMemory,
148
EfiMemoryMappedIOPortSpace,
153
// possible caching types for the memory range
154
#define EFI_MEMORY_UC 0x0000000000000001
155
#define EFI_MEMORY_WC 0x0000000000000002
156
#define EFI_MEMORY_WT 0x0000000000000004
157
#define EFI_MEMORY_WB 0x0000000000000008
158
#define EFI_MEMORY_UCE 0x0000000000000010
160
// physical memory protection on range
161
#define EFI_MEMORY_WP 0x0000000000001000
162
#define EFI_MEMORY_RP 0x0000000000002000
163
#define EFI_MEMORY_XP 0x0000000000004000
165
// range requires a runtime mapping
166
#define EFI_MEMORY_RUNTIME 0x8000000000000000
168
#define EFI_MEMORY_DESCRIPTOR_VERSION 1
170
UINT32 Type; // Field size is 32 bits followed by 32 bit pad
171
EFI_PHYSICAL_ADDRESS PhysicalStart; // Field size is 64 bits
172
EFI_VIRTUAL_ADDRESS VirtualStart; // Field size is 64 bits
173
UINT64 NumberOfPages; // Field size is 64 bits
174
UINT64 Attribute; // Field size is 64 bits
175
} EFI_MEMORY_DESCRIPTOR;
178
// International Language
181
typedef UINT8 ISO_639_2;
182
#define ISO_639_2_ENTRY_SIZE 3
188
#define EFI_PAGE_SIZE 4096
189
#define EFI_PAGE_MASK 0xFFF
190
#define EFI_PAGE_SHIFT 12
192
#define EFI_SIZE_TO_PAGES(a) \
193
( ((a) >> EFI_PAGE_SHIFT) + ((a) & EFI_PAGE_MASK ? 1 : 0) )