authorgravatar for davidgm94.work@protonmail.comDavid Gonzalez Martin <davidgm94.work@protonmail.com> 2022-10-20 17:26:57-05:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-10-21 12:17:41+02:00
log680d3cd1fc285a661bb32f90090a8ea2da986f75
tree94f414162f102a4620c94b0b49eee6be0acfaa34
parent972c39e2c00c487a483bad002ef33ca1a5c21d02

UEFI: Querying memory map size with no allocation

This makes possible to query the memory map size from EFI firmware without making any allocation beforehand. This makes possible to be precise about the size of the allocation which will own a copy of the memory map from the UEFI application.

1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/os/uefi/tables/boot_services.zig+1-1
...@@ -34,7 +34,7 @@ pub const BootServices = extern struct {...@@ -34,7 +34,7 @@ pub const BootServices = extern struct {
34 freePages: std.meta.FnPtr(fn (memory: [*]align(4096) u8, pages: usize) callconv(.C) Status),34 freePages: std.meta.FnPtr(fn (memory: [*]align(4096) u8, pages: usize) callconv(.C) Status),
3535
36 /// Returns the current memory map.36 /// Returns the current memory map.
37 getMemoryMap: std.meta.FnPtr(fn (mmap_size: *usize, mmap: [*]MemoryDescriptor, mapKey: *usize, descriptor_size: *usize, descriptor_version: *u32) callconv(.C) Status),37 getMemoryMap: std.meta.FnPtr(fn (mmap_size: *usize, mmap: ?[*]MemoryDescriptor, mapKey: *usize, descriptor_size: *usize, descriptor_version: *u32) callconv(.C) Status),
3838
39 /// Allocates pool memory.39 /// Allocates pool memory.
40 allocatePool: std.meta.FnPtr(fn (pool_type: MemoryType, size: usize, buffer: *[*]align(8) u8) callconv(.C) Status),40 allocatePool: std.meta.FnPtr(fn (pool_type: MemoryType, size: usize, buffer: *[*]align(8) u8) callconv(.C) Status),