std/os/uefi: Add shell parameters protocol

This commit is contained in:
Nick Erdmann 2020-03-09 20:27:53 +01:00
parent 52eb4129de
commit 9f475dae14
3 changed files with 25 additions and 0 deletions

View File

@ -105,3 +105,6 @@ pub const TimeCapabilities = extern struct {
/// If true, a time set operation clears the device's time below the resolution level.
sets_to_zero: bool,
};
/// File Handle as specified in the EFI Shell Spec
pub const FileHandle = *@OpaqueType();

View File

@ -87,3 +87,5 @@ pub const HIIPopupType = @import("protocols/hii_popup_protocol.zig").HIIPopupTyp
pub const HIIPopupSelection = @import("protocols/hii_popup_protocol.zig").HIIPopupSelection;
pub const RNGProtocol = @import("protocols/rng_protocol.zig").RNGProtocol;
pub const ShellParametersProtocol = @import("protocols/shell_parameters_protocol.zig").ShellParametersProtocol;

View File

@ -0,0 +1,20 @@
const uefi = @import("std").os.uefi;
const Guid = uefi.Guid;
const FileHandle = uefi.FileHandle;
pub const ShellParametersProtocol = extern struct {
argv: [*][*:0]const u16,
argc: usize,
stdin: FileHandle,
stdout: FileHandle,
stderr: FileHandle,
pub const guid align(8) = Guid{
.time_low = 0x752f3136,
.time_mid = 0x4e16,
.time_high_and_version = 0x4fdc,
.clock_seq_high_and_reserved = 0xa2,
.clock_seq_low = 0x2a,
.node = [_]u8{ 0xe5, 0xf4, 0x68, 0x12, 0xf4, 0xca },
};
};