| author | |
| committer | |
| log | 8db41b7adbd0d1112a914d05ed94e9b55cfaf2db |
| tree | 21855726b7f876913df3813eafdb77126bdc9f39 |
| parent | 03abc6edf450cfa6a55a3d416def44595a19a453 |
| signature | Commit is signed but in an unrecognized format. |
2 files changed, 44 insertions(+), 1 deletions(-)
std/os/uefi/tables.zig+1| ... | @@ -1,6 +1,7 @@ | ... | @@ -1,6 +1,7 @@ |
| 1 | pub const BootServices = @import("tables/boot_services.zig").BootServices; | 1 | pub const BootServices = @import("tables/boot_services.zig").BootServices; |
| 2 | pub const ConfigurationTable = @import("tables/configuration_table.zig").ConfigurationTable; | 2 | pub const ConfigurationTable = @import("tables/configuration_table.zig").ConfigurationTable; |
| 3 | pub const global_variable align(8) = @import("tables/runtime_services.zig").global_variable; | 3 | pub const global_variable align(8) = @import("tables/runtime_services.zig").global_variable; |
| 4 | pub const MemoryDescriptor = @import("tables/boot_services.zig").MemoryDescriptor; | ||
| 4 | pub const ResetType = @import("tables/runtime_services.zig").ResetType; | 5 | pub const ResetType = @import("tables/runtime_services.zig").ResetType; |
| 5 | pub const RuntimeServices = @import("tables/runtime_services.zig").RuntimeServices; | 6 | pub const RuntimeServices = @import("tables/runtime_services.zig").RuntimeServices; |
| 6 | pub const SystemTable = @import("tables/system_table.zig").SystemTable; | 7 | pub const SystemTable = @import("tables/system_table.zig").SystemTable; |
std/os/uefi/tables/boot_services.zig+43-1| ... | @@ -20,7 +20,7 @@ pub const BootServices = extern struct { | ... | @@ -20,7 +20,7 @@ pub const BootServices = extern struct { |
| 20 | restoreTpl: usize, // TODO | 20 | restoreTpl: usize, // TODO |
| 21 | allocatePages: usize, // TODO | 21 | allocatePages: usize, // TODO |
| 22 | freePages: usize, // TODO | 22 | freePages: usize, // TODO |
| 23 | getMemoryMap: usize, // TODO | 23 | getMemoryMap: extern fn (*usize, [*]MemoryDescriptor, *usize, *usize, *u32) usize, |
| 24 | allocatePool: usize, // TODO | 24 | allocatePool: usize, // TODO |
| 25 | freePool: usize, // TODO | 25 | freePool: usize, // TODO |
| 26 | createEvent: extern fn (u32, usize, ?extern fn (Event, ?*const c_void) void, ?*const c_void, *Event) usize, | 26 | createEvent: extern fn (u32, usize, ?extern fn (Event, ?*const c_void) void, ?*const c_void, *Event) usize, |
| ... | @@ -81,3 +81,45 @@ pub const TimerDelay = extern enum(u32) { | ... | @@ -81,3 +81,45 @@ pub const TimerDelay = extern enum(u32) { |
| 81 | TimerPeriodic, | 81 | TimerPeriodic, |
| 82 | TimerRelative, | 82 | TimerRelative, |
| 83 | }; | 83 | }; |
| 84 | |||
| 85 | pub const MemoryDescriptor = extern struct { | ||
| 86 | type: extern enum(u32) { | ||
| 87 | ReservedMemoryType, | ||
| 88 | LoaderCode, | ||
| 89 | LoaderData, | ||
| 90 | BootServicesCode, | ||
| 91 | BootServicesData, | ||
| 92 | RuntimeServicesCode, | ||
| 93 | RuntimeServicesData, | ||
| 94 | ConventionalMemory, | ||
| 95 | UnusableMemory, | ||
| 96 | ACPIReclaimMemory, | ||
| 97 | ACPIMemoryNVS, | ||
| 98 | MemoryMappedIO, | ||
| 99 | MemoryMappedIOPortSpace, | ||
| 100 | PalCode, | ||
| 101 | PersistentMemory, | ||
| 102 | MaxMemoryType, | ||
| 103 | }, | ||
| 104 | physical_start: u64, | ||
| 105 | virtual_start: u64, | ||
| 106 | number_of_pages: usize, | ||
| 107 | attribute: packed struct { | ||
| 108 | uc: bool, | ||
| 109 | wc: bool, | ||
| 110 | wt: bool, | ||
| 111 | wb: bool, | ||
| 112 | uce: bool, | ||
| 113 | _pad1: u7, | ||
| 114 | wp: bool, | ||
| 115 | rp: bool, | ||
| 116 | xp: bool, | ||
| 117 | nv: bool, | ||
| 118 | more_reliable: bool, | ||
| 119 | ro: bool, | ||
| 120 | sp: bool, | ||
| 121 | cpu_crypto: bool, | ||
| 122 | _pad2: u43, | ||
| 123 | memory_runtime: bool, | ||
| 124 | }, | ||
| 125 | }; |