mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
std/os/uefi: change type of Handle from @OpaqueType to *@OpaqueType
This commit is contained in:
parent
88fdb303ff
commit
9445b3f057
@ -5,7 +5,7 @@ pub const tables = @import("uefi/tables.zig");
|
||||
const builtin = @import("builtin");
|
||||
pub const is_the_target = builtin.os == .uefi;
|
||||
|
||||
pub var handle: *Handle = undefined;
|
||||
pub var handle: Handle = undefined;
|
||||
pub var system_table: *tables.SystemTable = undefined;
|
||||
|
||||
pub const Event = @OpaqueType();
|
||||
@ -18,7 +18,7 @@ pub const Guid = extern struct {
|
||||
clock_seq_low: u8,
|
||||
node: [6]u8,
|
||||
};
|
||||
pub const Handle = @OpaqueType();
|
||||
pub const Handle = *@OpaqueType();
|
||||
pub const Time = extern struct {
|
||||
year: u16,
|
||||
month: u8,
|
||||
|
||||
@ -4,10 +4,10 @@ const Handle = uefi.Handle;
|
||||
|
||||
/// UEFI Specification, Version 2.8, 12.9
|
||||
pub const EdidOverrideProtocol = extern struct {
|
||||
_get_edid: extern fn (*const EdidOverrideProtocol, *const Handle, *u32, *usize, *?[*]u8) usize,
|
||||
_get_edid: extern fn (*const EdidOverrideProtocol, Handle, *u32, *usize, *?[*]u8) usize,
|
||||
|
||||
/// attributes must be align(4)
|
||||
pub fn getEdid(self: *const EdidOverrideProtocol, handle: *const Handle, attributes: *EdidOverrideProtocolAttributes, edid_size: *usize, edid: *?[*]u8) usize {
|
||||
pub fn getEdid(self: *const EdidOverrideProtocol, handle: Handle, attributes: *EdidOverrideProtocolAttributes, edid_size: *usize, edid: *?[*]u8) usize {
|
||||
return self._get_edid(self, handle, attributes, edid_size, edid);
|
||||
}
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ pub const BootServices = extern struct {
|
||||
installConfigurationTable: usize, // TODO
|
||||
imageLoad: usize, // TODO
|
||||
imageStart: usize, // TODO
|
||||
exit: extern fn (*const Handle, usize, usize, ?*const c_void) usize,
|
||||
exit: extern fn (Handle, usize, usize, ?*const c_void) usize,
|
||||
imageUnload: usize, // TODO
|
||||
exitBootServices: usize, // TODO
|
||||
getNextMonotonicCount: usize, // TODO
|
||||
|
||||
@ -19,11 +19,11 @@ pub const SystemTable = extern struct {
|
||||
hdr: TableHeader,
|
||||
firmware_vendor: *u16,
|
||||
firmware_revision: u32,
|
||||
console_in_handle: ?*Handle,
|
||||
console_in_handle: ?Handle,
|
||||
con_in: ?*SimpleTextInputExProtocol,
|
||||
console_out_handle: ?*Handle,
|
||||
console_out_handle: ?Handle,
|
||||
con_out: ?*SimpleTextOutputProtocol,
|
||||
standard_error_handle: ?*Handle,
|
||||
standard_error_handle: ?Handle,
|
||||
std_err: ?*SimpleTextOutputProtocol,
|
||||
runtime_services: *RuntimeServices,
|
||||
boot_services: ?*BootServices,
|
||||
|
||||
@ -31,7 +31,7 @@ extern fn wasm_freestanding_start() void {
|
||||
_ = callMain();
|
||||
}
|
||||
|
||||
extern fn EfiMain(handle: *uefi.Handle, system_table: *uefi.tables.SystemTable) usize {
|
||||
extern fn EfiMain(handle: uefi.Handle, system_table: *uefi.tables.SystemTable) usize {
|
||||
const bad_efi_main_ret = "expected return type of main to be 'void', 'noreturn', or 'usize'";
|
||||
uefi.handle = handle;
|
||||
uefi.system_table = system_table;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user