| author | |
| committer | |
| log | 47ce736abec2d97c70eed619b5a6a58edeb4816a |
| tree | 4cc918bfe2412ca8cea57bc32b026a2ba5ce5bed |
| parent | 9445b3f057bdeb57cdb02c86b94145ae9a345531 |
| signature | Commit is signed but in an unrecognized format. |
6 files changed, 27 insertions(+), 7 deletions(-)
std/os/uefi.zig+1-1| ... | @@ -8,7 +8,7 @@ pub const is_the_target = builtin.os == .uefi; | ... | @@ -8,7 +8,7 @@ pub const is_the_target = builtin.os == .uefi; |
| 8 | pub var handle: Handle = undefined; | 8 | pub var handle: Handle = undefined; |
| 9 | pub var system_table: *tables.SystemTable = undefined; | 9 | pub var system_table: *tables.SystemTable = undefined; |
| 10 | 10 | ||
| 11 | pub const Event = @OpaqueType(); | 11 | pub const Event = *@OpaqueType(); |
| 12 | // GUIDs must be align(8) | 12 | // GUIDs must be align(8) |
| 13 | pub const Guid = extern struct { | 13 | pub const Guid = extern struct { |
| 14 | time_low: u32, | 14 | time_low: u32, |
std/os/uefi/protocols/absolute_pointer_protocol.zig+1-1| ... | @@ -6,7 +6,7 @@ const Guid = uefi.Guid; | ... | @@ -6,7 +6,7 @@ const Guid = uefi.Guid; |
| 6 | pub const AbsolutePointerProtocol = extern struct { | 6 | pub const AbsolutePointerProtocol = extern struct { |
| 7 | _reset: extern fn (*const AbsolutePointerProtocol, bool) usize, | 7 | _reset: extern fn (*const AbsolutePointerProtocol, bool) usize, |
| 8 | _get_state: extern fn (*const AbsolutePointerProtocol, *AbsolutePointerState) usize, | 8 | _get_state: extern fn (*const AbsolutePointerProtocol, *AbsolutePointerState) usize, |
| 9 | wait_for_input: *Event, | 9 | wait_for_input: Event, |
| 10 | mode: *AbsolutePointerMode, | 10 | mode: *AbsolutePointerMode, |
| 11 | 11 | ||
| 12 | pub fn reset(self: *const AbsolutePointerProtocol, verify: bool) usize { | 12 | pub fn reset(self: *const AbsolutePointerProtocol, verify: bool) usize { |
std/os/uefi/protocols/simple_pointer_protocol.zig+1-1| ... | @@ -6,7 +6,7 @@ const Guid = uefi.Guid; | ... | @@ -6,7 +6,7 @@ const Guid = uefi.Guid; |
| 6 | pub const SimplePointerProtocol = struct { | 6 | pub const SimplePointerProtocol = struct { |
| 7 | _reset: extern fn (*const SimplePointerProtocol, bool) usize, | 7 | _reset: extern fn (*const SimplePointerProtocol, bool) usize, |
| 8 | _get_state: extern fn (*const SimplePointerProtocol, *SimplePointerState) usize, | 8 | _get_state: extern fn (*const SimplePointerProtocol, *SimplePointerState) usize, |
| 9 | wait_for_input: *Event, | 9 | wait_for_input: Event, |
| 10 | mode: *SimplePointerMode, | 10 | mode: *SimplePointerMode, |
| 11 | 11 | ||
| 12 | pub fn reset(self: *const SimplePointerProtocol, verify: bool) usize { | 12 | pub fn reset(self: *const SimplePointerProtocol, verify: bool) usize { |
std/os/uefi/protocols/simple_text_input_ex_protocol.zig+1-1| ... | @@ -6,7 +6,7 @@ const Guid = uefi.Guid; | ... | @@ -6,7 +6,7 @@ const Guid = uefi.Guid; |
| 6 | pub const SimpleTextInputExProtocol = extern struct { | 6 | pub const SimpleTextInputExProtocol = extern struct { |
| 7 | _reset: extern fn (*const SimpleTextInputExProtocol, bool) usize, | 7 | _reset: extern fn (*const SimpleTextInputExProtocol, bool) usize, |
| 8 | _read_key_stroke_ex: extern fn (*const SimpleTextInputExProtocol, *KeyData) usize, | 8 | _read_key_stroke_ex: extern fn (*const SimpleTextInputExProtocol, *KeyData) usize, |
| 9 | wait_for_key_ex: *Event, | 9 | wait_for_key_ex: Event, |
| 10 | _set_state: extern fn (*const SimpleTextInputExProtocol, *const u8) usize, | 10 | _set_state: extern fn (*const SimpleTextInputExProtocol, *const u8) usize, |
| 11 | _register_key_notify: extern fn (*const SimpleTextInputExProtocol, *const KeyData, extern fn (*const KeyData) usize, **c_void) usize, | 11 | _register_key_notify: extern fn (*const SimpleTextInputExProtocol, *const KeyData, extern fn (*const KeyData) usize, **c_void) usize, |
| 12 | _unregister_key_notify: extern fn (*const SimpleTextInputExProtocol, *const c_void) usize, | 12 | _unregister_key_notify: extern fn (*const SimpleTextInputExProtocol, *const c_void) usize, |
std/os/uefi/tables.zig+1| ... | @@ -4,3 +4,4 @@ pub const ResetType = @import("tables/runtime_services.zig").ResetType; | ... | @@ -4,3 +4,4 @@ pub const ResetType = @import("tables/runtime_services.zig").ResetType; |
| 4 | pub const RuntimeServices = @import("tables/runtime_services.zig").RuntimeServices; | 4 | pub const RuntimeServices = @import("tables/runtime_services.zig").RuntimeServices; |
| 5 | pub const SystemTable = @import("tables/system_table.zig").SystemTable; | 5 | pub const SystemTable = @import("tables/system_table.zig").SystemTable; |
| 6 | pub const TableHeader = @import("tables/table_header.zig").TableHeader; | 6 | pub const TableHeader = @import("tables/table_header.zig").TableHeader; |
| 7 | pub const TimerDelay = @import("tables/boot_services.zig").TimerDelay; |
std/os/uefi/tables/boot_services.zig+22-3| ... | @@ -1,4 +1,5 @@ | ... | @@ -1,4 +1,5 @@ |
| 1 | const uefi = @import("std").os.uefi; | 1 | const uefi = @import("std").os.uefi; |
| 2 | const Event = uefi.Event; | ||
| 2 | const Guid = uefi.Guid; | 3 | const Guid = uefi.Guid; |
| 3 | const Handle = uefi.Handle; | 4 | const Handle = uefi.Handle; |
| 4 | const TableHeader = uefi.tables.TableHeader; | 5 | const TableHeader = uefi.tables.TableHeader; |
| ... | @@ -22,10 +23,10 @@ pub const BootServices = extern struct { | ... | @@ -22,10 +23,10 @@ pub const BootServices = extern struct { |
| 22 | getMemoryMap: usize, // TODO | 23 | getMemoryMap: usize, // TODO |
| 23 | allocatePool: usize, // TODO | 24 | allocatePool: usize, // TODO |
| 24 | freePool: usize, // TODO | 25 | freePool: usize, // TODO |
| 25 | createEvent: usize, // TODO | 26 | createEvent: extern fn (u32, usize, ?extern fn (Event, ?*const c_void) void, ?*const c_void, *Event) usize, |
| 26 | setTimer: usize, // TODO | 27 | setTimer: extern fn (Event, TimerDelay, u64) usize, |
| 27 | waitForEvent: usize, // TODO | 28 | waitForEvent: usize, // TODO |
| 28 | signalEvent: usize, // TODO | 29 | signalEvent: extern fn (Event) usize, |
| 29 | closeEvent: usize, // TODO | 30 | closeEvent: usize, // TODO |
| 30 | checkEvent: usize, // TODO | 31 | checkEvent: usize, // TODO |
| 31 | installProtocolInterface: usize, // TODO | 32 | installProtocolInterface: usize, // TODO |
| ... | @@ -61,4 +62,22 @@ pub const BootServices = extern struct { | ... | @@ -61,4 +62,22 @@ pub const BootServices = extern struct { |
| 61 | createEventEx: usize, // TODO | 62 | createEventEx: usize, // TODO |
| 62 | 63 | ||
| 63 | pub const signature: u64 = 0x56524553544f4f42; | 64 | pub const signature: u64 = 0x56524553544f4f42; |
| 65 | |||
| 66 | pub const event_timer: u32 = 0x80000000; | ||
| 67 | pub const event_runtime: u32 = 0x40000000; | ||
| 68 | pub const event_notify_wait: u32 = 0x00000100; | ||
| 69 | pub const event_notify_signal: u32 = 0x00000200; | ||
| 70 | pub const event_signal_exit_boot_services: u32 = 0x00000201; | ||
| 71 | pub const event_signal_virtual_address_change: u32 = 0x00000202; | ||
| 72 | |||
| 73 | pub const tpl_application: usize = 4; | ||
| 74 | pub const tpl_callback: usize = 8; | ||
| 75 | pub const tpl_notify: usize = 16; | ||
| 76 | pub const tpl_high_level: usize = 31; | ||
| 77 | }; | ||
| 78 | |||
| 79 | pub const TimerDelay = extern enum(u32) { | ||
| 80 | TimerCancel, | ||
| 81 | TimerPeriodic, | ||
| 82 | TimerRelative, | ||
| 64 | }; | 83 | }; |