authorgravatar for n@nirf.deNick Erdmann <n@nirf.de> 2020-03-09 20:27:53+01:00
committergravatar for n@nirf.deNick Erdmann <n@nirf.de> 2020-03-12 23:22:49+01:00
log9f475dae14cd8b195d305c806822c1f79e84240c
tree3bd64828a2595d3e7cdf0bc191f0a8c90316435d
parent52eb4129de7406de11319940e5494fed1b6a46e5

std/os/uefi: Add shell parameters protocol


3 files changed, 25 insertions(+), 0 deletions(-)

lib/std/os/uefi.zig+3
......@@ -105,3 +105,6 @@ pub const TimeCapabilities = extern struct {
105105 /// If true, a time set operation clears the device's time below the resolution level.
106106 sets_to_zero: bool,
107107};
108
109/// File Handle as specified in the EFI Shell Spec
110pub const FileHandle = *@OpaqueType();
lib/std/os/uefi/protocols.zig+2
......@@ -87,3 +87,5 @@ pub const HIIPopupType = @import("protocols/hii_popup_protocol.zig").HIIPopupTyp
8787pub const HIIPopupSelection = @import("protocols/hii_popup_protocol.zig").HIIPopupSelection;
8888
8989pub const RNGProtocol = @import("protocols/rng_protocol.zig").RNGProtocol;
90
91pub const ShellParametersProtocol = @import("protocols/shell_parameters_protocol.zig").ShellParametersProtocol;
lib/std/os/uefi/protocols/shell_parameters_protocol.zig created+20
......@@ -0,0 +1,20 @@
1const uefi = @import("std").os.uefi;
2const Guid = uefi.Guid;
3const FileHandle = uefi.FileHandle;
4
5pub const ShellParametersProtocol = extern struct {
6 argv: [*][*:0]const u16,
7 argc: usize,
8 stdin: FileHandle,
9 stdout: FileHandle,
10 stderr: FileHandle,
11
12 pub const guid align(8) = Guid{
13 .time_low = 0x752f3136,
14 .time_mid = 0x4e16,
15 .time_high_and_version = 0x4fdc,
16 .clock_seq_high_and_reserved = 0xa2,
17 .clock_seq_low = 0x2a,
18 .node = [_]u8{ 0xe5, 0xf4, 0x68, 0x12, 0xf4, 0xca },
19 };
20};