authorgravatar for steve@vontaka.chStephen von Takach <steve@vontaka.ch> 2021-11-23 13:32:16+11:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2021-11-22 21:32:16-05:00
loged70f9981c0f164aab586261cd5363e04905bc42
tree0674a456423e74a4510543891531a260b26c914e
parentbc3e86c4b7e595eab9951a847c6637bb8f2a7451
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

feat(uefi): add virtual addressing helpers (#10195)

based off definitions in https://uefi.org/sites/default/files/resources/UEFI%20Spec%202_6.pdf

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

lib/std/os/uefi/tables/runtime_services.zig+7-2
......@@ -4,6 +4,7 @@ const TableHeader = uefi.tables.TableHeader;
44const Time = uefi.Time;
55const TimeCapabilities = uefi.TimeCapabilities;
66const Status = uefi.Status;
7const MemoryDescriptor = uefi.tables.MemoryDescriptor;
78
89/// Runtime services are provided by the firmware before and after exitBootServices has been called.
910///
......@@ -22,8 +23,12 @@ pub const RuntimeServices = extern struct {
2223 setTime: Status, // TODO
2324 getWakeupTime: Status, // TODO
2425 setWakeupTime: Status, // TODO
25 setVirtualAddressMap: Status, // TODO
26 convertPointer: Status, // TODO
26
27 /// Changes the runtime addressing mode of EFI firmware from physical to virtual.
28 setVirtualAddressMap: fn (usize, usize, u32, [*]MemoryDescriptor) callconv(.C) Status,
29
30 /// Determines the new virtual address that is to be used on subsequent memory accesses.
31 convertPointer: fn (usize, **c_void) callconv(.C) Status,
2732
2833 /// Returns the value of a variable.
2934 getVariable: fn ([*:0]const u16, *align(8) const Guid, ?*u32, *usize, ?*c_void) callconv(.C) Status,