authorgravatar for n@nirf.deNick Erdmann <n@nirf.de> 2019-08-09 23:12:59+02:00
committergravatar for n@nirf.deNick Erdmann <n@nirf.de> 2019-08-10 19:14:31+02:00
log9445b3f057bdeb57cdb02c86b94145ae9a345531
treec81d9719a276ac2b28e831bc6f8c48bcc457a59f
parent88fdb303ff7a33d87207bbd61a648c5c1dbe56ad
signature Commit is signed but in an unrecognized format.

std/os/uefi: change type of Handle from @OpaqueType to *@OpaqueType


5 files changed, 9 insertions(+), 9 deletions(-)

std/os/uefi.zig+2-2
...@@ -5,7 +5,7 @@ pub const tables = @import("uefi/tables.zig");...@@ -5,7 +5,7 @@ pub const tables = @import("uefi/tables.zig");
5const builtin = @import("builtin");5const builtin = @import("builtin");
6pub const is_the_target = builtin.os == .uefi;6pub const is_the_target = builtin.os == .uefi;
77
8pub var handle: *Handle = undefined;8pub var handle: Handle = undefined;
9pub var system_table: *tables.SystemTable = undefined;9pub var system_table: *tables.SystemTable = undefined;
1010
11pub const Event = @OpaqueType();11pub const Event = @OpaqueType();
...@@ -18,7 +18,7 @@ pub const Guid = extern struct {...@@ -18,7 +18,7 @@ pub const Guid = extern struct {
18 clock_seq_low: u8,18 clock_seq_low: u8,
19 node: [6]u8,19 node: [6]u8,
20};20};
21pub const Handle = @OpaqueType();21pub const Handle = *@OpaqueType();
22pub const Time = extern struct {22pub const Time = extern struct {
23 year: u16,23 year: u16,
24 month: u8,24 month: u8,
std/os/uefi/protocols/edid_override_protocol.zig+2-2
...@@ -4,10 +4,10 @@ const Handle = uefi.Handle;...@@ -4,10 +4,10 @@ const Handle = uefi.Handle;
44
5/// UEFI Specification, Version 2.8, 12.95/// UEFI Specification, Version 2.8, 12.9
6pub const EdidOverrideProtocol = extern struct {6pub const EdidOverrideProtocol = extern struct {
7 _get_edid: extern fn (*const EdidOverrideProtocol, *const Handle, *u32, *usize, *?[*]u8) usize,7 _get_edid: extern fn (*const EdidOverrideProtocol, Handle, *u32, *usize, *?[*]u8) usize,
88
9 /// attributes must be align(4)9 /// attributes must be align(4)
10 pub fn getEdid(self: *const EdidOverrideProtocol, handle: *const Handle, attributes: *EdidOverrideProtocolAttributes, edid_size: *usize, edid: *?[*]u8) usize {10 pub fn getEdid(self: *const EdidOverrideProtocol, handle: Handle, attributes: *EdidOverrideProtocolAttributes, edid_size: *usize, edid: *?[*]u8) usize {
11 return self._get_edid(self, handle, attributes, edid_size, edid);11 return self._get_edid(self, handle, attributes, edid_size, edid);
12 }12 }
1313
std/os/uefi/tables/boot_services.zig+1-1
...@@ -39,7 +39,7 @@ pub const BootServices = extern struct {...@@ -39,7 +39,7 @@ pub const BootServices = extern struct {
39 installConfigurationTable: usize, // TODO39 installConfigurationTable: usize, // TODO
40 imageLoad: usize, // TODO40 imageLoad: usize, // TODO
41 imageStart: usize, // TODO41 imageStart: usize, // TODO
42 exit: extern fn (*const Handle, usize, usize, ?*const c_void) usize,42 exit: extern fn (Handle, usize, usize, ?*const c_void) usize,
43 imageUnload: usize, // TODO43 imageUnload: usize, // TODO
44 exitBootServices: usize, // TODO44 exitBootServices: usize, // TODO
45 getNextMonotonicCount: usize, // TODO45 getNextMonotonicCount: usize, // TODO
std/os/uefi/tables/system_table.zig+3-3
...@@ -19,11 +19,11 @@ pub const SystemTable = extern struct {...@@ -19,11 +19,11 @@ pub const SystemTable = extern struct {
19 hdr: TableHeader,19 hdr: TableHeader,
20 firmware_vendor: *u16,20 firmware_vendor: *u16,
21 firmware_revision: u32,21 firmware_revision: u32,
22 console_in_handle: ?*Handle,22 console_in_handle: ?Handle,
23 con_in: ?*SimpleTextInputExProtocol,23 con_in: ?*SimpleTextInputExProtocol,
24 console_out_handle: ?*Handle,24 console_out_handle: ?Handle,
25 con_out: ?*SimpleTextOutputProtocol,25 con_out: ?*SimpleTextOutputProtocol,
26 standard_error_handle: ?*Handle,26 standard_error_handle: ?Handle,
27 std_err: ?*SimpleTextOutputProtocol,27 std_err: ?*SimpleTextOutputProtocol,
28 runtime_services: *RuntimeServices,28 runtime_services: *RuntimeServices,
29 boot_services: ?*BootServices,29 boot_services: ?*BootServices,
std/special/start.zig+1-1
...@@ -31,7 +31,7 @@ extern fn wasm_freestanding_start() void {...@@ -31,7 +31,7 @@ extern fn wasm_freestanding_start() void {
31 _ = callMain();31 _ = callMain();
32}32}
3333
34extern fn EfiMain(handle: *uefi.Handle, system_table: *uefi.tables.SystemTable) usize {34extern fn EfiMain(handle: uefi.Handle, system_table: *uefi.tables.SystemTable) usize {
35 const bad_efi_main_ret = "expected return type of main to be 'void', 'noreturn', or 'usize'";35 const bad_efi_main_ret = "expected return type of main to be 'void', 'noreturn', or 'usize'";
36 uefi.handle = handle;36 uefi.handle = handle;
37 uefi.system_table = system_table;37 uefi.system_table = system_table;