| author | |
| committer | |
| log | 9be1a3f7ef9177fd1d495ae1f85d53693f6c6dcf |
| tree | 0aae5116ec0a7e761d8ef679e9069804f6f557f6 |
| parent | 49ac816e3683def5d14d6f8415d80413ecb43e4c |
I tested this and this definitely compiles and these
changes were done programmatically but if there's still anything wrong
it shouldn't be hard to fix.
With this change it's going to be very easy to make further adjustments
to the calling conventions of all these external UEFI functions.
Closes #1630925 files changed, 183 insertions(+), 151 deletions(-)
lib/std/os/uefi.zig+6| ... | @@ -23,6 +23,12 @@ pub var system_table: *tables.SystemTable = undefined; | ... | @@ -23,6 +23,12 @@ pub var system_table: *tables.SystemTable = undefined; |
| 23 | /// A handle to an event structure. | 23 | /// A handle to an event structure. |
| 24 | pub const Event = *opaque {}; | 24 | pub const Event = *opaque {}; |
| 25 | 25 | ||
| 26 | /// The calling convention used for all external functions part of the UEFI API. | ||
| 27 | pub const cc = switch (@import("builtin").target.cpu.arch) { | ||
| 28 | .x86_64 => .Win64, | ||
| 29 | else => .C, | ||
| 30 | }; | ||
| 31 | |||
| 26 | pub const MacAddress = extern struct { | 32 | pub const MacAddress = extern struct { |
| 27 | address: [32]u8, | 33 | address: [32]u8, |
| 28 | }; | 34 | }; |
lib/std/os/uefi/protocols/absolute_pointer_protocol.zig+3-2| ... | @@ -3,11 +3,12 @@ const uefi = std.os.uefi; | ... | @@ -3,11 +3,12 @@ const uefi = std.os.uefi; |
| 3 | const Event = uefi.Event; | 3 | const Event = uefi.Event; |
| 4 | const Guid = uefi.Guid; | 4 | const Guid = uefi.Guid; |
| 5 | const Status = uefi.Status; | 5 | const Status = uefi.Status; |
| 6 | const cc = uefi.cc; | ||
| 6 | 7 | ||
| 7 | /// Protocol for touchscreens | 8 | /// Protocol for touchscreens |
| 8 | pub const AbsolutePointerProtocol = extern struct { | 9 | pub const AbsolutePointerProtocol = extern struct { |
| 9 | _reset: *const fn (*const AbsolutePointerProtocol, bool) callconv(.C) Status, | 10 | _reset: *const fn (*const AbsolutePointerProtocol, bool) callconv(cc) Status, |
| 10 | _get_state: *const fn (*const AbsolutePointerProtocol, *AbsolutePointerState) callconv(.C) Status, | 11 | _get_state: *const fn (*const AbsolutePointerProtocol, *AbsolutePointerState) callconv(cc) Status, |
| 11 | wait_for_input: Event, | 12 | wait_for_input: Event, |
| 12 | mode: *AbsolutePointerMode, | 13 | mode: *AbsolutePointerMode, |
| 13 | 14 |
lib/std/os/uefi/protocols/block_io_protocol.zig+5-4| ... | @@ -1,6 +1,7 @@ | ... | @@ -1,6 +1,7 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const uefi = std.os.uefi; | 2 | const uefi = std.os.uefi; |
| 3 | const Status = uefi.Status; | 3 | const Status = uefi.Status; |
| 4 | const cc = uefi.cc; | ||
| 4 | 5 | ||
| 5 | pub const EfiBlockMedia = extern struct { | 6 | pub const EfiBlockMedia = extern struct { |
| 6 | /// The current media ID. If the media changes, this value is changed. | 7 | /// The current media ID. If the media changes, this value is changed. |
| ... | @@ -44,10 +45,10 @@ pub const BlockIoProtocol = extern struct { | ... | @@ -44,10 +45,10 @@ pub const BlockIoProtocol = extern struct { |
| 44 | revision: u64, | 45 | revision: u64, |
| 45 | media: *EfiBlockMedia, | 46 | media: *EfiBlockMedia, |
| 46 | 47 | ||
| 47 | _reset: *const fn (*BlockIoProtocol, extended_verification: bool) callconv(.C) Status, | 48 | _reset: *const fn (*BlockIoProtocol, extended_verification: bool) callconv(cc) Status, |
| 48 | _read_blocks: *const fn (*BlockIoProtocol, media_id: u32, lba: u64, buffer_size: usize, buf: [*]u8) callconv(.C) Status, | 49 | _read_blocks: *const fn (*BlockIoProtocol, media_id: u32, lba: u64, buffer_size: usize, buf: [*]u8) callconv(cc) Status, |
| 49 | _write_blocks: *const fn (*BlockIoProtocol, media_id: u32, lba: u64, buffer_size: usize, buf: [*]u8) callconv(.C) Status, | 50 | _write_blocks: *const fn (*BlockIoProtocol, media_id: u32, lba: u64, buffer_size: usize, buf: [*]u8) callconv(cc) Status, |
| 50 | _flush_blocks: *const fn (*BlockIoProtocol) callconv(.C) Status, | 51 | _flush_blocks: *const fn (*BlockIoProtocol) callconv(cc) Status, |
| 51 | 52 | ||
| 52 | /// Resets the block device hardware. | 53 | /// Resets the block device hardware. |
| 53 | pub fn reset(self: *Self, extended_verification: bool) Status { | 54 | pub fn reset(self: *Self, extended_verification: bool) Status { |
lib/std/os/uefi/protocols/edid_override_protocol.zig+2-1| ... | @@ -3,10 +3,11 @@ const uefi = std.os.uefi; | ... | @@ -3,10 +3,11 @@ const uefi = std.os.uefi; |
| 3 | const Guid = uefi.Guid; | 3 | const Guid = uefi.Guid; |
| 4 | const Handle = uefi.Handle; | 4 | const Handle = uefi.Handle; |
| 5 | const Status = uefi.Status; | 5 | const Status = uefi.Status; |
| 6 | const cc = uefi.cc; | ||
| 6 | 7 | ||
| 7 | /// Override EDID information | 8 | /// Override EDID information |
| 8 | pub const EdidOverrideProtocol = extern struct { | 9 | pub const EdidOverrideProtocol = extern struct { |
| 9 | _get_edid: *const fn (*const EdidOverrideProtocol, Handle, *EdidOverrideProtocolAttributes, *usize, *?[*]u8) callconv(.C) Status, | 10 | _get_edid: *const fn (*const EdidOverrideProtocol, Handle, *EdidOverrideProtocolAttributes, *usize, *?[*]u8) callconv(cc) Status, |
| 10 | 11 | ||
| 11 | /// Returns policy information and potentially a replacement EDID for the specified video output device. | 12 | /// Returns policy information and potentially a replacement EDID for the specified video output device. |
| 12 | pub fn getEdid( | 13 | pub fn getEdid( |
lib/std/os/uefi/protocols/file_protocol.zig+11-10| ... | @@ -4,19 +4,20 @@ const io = std.io; | ... | @@ -4,19 +4,20 @@ const io = std.io; |
| 4 | const Guid = uefi.Guid; | 4 | const Guid = uefi.Guid; |
| 5 | const Time = uefi.Time; | 5 | const Time = uefi.Time; |
| 6 | const Status = uefi.Status; | 6 | const Status = uefi.Status; |
| 7 | const cc = uefi.cc; | ||
| 7 | 8 | ||
| 8 | pub const FileProtocol = extern struct { | 9 | pub const FileProtocol = extern struct { |
| 9 | revision: u64, | 10 | revision: u64, |
| 10 | _open: *const fn (*const FileProtocol, **const FileProtocol, [*:0]const u16, u64, u64) callconv(.C) Status, | 11 | _open: *const fn (*const FileProtocol, **const FileProtocol, [*:0]const u16, u64, u64) callconv(cc) Status, |
| 11 | _close: *const fn (*const FileProtocol) callconv(.C) Status, | 12 | _close: *const fn (*const FileProtocol) callconv(cc) Status, |
| 12 | _delete: *const fn (*const FileProtocol) callconv(.C) Status, | 13 | _delete: *const fn (*const FileProtocol) callconv(cc) Status, |
| 13 | _read: *const fn (*const FileProtocol, *usize, [*]u8) callconv(.C) Status, | 14 | _read: *const fn (*const FileProtocol, *usize, [*]u8) callconv(cc) Status, |
| 14 | _write: *const fn (*const FileProtocol, *usize, [*]const u8) callconv(.C) Status, | 15 | _write: *const fn (*const FileProtocol, *usize, [*]const u8) callconv(cc) Status, |
| 15 | _get_position: *const fn (*const FileProtocol, *u64) callconv(.C) Status, | 16 | _get_position: *const fn (*const FileProtocol, *u64) callconv(cc) Status, |
| 16 | _set_position: *const fn (*const FileProtocol, u64) callconv(.C) Status, | 17 | _set_position: *const fn (*const FileProtocol, u64) callconv(cc) Status, |
| 17 | _get_info: *const fn (*const FileProtocol, *align(8) const Guid, *const usize, [*]u8) callconv(.C) Status, | 18 | _get_info: *const fn (*const FileProtocol, *align(8) const Guid, *const usize, [*]u8) callconv(cc) Status, |
| 18 | _set_info: *const fn (*const FileProtocol, *align(8) const Guid, usize, [*]const u8) callconv(.C) Status, | 19 | _set_info: *const fn (*const FileProtocol, *align(8) const Guid, usize, [*]const u8) callconv(cc) Status, |
| 19 | _flush: *const fn (*const FileProtocol) callconv(.C) Status, | 20 | _flush: *const fn (*const FileProtocol) callconv(cc) Status, |
| 20 | 21 | ||
| 21 | pub const SeekError = error{SeekError}; | 22 | pub const SeekError = error{SeekError}; |
| 22 | pub const GetSeekPosError = error{GetSeekPosError}; | 23 | pub const GetSeekPosError = error{GetSeekPosError}; |
lib/std/os/uefi/protocols/graphics_output_protocol.zig+4-3| ... | @@ -2,12 +2,13 @@ const std = @import("std"); | ... | @@ -2,12 +2,13 @@ const std = @import("std"); |
| 2 | const uefi = std.os.uefi; | 2 | const uefi = std.os.uefi; |
| 3 | const Guid = uefi.Guid; | 3 | const Guid = uefi.Guid; |
| 4 | const Status = uefi.Status; | 4 | const Status = uefi.Status; |
| 5 | const cc = uefi.cc; | ||
| 5 | 6 | ||
| 6 | /// Graphics output | 7 | /// Graphics output |
| 7 | pub const GraphicsOutputProtocol = extern struct { | 8 | pub const GraphicsOutputProtocol = extern struct { |
| 8 | _query_mode: *const fn (*const GraphicsOutputProtocol, u32, *usize, **GraphicsOutputModeInformation) callconv(.C) Status, | 9 | _query_mode: *const fn (*const GraphicsOutputProtocol, u32, *usize, **GraphicsOutputModeInformation) callconv(cc) Status, |
| 9 | _set_mode: *const fn (*const GraphicsOutputProtocol, u32) callconv(.C) Status, | 10 | _set_mode: *const fn (*const GraphicsOutputProtocol, u32) callconv(cc) Status, |
| 10 | _blt: *const fn (*const GraphicsOutputProtocol, ?[*]GraphicsOutputBltPixel, GraphicsOutputBltOperation, usize, usize, usize, usize, usize, usize, usize) callconv(.C) Status, | 11 | _blt: *const fn (*const GraphicsOutputProtocol, ?[*]GraphicsOutputBltPixel, GraphicsOutputBltOperation, usize, usize, usize, usize, usize, usize, usize) callconv(cc) Status, |
| 11 | mode: *GraphicsOutputProtocolMode, | 12 | mode: *GraphicsOutputProtocolMode, |
| 12 | 13 | ||
| 13 | /// Returns information for an available graphics mode that the graphics device and the set of active video output devices supports. | 14 | /// Returns information for an available graphics mode that the graphics device and the set of active video output devices supports. |
lib/std/os/uefi/protocols/hii_database_protocol.zig+5-4| ... | @@ -3,14 +3,15 @@ const uefi = std.os.uefi; | ... | @@ -3,14 +3,15 @@ const uefi = std.os.uefi; |
| 3 | const Guid = uefi.Guid; | 3 | const Guid = uefi.Guid; |
| 4 | const Status = uefi.Status; | 4 | const Status = uefi.Status; |
| 5 | const hii = uefi.protocols.hii; | 5 | const hii = uefi.protocols.hii; |
| 6 | const cc = uefi.cc; | ||
| 6 | 7 | ||
| 7 | /// Database manager for HII-related data structures. | 8 | /// Database manager for HII-related data structures. |
| 8 | pub const HIIDatabaseProtocol = extern struct { | 9 | pub const HIIDatabaseProtocol = extern struct { |
| 9 | _new_package_list: Status, // TODO | 10 | _new_package_list: Status, // TODO |
| 10 | _remove_package_list: *const fn (*const HIIDatabaseProtocol, hii.HIIHandle) callconv(.C) Status, | 11 | _remove_package_list: *const fn (*const HIIDatabaseProtocol, hii.HIIHandle) callconv(cc) Status, |
| 11 | _update_package_list: *const fn (*const HIIDatabaseProtocol, hii.HIIHandle, *const hii.HIIPackageList) callconv(.C) Status, | 12 | _update_package_list: *const fn (*const HIIDatabaseProtocol, hii.HIIHandle, *const hii.HIIPackageList) callconv(cc) Status, |
| 12 | _list_package_lists: *const fn (*const HIIDatabaseProtocol, u8, ?*const Guid, *usize, [*]hii.HIIHandle) callconv(.C) Status, | 13 | _list_package_lists: *const fn (*const HIIDatabaseProtocol, u8, ?*const Guid, *usize, [*]hii.HIIHandle) callconv(cc) Status, |
| 13 | _export_package_lists: *const fn (*const HIIDatabaseProtocol, ?hii.HIIHandle, *usize, *hii.HIIPackageList) callconv(.C) Status, | 14 | _export_package_lists: *const fn (*const HIIDatabaseProtocol, ?hii.HIIHandle, *usize, *hii.HIIPackageList) callconv(cc) Status, |
| 14 | _register_package_notify: Status, // TODO | 15 | _register_package_notify: Status, // TODO |
| 15 | _unregister_package_notify: Status, // TODO | 16 | _unregister_package_notify: Status, // TODO |
| 16 | _find_keyboard_layouts: Status, // TODO | 17 | _find_keyboard_layouts: Status, // TODO |
lib/std/os/uefi/protocols/hii_popup_protocol.zig+2-1| ... | @@ -3,11 +3,12 @@ const uefi = std.os.uefi; | ... | @@ -3,11 +3,12 @@ const uefi = std.os.uefi; |
| 3 | const Guid = uefi.Guid; | 3 | const Guid = uefi.Guid; |
| 4 | const Status = uefi.Status; | 4 | const Status = uefi.Status; |
| 5 | const hii = uefi.protocols.hii; | 5 | const hii = uefi.protocols.hii; |
| 6 | const cc = uefi.cc; | ||
| 6 | 7 | ||
| 7 | /// Display a popup window | 8 | /// Display a popup window |
| 8 | pub const HIIPopupProtocol = extern struct { | 9 | pub const HIIPopupProtocol = extern struct { |
| 9 | revision: u64, | 10 | revision: u64, |
| 10 | _create_popup: *const fn (*const HIIPopupProtocol, HIIPopupStyle, HIIPopupType, hii.HIIHandle, u16, ?*HIIPopupSelection) callconv(.C) Status, | 11 | _create_popup: *const fn (*const HIIPopupProtocol, HIIPopupStyle, HIIPopupType, hii.HIIHandle, u16, ?*HIIPopupSelection) callconv(cc) Status, |
| 11 | 12 | ||
| 12 | /// Displays a popup window. | 13 | /// Displays a popup window. |
| 13 | pub fn createPopup(self: *const HIIPopupProtocol, style: HIIPopupStyle, popup_type: HIIPopupType, handle: hii.HIIHandle, msg: u16, user_selection: ?*HIIPopupSelection) Status { | 14 | pub fn createPopup(self: *const HIIPopupProtocol, style: HIIPopupStyle, popup_type: HIIPopupType, handle: hii.HIIHandle, msg: u16, user_selection: ?*HIIPopupSelection) Status { |
lib/std/os/uefi/protocols/ip6_config_protocol.zig+5-4| ... | @@ -3,12 +3,13 @@ const uefi = std.os.uefi; | ... | @@ -3,12 +3,13 @@ const uefi = std.os.uefi; |
| 3 | const Guid = uefi.Guid; | 3 | const Guid = uefi.Guid; |
| 4 | const Event = uefi.Event; | 4 | const Event = uefi.Event; |
| 5 | const Status = uefi.Status; | 5 | const Status = uefi.Status; |
| 6 | const cc = uefi.cc; | ||
| 6 | 7 | ||
| 7 | pub const Ip6ConfigProtocol = extern struct { | 8 | pub const Ip6ConfigProtocol = extern struct { |
| 8 | _set_data: *const fn (*const Ip6ConfigProtocol, Ip6ConfigDataType, usize, *const anyopaque) callconv(.C) Status, | 9 | _set_data: *const fn (*const Ip6ConfigProtocol, Ip6ConfigDataType, usize, *const anyopaque) callconv(cc) Status, |
| 9 | _get_data: *const fn (*const Ip6ConfigProtocol, Ip6ConfigDataType, *usize, ?*const anyopaque) callconv(.C) Status, | 10 | _get_data: *const fn (*const Ip6ConfigProtocol, Ip6ConfigDataType, *usize, ?*const anyopaque) callconv(cc) Status, |
| 10 | _register_data_notify: *const fn (*const Ip6ConfigProtocol, Ip6ConfigDataType, Event) callconv(.C) Status, | 11 | _register_data_notify: *const fn (*const Ip6ConfigProtocol, Ip6ConfigDataType, Event) callconv(cc) Status, |
| 11 | _unregister_data_notify: *const fn (*const Ip6ConfigProtocol, Ip6ConfigDataType, Event) callconv(.C) Status, | 12 | _unregister_data_notify: *const fn (*const Ip6ConfigProtocol, Ip6ConfigDataType, Event) callconv(cc) Status, |
| 12 | 13 | ||
| 13 | pub fn setData(self: *const Ip6ConfigProtocol, data_type: Ip6ConfigDataType, data_size: usize, data: *const anyopaque) Status { | 14 | pub fn setData(self: *const Ip6ConfigProtocol, data_type: Ip6ConfigDataType, data_size: usize, data: *const anyopaque) Status { |
| 14 | return self._set_data(self, data_type, data_size, data); | 15 | return self._set_data(self, data_type, data_size, data); |
lib/std/os/uefi/protocols/ip6_protocol.zig+10-9| ... | @@ -6,17 +6,18 @@ const Status = uefi.Status; | ... | @@ -6,17 +6,18 @@ const Status = uefi.Status; |
| 6 | const MacAddress = uefi.protocols.MacAddress; | 6 | const MacAddress = uefi.protocols.MacAddress; |
| 7 | const ManagedNetworkConfigData = uefi.protocols.ManagedNetworkConfigData; | 7 | const ManagedNetworkConfigData = uefi.protocols.ManagedNetworkConfigData; |
| 8 | const SimpleNetworkMode = uefi.protocols.SimpleNetworkMode; | 8 | const SimpleNetworkMode = uefi.protocols.SimpleNetworkMode; |
| 9 | const cc = uefi.cc; | ||
| 9 | 10 | ||
| 10 | pub const Ip6Protocol = extern struct { | 11 | pub const Ip6Protocol = extern struct { |
| 11 | _get_mode_data: *const fn (*const Ip6Protocol, ?*Ip6ModeData, ?*ManagedNetworkConfigData, ?*SimpleNetworkMode) callconv(.C) Status, | 12 | _get_mode_data: *const fn (*const Ip6Protocol, ?*Ip6ModeData, ?*ManagedNetworkConfigData, ?*SimpleNetworkMode) callconv(cc) Status, |
| 12 | _configure: *const fn (*const Ip6Protocol, ?*const Ip6ConfigData) callconv(.C) Status, | 13 | _configure: *const fn (*const Ip6Protocol, ?*const Ip6ConfigData) callconv(cc) Status, |
| 13 | _groups: *const fn (*const Ip6Protocol, bool, ?*const Ip6Address) callconv(.C) Status, | 14 | _groups: *const fn (*const Ip6Protocol, bool, ?*const Ip6Address) callconv(cc) Status, |
| 14 | _routes: *const fn (*const Ip6Protocol, bool, ?*const Ip6Address, u8, ?*const Ip6Address) callconv(.C) Status, | 15 | _routes: *const fn (*const Ip6Protocol, bool, ?*const Ip6Address, u8, ?*const Ip6Address) callconv(cc) Status, |
| 15 | _neighbors: *const fn (*const Ip6Protocol, bool, *const Ip6Address, ?*const MacAddress, u32, bool) callconv(.C) Status, | 16 | _neighbors: *const fn (*const Ip6Protocol, bool, *const Ip6Address, ?*const MacAddress, u32, bool) callconv(cc) Status, |
| 16 | _transmit: *const fn (*const Ip6Protocol, *Ip6CompletionToken) callconv(.C) Status, | 17 | _transmit: *const fn (*const Ip6Protocol, *Ip6CompletionToken) callconv(cc) Status, |
| 17 | _receive: *const fn (*const Ip6Protocol, *Ip6CompletionToken) callconv(.C) Status, | 18 | _receive: *const fn (*const Ip6Protocol, *Ip6CompletionToken) callconv(cc) Status, |
| 18 | _cancel: *const fn (*const Ip6Protocol, ?*Ip6CompletionToken) callconv(.C) Status, | 19 | _cancel: *const fn (*const Ip6Protocol, ?*Ip6CompletionToken) callconv(cc) Status, |
| 19 | _poll: *const fn (*const Ip6Protocol) callconv(.C) Status, | 20 | _poll: *const fn (*const Ip6Protocol) callconv(cc) Status, |
| 20 | 21 | ||
| 21 | /// Gets the current operational settings for this instance of the EFI IPv6 Protocol driver. | 22 | /// Gets the current operational settings for this instance of the EFI IPv6 Protocol driver. |
| 22 | pub fn getModeData(self: *const Ip6Protocol, ip6_mode_data: ?*Ip6ModeData, mnp_config_data: ?*ManagedNetworkConfigData, snp_mode_data: ?*SimpleNetworkMode) Status { | 23 | pub fn getModeData(self: *const Ip6Protocol, ip6_mode_data: ?*Ip6ModeData, mnp_config_data: ?*ManagedNetworkConfigData, snp_mode_data: ?*SimpleNetworkMode) Status { |
lib/std/os/uefi/protocols/ip6_service_binding_protocol.zig+3-2| ... | @@ -3,10 +3,11 @@ const uefi = std.os.uefi; | ... | @@ -3,10 +3,11 @@ const uefi = std.os.uefi; |
| 3 | const Handle = uefi.Handle; | 3 | const Handle = uefi.Handle; |
| 4 | const Guid = uefi.Guid; | 4 | const Guid = uefi.Guid; |
| 5 | const Status = uefi.Status; | 5 | const Status = uefi.Status; |
| 6 | const cc = uefi.cc; | ||
| 6 | 7 | ||
| 7 | pub const Ip6ServiceBindingProtocol = extern struct { | 8 | pub const Ip6ServiceBindingProtocol = extern struct { |
| 8 | _create_child: *const fn (*const Ip6ServiceBindingProtocol, *?Handle) callconv(.C) Status, | 9 | _create_child: *const fn (*const Ip6ServiceBindingProtocol, *?Handle) callconv(cc) Status, |
| 9 | _destroy_child: *const fn (*const Ip6ServiceBindingProtocol, Handle) callconv(.C) Status, | 10 | _destroy_child: *const fn (*const Ip6ServiceBindingProtocol, Handle) callconv(cc) Status, |
| 10 | 11 | ||
| 11 | pub fn createChild(self: *const Ip6ServiceBindingProtocol, handle: *?Handle) Status { | 12 | pub fn createChild(self: *const Ip6ServiceBindingProtocol, handle: *?Handle) Status { |
| 12 | return self._create_child(self, handle); | 13 | return self._create_child(self, handle); |
lib/std/os/uefi/protocols/loaded_image_protocol.zig+2-1| ... | @@ -6,6 +6,7 @@ const Status = uefi.Status; | ... | @@ -6,6 +6,7 @@ const Status = uefi.Status; |
| 6 | const SystemTable = uefi.tables.SystemTable; | 6 | const SystemTable = uefi.tables.SystemTable; |
| 7 | const MemoryType = uefi.tables.MemoryType; | 7 | const MemoryType = uefi.tables.MemoryType; |
| 8 | const DevicePathProtocol = uefi.protocols.DevicePathProtocol; | 8 | const DevicePathProtocol = uefi.protocols.DevicePathProtocol; |
| 9 | const cc = uefi.cc; | ||
| 9 | 10 | ||
| 10 | pub const LoadedImageProtocol = extern struct { | 11 | pub const LoadedImageProtocol = extern struct { |
| 11 | revision: u32, | 12 | revision: u32, |
| ... | @@ -20,7 +21,7 @@ pub const LoadedImageProtocol = extern struct { | ... | @@ -20,7 +21,7 @@ pub const LoadedImageProtocol = extern struct { |
| 20 | image_size: u64, | 21 | image_size: u64, |
| 21 | image_code_type: MemoryType, | 22 | image_code_type: MemoryType, |
| 22 | image_data_type: MemoryType, | 23 | image_data_type: MemoryType, |
| 23 | _unload: *const fn (*const LoadedImageProtocol, Handle) callconv(.C) Status, | 24 | _unload: *const fn (*const LoadedImageProtocol, Handle) callconv(cc) Status, |
| 24 | 25 | ||
| 25 | /// Unloads an image from memory. | 26 | /// Unloads an image from memory. |
| 26 | pub fn unload(self: *const LoadedImageProtocol, handle: Handle) Status { | 27 | pub fn unload(self: *const LoadedImageProtocol, handle: Handle) Status { |
lib/std/os/uefi/protocols/managed_network_protocol.zig+9-8| ... | @@ -6,16 +6,17 @@ const Status = uefi.Status; | ... | @@ -6,16 +6,17 @@ const Status = uefi.Status; |
| 6 | const Time = uefi.Time; | 6 | const Time = uefi.Time; |
| 7 | const SimpleNetworkMode = uefi.protocols.SimpleNetworkMode; | 7 | const SimpleNetworkMode = uefi.protocols.SimpleNetworkMode; |
| 8 | const MacAddress = uefi.protocols.MacAddress; | 8 | const MacAddress = uefi.protocols.MacAddress; |
| 9 | const cc = uefi.cc; | ||
| 9 | 10 | ||
| 10 | pub const ManagedNetworkProtocol = extern struct { | 11 | pub const ManagedNetworkProtocol = extern struct { |
| 11 | _get_mode_data: *const fn (*const ManagedNetworkProtocol, ?*ManagedNetworkConfigData, ?*SimpleNetworkMode) callconv(.C) Status, | 12 | _get_mode_data: *const fn (*const ManagedNetworkProtocol, ?*ManagedNetworkConfigData, ?*SimpleNetworkMode) callconv(cc) Status, |
| 12 | _configure: *const fn (*const ManagedNetworkProtocol, ?*const ManagedNetworkConfigData) callconv(.C) Status, | 13 | _configure: *const fn (*const ManagedNetworkProtocol, ?*const ManagedNetworkConfigData) callconv(cc) Status, |
| 13 | _mcast_ip_to_mac: *const fn (*const ManagedNetworkProtocol, bool, *const anyopaque, *MacAddress) callconv(.C) Status, | 14 | _mcast_ip_to_mac: *const fn (*const ManagedNetworkProtocol, bool, *const anyopaque, *MacAddress) callconv(cc) Status, |
| 14 | _groups: *const fn (*const ManagedNetworkProtocol, bool, ?*const MacAddress) callconv(.C) Status, | 15 | _groups: *const fn (*const ManagedNetworkProtocol, bool, ?*const MacAddress) callconv(cc) Status, |
| 15 | _transmit: *const fn (*const ManagedNetworkProtocol, *const ManagedNetworkCompletionToken) callconv(.C) Status, | 16 | _transmit: *const fn (*const ManagedNetworkProtocol, *const ManagedNetworkCompletionToken) callconv(cc) Status, |
| 16 | _receive: *const fn (*const ManagedNetworkProtocol, *const ManagedNetworkCompletionToken) callconv(.C) Status, | 17 | _receive: *const fn (*const ManagedNetworkProtocol, *const ManagedNetworkCompletionToken) callconv(cc) Status, |
| 17 | _cancel: *const fn (*const ManagedNetworkProtocol, ?*const ManagedNetworkCompletionToken) callconv(.C) Status, | 18 | _cancel: *const fn (*const ManagedNetworkProtocol, ?*const ManagedNetworkCompletionToken) callconv(cc) Status, |
| 18 | _poll: *const fn (*const ManagedNetworkProtocol) callconv(.C) Status, | 19 | _poll: *const fn (*const ManagedNetworkProtocol) callconv(cc) Status, |
| 19 | 20 | ||
| 20 | /// Returns the operational parameters for the current MNP child driver. | 21 | /// Returns the operational parameters for the current MNP child driver. |
| 21 | /// May also support returning the underlying SNP driver mode data. | 22 | /// May also support returning the underlying SNP driver mode data. |
lib/std/os/uefi/protocols/managed_network_service_binding_protocol.zig+3-2| ... | @@ -3,10 +3,11 @@ const uefi = std.os.uefi; | ... | @@ -3,10 +3,11 @@ const uefi = std.os.uefi; |
| 3 | const Handle = uefi.Handle; | 3 | const Handle = uefi.Handle; |
| 4 | const Guid = uefi.Guid; | 4 | const Guid = uefi.Guid; |
| 5 | const Status = uefi.Status; | 5 | const Status = uefi.Status; |
| 6 | const cc = uefi.cc; | ||
| 6 | 7 | ||
| 7 | pub const ManagedNetworkServiceBindingProtocol = extern struct { | 8 | pub const ManagedNetworkServiceBindingProtocol = extern struct { |
| 8 | _create_child: *const fn (*const ManagedNetworkServiceBindingProtocol, *?Handle) callconv(.C) Status, | 9 | _create_child: *const fn (*const ManagedNetworkServiceBindingProtocol, *?Handle) callconv(cc) Status, |
| 9 | _destroy_child: *const fn (*const ManagedNetworkServiceBindingProtocol, Handle) callconv(.C) Status, | 10 | _destroy_child: *const fn (*const ManagedNetworkServiceBindingProtocol, Handle) callconv(cc) Status, |
| 10 | 11 | ||
| 11 | pub fn createChild(self: *const ManagedNetworkServiceBindingProtocol, handle: *?Handle) Status { | 12 | pub fn createChild(self: *const ManagedNetworkServiceBindingProtocol, handle: *?Handle) Status { |
| 12 | return self._create_child(self, handle); | 13 | return self._create_child(self, handle); |
lib/std/os/uefi/protocols/rng_protocol.zig+3-2| ... | @@ -2,11 +2,12 @@ const std = @import("std"); | ... | @@ -2,11 +2,12 @@ const std = @import("std"); |
| 2 | const uefi = std.os.uefi; | 2 | const uefi = std.os.uefi; |
| 3 | const Guid = uefi.Guid; | 3 | const Guid = uefi.Guid; |
| 4 | const Status = uefi.Status; | 4 | const Status = uefi.Status; |
| 5 | const cc = uefi.cc; | ||
| 5 | 6 | ||
| 6 | /// Random Number Generator protocol | 7 | /// Random Number Generator protocol |
| 7 | pub const RNGProtocol = extern struct { | 8 | pub const RNGProtocol = extern struct { |
| 8 | _get_info: *const fn (*const RNGProtocol, *usize, [*]align(8) Guid) callconv(.C) Status, | 9 | _get_info: *const fn (*const RNGProtocol, *usize, [*]align(8) Guid) callconv(cc) Status, |
| 9 | _get_rng: *const fn (*const RNGProtocol, ?*align(8) const Guid, usize, [*]u8) callconv(.C) Status, | 10 | _get_rng: *const fn (*const RNGProtocol, ?*align(8) const Guid, usize, [*]u8) callconv(cc) Status, |
| 10 | 11 | ||
| 11 | /// Returns information about the random number generation implementation. | 12 | /// Returns information about the random number generation implementation. |
| 12 | pub fn getInfo(self: *const RNGProtocol, list_size: *usize, list: [*]align(8) Guid) Status { | 13 | pub fn getInfo(self: *const RNGProtocol, list_size: *usize, list: [*]align(8) Guid) Status { |
lib/std/os/uefi/protocols/simple_file_system_protocol.zig+2-1| ... | @@ -3,10 +3,11 @@ const uefi = std.os.uefi; | ... | @@ -3,10 +3,11 @@ const uefi = std.os.uefi; |
| 3 | const Guid = uefi.Guid; | 3 | const Guid = uefi.Guid; |
| 4 | const FileProtocol = uefi.protocols.FileProtocol; | 4 | const FileProtocol = uefi.protocols.FileProtocol; |
| 5 | const Status = uefi.Status; | 5 | const Status = uefi.Status; |
| 6 | const cc = uefi.cc; | ||
| 6 | 7 | ||
| 7 | pub const SimpleFileSystemProtocol = extern struct { | 8 | pub const SimpleFileSystemProtocol = extern struct { |
| 8 | revision: u64, | 9 | revision: u64, |
| 9 | _open_volume: *const fn (*const SimpleFileSystemProtocol, **const FileProtocol) callconv(.C) Status, | 10 | _open_volume: *const fn (*const SimpleFileSystemProtocol, **const FileProtocol) callconv(cc) Status, |
| 10 | 11 | ||
| 11 | pub fn openVolume(self: *const SimpleFileSystemProtocol, root: **const FileProtocol) Status { | 12 | pub fn openVolume(self: *const SimpleFileSystemProtocol, root: **const FileProtocol) Status { |
| 12 | return self._open_volume(self, root); | 13 | return self._open_volume(self, root); |
lib/std/os/uefi/protocols/simple_network_protocol.zig+14-13| ... | @@ -3,22 +3,23 @@ const uefi = std.os.uefi; | ... | @@ -3,22 +3,23 @@ const uefi = std.os.uefi; |
| 3 | const Event = uefi.Event; | 3 | const Event = uefi.Event; |
| 4 | const Guid = uefi.Guid; | 4 | const Guid = uefi.Guid; |
| 5 | const Status = uefi.Status; | 5 | const Status = uefi.Status; |
| 6 | const cc = uefi.cc; | ||
| 6 | 7 | ||
| 7 | pub const SimpleNetworkProtocol = extern struct { | 8 | pub const SimpleNetworkProtocol = extern struct { |
| 8 | revision: u64, | 9 | revision: u64, |
| 9 | _start: *const fn (*const SimpleNetworkProtocol) callconv(.C) Status, | 10 | _start: *const fn (*const SimpleNetworkProtocol) callconv(cc) Status, |
| 10 | _stop: *const fn (*const SimpleNetworkProtocol) callconv(.C) Status, | 11 | _stop: *const fn (*const SimpleNetworkProtocol) callconv(cc) Status, |
| 11 | _initialize: *const fn (*const SimpleNetworkProtocol, usize, usize) callconv(.C) Status, | 12 | _initialize: *const fn (*const SimpleNetworkProtocol, usize, usize) callconv(cc) Status, |
| 12 | _reset: *const fn (*const SimpleNetworkProtocol, bool) callconv(.C) Status, | 13 | _reset: *const fn (*const SimpleNetworkProtocol, bool) callconv(cc) Status, |
| 13 | _shutdown: *const fn (*const SimpleNetworkProtocol) callconv(.C) Status, | 14 | _shutdown: *const fn (*const SimpleNetworkProtocol) callconv(cc) Status, |
| 14 | _receive_filters: *const fn (*const SimpleNetworkProtocol, SimpleNetworkReceiveFilter, SimpleNetworkReceiveFilter, bool, usize, ?[*]const MacAddress) callconv(.C) Status, | 15 | _receive_filters: *const fn (*const SimpleNetworkProtocol, SimpleNetworkReceiveFilter, SimpleNetworkReceiveFilter, bool, usize, ?[*]const MacAddress) callconv(cc) Status, |
| 15 | _station_address: *const fn (*const SimpleNetworkProtocol, bool, ?*const MacAddress) callconv(.C) Status, | 16 | _station_address: *const fn (*const SimpleNetworkProtocol, bool, ?*const MacAddress) callconv(cc) Status, |
| 16 | _statistics: *const fn (*const SimpleNetworkProtocol, bool, ?*usize, ?*NetworkStatistics) callconv(.C) Status, | 17 | _statistics: *const fn (*const SimpleNetworkProtocol, bool, ?*usize, ?*NetworkStatistics) callconv(cc) Status, |
| 17 | _mcast_ip_to_mac: *const fn (*const SimpleNetworkProtocol, bool, *const anyopaque, *MacAddress) callconv(.C) Status, | 18 | _mcast_ip_to_mac: *const fn (*const SimpleNetworkProtocol, bool, *const anyopaque, *MacAddress) callconv(cc) Status, |
| 18 | _nvdata: *const fn (*const SimpleNetworkProtocol, bool, usize, usize, [*]u8) callconv(.C) Status, | 19 | _nvdata: *const fn (*const SimpleNetworkProtocol, bool, usize, usize, [*]u8) callconv(cc) Status, |
| 19 | _get_status: *const fn (*const SimpleNetworkProtocol, *SimpleNetworkInterruptStatus, ?*?[*]u8) callconv(.C) Status, | 20 | _get_status: *const fn (*const SimpleNetworkProtocol, *SimpleNetworkInterruptStatus, ?*?[*]u8) callconv(cc) Status, |
| 20 | _transmit: *const fn (*const SimpleNetworkProtocol, usize, usize, [*]const u8, ?*const MacAddress, ?*const MacAddress, ?*const u16) callconv(.C) Status, | 21 | _transmit: *const fn (*const SimpleNetworkProtocol, usize, usize, [*]const u8, ?*const MacAddress, ?*const MacAddress, ?*const u16) callconv(cc) Status, |
| 21 | _receive: *const fn (*const SimpleNetworkProtocol, ?*usize, *usize, [*]u8, ?*MacAddress, ?*MacAddress, ?*u16) callconv(.C) Status, | 22 | _receive: *const fn (*const SimpleNetworkProtocol, ?*usize, *usize, [*]u8, ?*MacAddress, ?*MacAddress, ?*u16) callconv(cc) Status, |
| 22 | wait_for_packet: Event, | 23 | wait_for_packet: Event, |
| 23 | mode: *SimpleNetworkMode, | 24 | mode: *SimpleNetworkMode, |
| 24 | 25 |
lib/std/os/uefi/protocols/simple_pointer_protocol.zig+3-2| ... | @@ -3,11 +3,12 @@ const uefi = std.os.uefi; | ... | @@ -3,11 +3,12 @@ const uefi = std.os.uefi; |
| 3 | const Event = uefi.Event; | 3 | const Event = uefi.Event; |
| 4 | const Guid = uefi.Guid; | 4 | const Guid = uefi.Guid; |
| 5 | const Status = uefi.Status; | 5 | const Status = uefi.Status; |
| 6 | const cc = uefi.cc; | ||
| 6 | 7 | ||
| 7 | /// Protocol for mice | 8 | /// Protocol for mice |
| 8 | pub const SimplePointerProtocol = struct { | 9 | pub const SimplePointerProtocol = struct { |
| 9 | _reset: *const fn (*const SimplePointerProtocol, bool) callconv(.C) Status, | 10 | _reset: *const fn (*const SimplePointerProtocol, bool) callconv(cc) Status, |
| 10 | _get_state: *const fn (*const SimplePointerProtocol, *SimplePointerState) callconv(.C) Status, | 11 | _get_state: *const fn (*const SimplePointerProtocol, *SimplePointerState) callconv(cc) Status, |
| 11 | wait_for_input: Event, | 12 | wait_for_input: Event, |
| 12 | mode: *SimplePointerMode, | 13 | mode: *SimplePointerMode, |
| 13 | 14 |
lib/std/os/uefi/protocols/simple_text_input_ex_protocol.zig+7-6| ... | @@ -3,15 +3,16 @@ const uefi = std.os.uefi; | ... | @@ -3,15 +3,16 @@ const uefi = std.os.uefi; |
| 3 | const Event = uefi.Event; | 3 | const Event = uefi.Event; |
| 4 | const Guid = uefi.Guid; | 4 | const Guid = uefi.Guid; |
| 5 | const Status = uefi.Status; | 5 | const Status = uefi.Status; |
| 6 | const cc = uefi.cc; | ||
| 6 | 7 | ||
| 7 | /// Character input devices, e.g. Keyboard | 8 | /// Character input devices, e.g. Keyboard |
| 8 | pub const SimpleTextInputExProtocol = extern struct { | 9 | pub const SimpleTextInputExProtocol = extern struct { |
| 9 | _reset: *const fn (*const SimpleTextInputExProtocol, bool) callconv(.C) Status, | 10 | _reset: *const fn (*const SimpleTextInputExProtocol, bool) callconv(cc) Status, |
| 10 | _read_key_stroke_ex: *const fn (*const SimpleTextInputExProtocol, *KeyData) callconv(.C) Status, | 11 | _read_key_stroke_ex: *const fn (*const SimpleTextInputExProtocol, *KeyData) callconv(cc) Status, |
| 11 | wait_for_key_ex: Event, | 12 | wait_for_key_ex: Event, |
| 12 | _set_state: *const fn (*const SimpleTextInputExProtocol, *const u8) callconv(.C) Status, | 13 | _set_state: *const fn (*const SimpleTextInputExProtocol, *const u8) callconv(cc) Status, |
| 13 | _register_key_notify: *const fn (*const SimpleTextInputExProtocol, *const KeyData, *const fn (*const KeyData) callconv(.C) usize, **anyopaque) callconv(.C) Status, | 14 | _register_key_notify: *const fn (*const SimpleTextInputExProtocol, *const KeyData, *const fn (*const KeyData) callconv(cc) usize, **anyopaque) callconv(cc) Status, |
| 14 | _unregister_key_notify: *const fn (*const SimpleTextInputExProtocol, *const anyopaque) callconv(.C) Status, | 15 | _unregister_key_notify: *const fn (*const SimpleTextInputExProtocol, *const anyopaque) callconv(cc) Status, |
| 15 | 16 | ||
| 16 | /// Resets the input device hardware. | 17 | /// Resets the input device hardware. |
| 17 | pub fn reset(self: *const SimpleTextInputExProtocol, verify: bool) Status { | 18 | pub fn reset(self: *const SimpleTextInputExProtocol, verify: bool) Status { |
| ... | @@ -29,7 +30,7 @@ pub const SimpleTextInputExProtocol = extern struct { | ... | @@ -29,7 +30,7 @@ pub const SimpleTextInputExProtocol = extern struct { |
| 29 | } | 30 | } |
| 30 | 31 | ||
| 31 | /// Register a notification function for a particular keystroke for the input device. | 32 | /// Register a notification function for a particular keystroke for the input device. |
| 32 | pub fn registerKeyNotify(self: *const SimpleTextInputExProtocol, key_data: *const KeyData, notify: *const fn (*const KeyData) callconv(.C) usize, handle: **anyopaque) Status { | 33 | pub fn registerKeyNotify(self: *const SimpleTextInputExProtocol, key_data: *const KeyData, notify: *const fn (*const KeyData) callconv(cc) usize, handle: **anyopaque) Status { |
| 33 | return self._register_key_notify(self, key_data, notify, handle); | 34 | return self._register_key_notify(self, key_data, notify, handle); |
| 34 | } | 35 | } |
| 35 | 36 |
lib/std/os/uefi/protocols/simple_text_input_protocol.zig+3-2| ... | @@ -4,11 +4,12 @@ const Event = uefi.Event; | ... | @@ -4,11 +4,12 @@ const Event = uefi.Event; |
| 4 | const Guid = uefi.Guid; | 4 | const Guid = uefi.Guid; |
| 5 | const InputKey = uefi.protocols.InputKey; | 5 | const InputKey = uefi.protocols.InputKey; |
| 6 | const Status = uefi.Status; | 6 | const Status = uefi.Status; |
| 7 | const cc = uefi.cc; | ||
| 7 | 8 | ||
| 8 | /// Character input devices, e.g. Keyboard | 9 | /// Character input devices, e.g. Keyboard |
| 9 | pub const SimpleTextInputProtocol = extern struct { | 10 | pub const SimpleTextInputProtocol = extern struct { |
| 10 | _reset: *const fn (*const SimpleTextInputProtocol, bool) callconv(.C) Status, | 11 | _reset: *const fn (*const SimpleTextInputProtocol, bool) callconv(cc) Status, |
| 11 | _read_key_stroke: *const fn (*const SimpleTextInputProtocol, *InputKey) callconv(.C) Status, | 12 | _read_key_stroke: *const fn (*const SimpleTextInputProtocol, *InputKey) callconv(cc) Status, |
| 12 | wait_for_key: Event, | 13 | wait_for_key: Event, |
| 13 | 14 | ||
| 14 | /// Resets the input device hardware. | 15 | /// Resets the input device hardware. |
lib/std/os/uefi/protocols/simple_text_output_protocol.zig+10-9| ... | @@ -2,18 +2,19 @@ const std = @import("std"); | ... | @@ -2,18 +2,19 @@ const std = @import("std"); |
| 2 | const uefi = std.os.uefi; | 2 | const uefi = std.os.uefi; |
| 3 | const Guid = uefi.Guid; | 3 | const Guid = uefi.Guid; |
| 4 | const Status = uefi.Status; | 4 | const Status = uefi.Status; |
| 5 | const cc = uefi.cc; | ||
| 5 | 6 | ||
| 6 | /// Character output devices | 7 | /// Character output devices |
| 7 | pub const SimpleTextOutputProtocol = extern struct { | 8 | pub const SimpleTextOutputProtocol = extern struct { |
| 8 | _reset: *const fn (*const SimpleTextOutputProtocol, bool) callconv(.C) Status, | 9 | _reset: *const fn (*const SimpleTextOutputProtocol, bool) callconv(cc) Status, |
| 9 | _output_string: *const fn (*const SimpleTextOutputProtocol, [*:0]const u16) callconv(.C) Status, | 10 | _output_string: *const fn (*const SimpleTextOutputProtocol, [*:0]const u16) callconv(cc) Status, |
| 10 | _test_string: *const fn (*const SimpleTextOutputProtocol, [*:0]const u16) callconv(.C) Status, | 11 | _test_string: *const fn (*const SimpleTextOutputProtocol, [*:0]const u16) callconv(cc) Status, |
| 11 | _query_mode: *const fn (*const SimpleTextOutputProtocol, usize, *usize, *usize) callconv(.C) Status, | 12 | _query_mode: *const fn (*const SimpleTextOutputProtocol, usize, *usize, *usize) callconv(cc) Status, |
| 12 | _set_mode: *const fn (*const SimpleTextOutputProtocol, usize) callconv(.C) Status, | 13 | _set_mode: *const fn (*const SimpleTextOutputProtocol, usize) callconv(cc) Status, |
| 13 | _set_attribute: *const fn (*const SimpleTextOutputProtocol, usize) callconv(.C) Status, | 14 | _set_attribute: *const fn (*const SimpleTextOutputProtocol, usize) callconv(cc) Status, |
| 14 | _clear_screen: *const fn (*const SimpleTextOutputProtocol) callconv(.C) Status, | 15 | _clear_screen: *const fn (*const SimpleTextOutputProtocol) callconv(cc) Status, |
| 15 | _set_cursor_position: *const fn (*const SimpleTextOutputProtocol, usize, usize) callconv(.C) Status, | 16 | _set_cursor_position: *const fn (*const SimpleTextOutputProtocol, usize, usize) callconv(cc) Status, |
| 16 | _enable_cursor: *const fn (*const SimpleTextOutputProtocol, bool) callconv(.C) Status, | 17 | _enable_cursor: *const fn (*const SimpleTextOutputProtocol, bool) callconv(cc) Status, |
| 17 | mode: *SimpleTextOutputMode, | 18 | mode: *SimpleTextOutputMode, |
| 18 | 19 | ||
| 19 | /// Resets the text output device hardware. | 20 | /// Resets the text output device hardware. |
lib/std/os/uefi/protocols/udp6_protocol.zig+8-7| ... | @@ -8,15 +8,16 @@ const Ip6ModeData = uefi.protocols.Ip6ModeData; | ... | @@ -8,15 +8,16 @@ const Ip6ModeData = uefi.protocols.Ip6ModeData; |
| 8 | const Ip6Address = uefi.protocols.Ip6Address; | 8 | const Ip6Address = uefi.protocols.Ip6Address; |
| 9 | const ManagedNetworkConfigData = uefi.protocols.ManagedNetworkConfigData; | 9 | const ManagedNetworkConfigData = uefi.protocols.ManagedNetworkConfigData; |
| 10 | const SimpleNetworkMode = uefi.protocols.SimpleNetworkMode; | 10 | const SimpleNetworkMode = uefi.protocols.SimpleNetworkMode; |
| 11 | const cc = uefi.cc; | ||
| 11 | 12 | ||
| 12 | pub const Udp6Protocol = extern struct { | 13 | pub const Udp6Protocol = extern struct { |
| 13 | _get_mode_data: *const fn (*const Udp6Protocol, ?*Udp6ConfigData, ?*Ip6ModeData, ?*ManagedNetworkConfigData, ?*SimpleNetworkMode) callconv(.C) Status, | 14 | _get_mode_data: *const fn (*const Udp6Protocol, ?*Udp6ConfigData, ?*Ip6ModeData, ?*ManagedNetworkConfigData, ?*SimpleNetworkMode) callconv(cc) Status, |
| 14 | _configure: *const fn (*const Udp6Protocol, ?*const Udp6ConfigData) callconv(.C) Status, | 15 | _configure: *const fn (*const Udp6Protocol, ?*const Udp6ConfigData) callconv(cc) Status, |
| 15 | _groups: *const fn (*const Udp6Protocol, bool, ?*const Ip6Address) callconv(.C) Status, | 16 | _groups: *const fn (*const Udp6Protocol, bool, ?*const Ip6Address) callconv(cc) Status, |
| 16 | _transmit: *const fn (*const Udp6Protocol, *Udp6CompletionToken) callconv(.C) Status, | 17 | _transmit: *const fn (*const Udp6Protocol, *Udp6CompletionToken) callconv(cc) Status, |
| 17 | _receive: *const fn (*const Udp6Protocol, *Udp6CompletionToken) callconv(.C) Status, | 18 | _receive: *const fn (*const Udp6Protocol, *Udp6CompletionToken) callconv(cc) Status, |
| 18 | _cancel: *const fn (*const Udp6Protocol, ?*Udp6CompletionToken) callconv(.C) Status, | 19 | _cancel: *const fn (*const Udp6Protocol, ?*Udp6CompletionToken) callconv(cc) Status, |
| 19 | _poll: *const fn (*const Udp6Protocol) callconv(.C) Status, | 20 | _poll: *const fn (*const Udp6Protocol) callconv(cc) Status, |
| 20 | 21 | ||
| 21 | pub fn getModeData(self: *const Udp6Protocol, udp6_config_data: ?*Udp6ConfigData, ip6_mode_data: ?*Ip6ModeData, mnp_config_data: ?*ManagedNetworkConfigData, snp_mode_data: ?*SimpleNetworkMode) Status { | 22 | pub fn getModeData(self: *const Udp6Protocol, udp6_config_data: ?*Udp6ConfigData, ip6_mode_data: ?*Ip6ModeData, mnp_config_data: ?*ManagedNetworkConfigData, snp_mode_data: ?*SimpleNetworkMode) Status { |
| 22 | return self._get_mode_data(self, udp6_config_data, ip6_mode_data, mnp_config_data, snp_mode_data); | 23 | return self._get_mode_data(self, udp6_config_data, ip6_mode_data, mnp_config_data, snp_mode_data); |
lib/std/os/uefi/protocols/udp6_service_binding_protocol.zig+3-2| ... | @@ -3,10 +3,11 @@ const uefi = std.os.uefi; | ... | @@ -3,10 +3,11 @@ const uefi = std.os.uefi; |
| 3 | const Handle = uefi.Handle; | 3 | const Handle = uefi.Handle; |
| 4 | const Guid = uefi.Guid; | 4 | const Guid = uefi.Guid; |
| 5 | const Status = uefi.Status; | 5 | const Status = uefi.Status; |
| 6 | const cc = uefi.cc; | ||
| 6 | 7 | ||
| 7 | pub const Udp6ServiceBindingProtocol = extern struct { | 8 | pub const Udp6ServiceBindingProtocol = extern struct { |
| 8 | _create_child: *const fn (*const Udp6ServiceBindingProtocol, *?Handle) callconv(.C) Status, | 9 | _create_child: *const fn (*const Udp6ServiceBindingProtocol, *?Handle) callconv(cc) Status, |
| 9 | _destroy_child: *const fn (*const Udp6ServiceBindingProtocol, Handle) callconv(.C) Status, | 10 | _destroy_child: *const fn (*const Udp6ServiceBindingProtocol, Handle) callconv(cc) Status, |
| 10 | 11 | ||
| 11 | pub fn createChild(self: *const Udp6ServiceBindingProtocol, handle: *?Handle) Status { | 12 | pub fn createChild(self: *const Udp6ServiceBindingProtocol, handle: *?Handle) Status { |
| 12 | return self._create_child(self, handle); | 13 | return self._create_child(self, handle); |
lib/std/os/uefi/tables/boot_services.zig+45-42| ... | @@ -6,6 +6,7 @@ const Handle = uefi.Handle; | ... | @@ -6,6 +6,7 @@ const Handle = uefi.Handle; |
| 6 | const Status = uefi.Status; | 6 | const Status = uefi.Status; |
| 7 | const TableHeader = uefi.tables.TableHeader; | 7 | const TableHeader = uefi.tables.TableHeader; |
| 8 | const DevicePathProtocol = uefi.protocols.DevicePathProtocol; | 8 | const DevicePathProtocol = uefi.protocols.DevicePathProtocol; |
| 9 | const cc = uefi.cc; | ||
| 9 | 10 | ||
| 10 | /// Boot services are services provided by the system's firmware until the operating system takes | 11 | /// Boot services are services provided by the system's firmware until the operating system takes |
| 11 | /// over control over the hardware by calling exitBootServices. | 12 | /// over control over the hardware by calling exitBootServices. |
| ... | @@ -22,138 +23,140 @@ pub const BootServices = extern struct { | ... | @@ -22,138 +23,140 @@ pub const BootServices = extern struct { |
| 22 | hdr: TableHeader, | 23 | hdr: TableHeader, |
| 23 | 24 | ||
| 24 | /// Raises a task's priority level and returns its previous level. | 25 | /// Raises a task's priority level and returns its previous level. |
| 25 | raiseTpl: *const fn (new_tpl: usize) callconv(.C) usize, | 26 | raiseTpl: *const fn (new_tpl: usize) callconv(cc) usize, |
| 26 | 27 | ||
| 27 | /// Restores a task's priority level to its previous value. | 28 | /// Restores a task's priority level to its previous value. |
| 28 | restoreTpl: *const fn (old_tpl: usize) callconv(.C) void, | 29 | restoreTpl: *const fn (old_tpl: usize) callconv(cc) void, |
| 29 | 30 | ||
| 30 | /// Allocates memory pages from the system. | 31 | /// Allocates memory pages from the system. |
| 31 | allocatePages: *const fn (alloc_type: AllocateType, mem_type: MemoryType, pages: usize, memory: *[*]align(4096) u8) callconv(.C) Status, | 32 | allocatePages: *const fn (alloc_type: AllocateType, mem_type: MemoryType, pages: usize, memory: *[*]align(4096) u8) callconv(cc) Status, |
| 32 | 33 | ||
| 33 | /// Frees memory pages. | 34 | /// Frees memory pages. |
| 34 | freePages: *const fn (memory: [*]align(4096) u8, pages: usize) callconv(.C) Status, | 35 | freePages: *const fn (memory: [*]align(4096) u8, pages: usize) callconv(cc) Status, |
| 35 | 36 | ||
| 36 | /// Returns the current memory map. | 37 | /// Returns the current memory map. |
| 37 | getMemoryMap: *const fn (mmap_size: *usize, mmap: ?[*]MemoryDescriptor, mapKey: *usize, descriptor_size: *usize, descriptor_version: *u32) callconv(.C) Status, | 38 | getMemoryMap: *const fn (mmap_size: *usize, mmap: ?[*]MemoryDescriptor, mapKey: *usize, descriptor_size: *usize, descriptor_version: *u32) callconv(cc) Status, |
| 38 | 39 | ||
| 39 | /// Allocates pool memory. | 40 | /// Allocates pool memory. |
| 40 | allocatePool: *const fn (pool_type: MemoryType, size: usize, buffer: *[*]align(8) u8) callconv(.C) Status, | 41 | allocatePool: *const fn (pool_type: MemoryType, size: usize, buffer: *[*]align(8) u8) callconv(cc) Status, |
| 41 | 42 | ||
| 42 | /// Returns pool memory to the system. | 43 | /// Returns pool memory to the system. |
| 43 | freePool: *const fn (buffer: [*]align(8) u8) callconv(.C) Status, | 44 | freePool: *const fn (buffer: [*]align(8) u8) callconv(cc) Status, |
| 44 | 45 | ||
| 45 | /// Creates an event. | 46 | /// Creates an event. |
| 46 | createEvent: *const fn (type: u32, notify_tpl: usize, notify_func: ?*const fn (Event, ?*anyopaque) callconv(.C) void, notifyCtx: ?*const anyopaque, event: *Event) callconv(.C) Status, | 47 | createEvent: *const fn (type: u32, notify_tpl: usize, notify_func: ?*const fn (Event, ?*anyopaque) callconv(cc) void, notifyCtx: ?*const anyopaque, event: *Event) callconv(cc) Status, |
| 47 | 48 | ||
| 48 | /// Sets the type of timer and the trigger time for a timer event. | 49 | /// Sets the type of timer and the trigger time for a timer event. |
| 49 | setTimer: *const fn (event: Event, type: TimerDelay, triggerTime: u64) callconv(.C) Status, | 50 | setTimer: *const fn (event: Event, type: TimerDelay, triggerTime: u64) callconv(cc) Status, |
| 50 | 51 | ||
| 51 | /// Stops execution until an event is signaled. | 52 | /// Stops execution until an event is signaled. |
| 52 | waitForEvent: *const fn (event_len: usize, events: [*]const Event, index: *usize) callconv(.C) Status, | 53 | waitForEvent: *const fn (event_len: usize, events: [*]const Event, index: *usize) callconv(cc) Status, |
| 53 | 54 | ||
| 54 | /// Signals an event. | 55 | /// Signals an event. |
| 55 | signalEvent: *const fn (event: Event) callconv(.C) Status, | 56 | signalEvent: *const fn (event: Event) callconv(cc) Status, |
| 56 | 57 | ||
| 57 | /// Closes an event. | 58 | /// Closes an event. |
| 58 | closeEvent: *const fn (event: Event) callconv(.C) Status, | 59 | closeEvent: *const fn (event: Event) callconv(cc) Status, |
| 59 | 60 | ||
| 60 | /// Checks whether an event is in the signaled state. | 61 | /// Checks whether an event is in the signaled state. |
| 61 | checkEvent: *const fn (event: Event) callconv(.C) Status, | 62 | checkEvent: *const fn (event: Event) callconv(cc) Status, |
| 62 | 63 | ||
| 63 | /// Installs a protocol interface on a device handle. If the handle does not exist, it is created | 64 | /// Installs a protocol interface on a device handle. If the handle does not exist, it is created |
| 64 | /// and added to the list of handles in the system. installMultipleProtocolInterfaces() | 65 | /// and added to the list of handles in the system. installMultipleProtocolInterfaces() |
| 65 | /// performs more error checking than installProtocolInterface(), so its use is recommended over this. | 66 | /// performs more error checking than installProtocolInterface(), so its use is recommended over this. |
| 66 | installProtocolInterface: *const fn (handle: Handle, protocol: *align(8) const Guid, interface_type: EfiInterfaceType, interface: *anyopaque) callconv(.C) Status, | 67 | installProtocolInterface: *const fn (handle: Handle, protocol: *align(8) const Guid, interface_type: EfiInterfaceType, interface: *anyopaque) callconv(cc) Status, |
| 67 | 68 | ||
| 68 | /// Reinstalls a protocol interface on a device handle | 69 | /// Reinstalls a protocol interface on a device handle |
| 69 | reinstallProtocolInterface: *const fn (handle: Handle, protocol: *align(8) const Guid, old_interface: *anyopaque, new_interface: *anyopaque) callconv(.C) Status, | 70 | reinstallProtocolInterface: *const fn (handle: Handle, protocol: *align(8) const Guid, old_interface: *anyopaque, new_interface: *anyopaque) callconv(cc) Status, |
| 70 | 71 | ||
| 71 | /// Removes a protocol interface from a device handle. Usage of | 72 | /// Removes a protocol interface from a device handle. Usage of |
| 72 | /// uninstallMultipleProtocolInterfaces is recommended over this. | 73 | /// uninstallMultipleProtocolInterfaces is recommended over this. |
| 73 | uninstallProtocolInterface: *const fn (handle: Handle, protocol: *align(8) const Guid, interface: *anyopaque) callconv(.C) Status, | 74 | uninstallProtocolInterface: *const fn (handle: Handle, protocol: *align(8) const Guid, interface: *anyopaque) callconv(cc) Status, |
| 74 | 75 | ||
| 75 | /// Queries a handle to determine if it supports a specified protocol. | 76 | /// Queries a handle to determine if it supports a specified protocol. |
| 76 | handleProtocol: *const fn (handle: Handle, protocol: *align(8) const Guid, interface: *?*anyopaque) callconv(.C) Status, | 77 | handleProtocol: *const fn (handle: Handle, protocol: *align(8) const Guid, interface: *?*anyopaque) callconv(cc) Status, |
| 77 | 78 | ||
| 78 | reserved: *anyopaque, | 79 | reserved: *anyopaque, |
| 79 | 80 | ||
| 80 | /// Creates an event that is to be signaled whenever an interface is installed for a specified protocol. | 81 | /// Creates an event that is to be signaled whenever an interface is installed for a specified protocol. |
| 81 | registerProtocolNotify: *const fn (protocol: *align(8) const Guid, event: Event, registration: **anyopaque) callconv(.C) Status, | 82 | registerProtocolNotify: *const fn (protocol: *align(8) const Guid, event: Event, registration: **anyopaque) callconv(cc) Status, |
| 82 | 83 | ||
| 83 | /// Returns an array of handles that support a specified protocol. | 84 | /// Returns an array of handles that support a specified protocol. |
| 84 | locateHandle: *const fn (search_type: LocateSearchType, protocol: ?*align(8) const Guid, search_key: ?*const anyopaque, bufferSize: *usize, buffer: [*]Handle) callconv(.C) Status, | 85 | locateHandle: *const fn (search_type: LocateSearchType, protocol: ?*align(8) const Guid, search_key: ?*const anyopaque, bufferSize: *usize, buffer: [*]Handle) callconv(cc) Status, |
| 85 | 86 | ||
| 86 | /// Locates the handle to a device on the device path that supports the specified protocol | 87 | /// Locates the handle to a device on the device path that supports the specified protocol |
| 87 | locateDevicePath: *const fn (protocols: *align(8) const Guid, device_path: **const DevicePathProtocol, device: *?Handle) callconv(.C) Status, | 88 | locateDevicePath: *const fn (protocols: *align(8) const Guid, device_path: **const DevicePathProtocol, device: *?Handle) callconv(cc) Status, |
| 88 | 89 | ||
| 89 | /// Adds, updates, or removes a configuration table entry from the EFI System Table. | 90 | /// Adds, updates, or removes a configuration table entry from the EFI System Table. |
| 90 | installConfigurationTable: *const fn (guid: *align(8) const Guid, table: ?*anyopaque) callconv(.C) Status, | 91 | installConfigurationTable: *const fn (guid: *align(8) const Guid, table: ?*anyopaque) callconv(cc) Status, |
| 91 | 92 | ||
| 92 | /// Loads an EFI image into memory. | 93 | /// Loads an EFI image into memory. |
| 93 | loadImage: *const fn (boot_policy: bool, parent_image_handle: Handle, device_path: ?*const DevicePathProtocol, source_buffer: ?[*]const u8, source_size: usize, imageHandle: *?Handle) callconv(.C) Status, | 94 | loadImage: *const fn (boot_policy: bool, parent_image_handle: Handle, device_path: ?*const DevicePathProtocol, source_buffer: ?[*]const u8, source_size: usize, imageHandle: *?Handle) callconv(cc) Status, |
| 94 | 95 | ||
| 95 | /// Transfers control to a loaded image's entry point. | 96 | /// Transfers control to a loaded image's entry point. |
| 96 | startImage: *const fn (image_handle: Handle, exit_data_size: ?*usize, exit_data: ?*[*]u16) callconv(.C) Status, | 97 | startImage: *const fn (image_handle: Handle, exit_data_size: ?*usize, exit_data: ?*[*]u16) callconv(cc) Status, |
| 97 | 98 | ||
| 98 | /// Terminates a loaded EFI image and returns control to boot services. | 99 | /// Terminates a loaded EFI image and returns control to boot services. |
| 99 | exit: *const fn (image_handle: Handle, exit_status: Status, exit_data_size: usize, exit_data: ?*const anyopaque) callconv(.C) Status, | 100 | exit: *const fn (image_handle: Handle, exit_status: Status, exit_data_size: usize, exit_data: ?*const anyopaque) callconv(cc) Status, |
| 100 | 101 | ||
| 101 | /// Unloads an image. | 102 | /// Unloads an image. |
| 102 | unloadImage: *const fn (image_handle: Handle) callconv(.C) Status, | 103 | unloadImage: *const fn (image_handle: Handle) callconv(cc) Status, |
| 103 | 104 | ||
| 104 | /// Terminates all boot services. | 105 | /// Terminates all boot services. |
| 105 | exitBootServices: *const fn (image_handle: Handle, map_key: usize) callconv(.C) Status, | 106 | exitBootServices: *const fn (image_handle: Handle, map_key: usize) callconv(cc) Status, |
| 106 | 107 | ||
| 107 | /// Returns a monotonically increasing count for the platform. | 108 | /// Returns a monotonically increasing count for the platform. |
| 108 | getNextMonotonicCount: *const fn (count: *u64) callconv(.C) Status, | 109 | getNextMonotonicCount: *const fn (count: *u64) callconv(cc) Status, |
| 109 | 110 | ||
| 110 | /// Induces a fine-grained stall. | 111 | /// Induces a fine-grained stall. |
| 111 | stall: *const fn (microseconds: usize) callconv(.C) Status, | 112 | stall: *const fn (microseconds: usize) callconv(cc) Status, |
| 112 | 113 | ||
| 113 | /// Sets the system's watchdog timer. | 114 | /// Sets the system's watchdog timer. |
| 114 | setWatchdogTimer: *const fn (timeout: usize, watchdogCode: u64, data_size: usize, watchdog_data: ?[*]const u16) callconv(.C) Status, | 115 | setWatchdogTimer: *const fn (timeout: usize, watchdogCode: u64, data_size: usize, watchdog_data: ?[*]const u16) callconv(cc) Status, |
| 115 | 116 | ||
| 116 | /// Connects one or more drives to a controller. | 117 | /// Connects one or more drives to a controller. |
| 117 | connectController: *const fn (controller_handle: Handle, driver_image_handle: ?Handle, remaining_device_path: ?*DevicePathProtocol, recursive: bool) callconv(.C) Status, | 118 | connectController: *const fn (controller_handle: Handle, driver_image_handle: ?Handle, remaining_device_path: ?*DevicePathProtocol, recursive: bool) callconv(cc) Status, |
| 118 | 119 | ||
| 119 | // Disconnects one or more drivers from a controller | 120 | // Disconnects one or more drivers from a controller |
| 120 | disconnectController: *const fn (controller_handle: Handle, driver_image_handle: ?Handle, child_handle: ?Handle) callconv(.C) Status, | 121 | disconnectController: *const fn (controller_handle: Handle, driver_image_handle: ?Handle, child_handle: ?Handle) callconv(cc) Status, |
| 121 | 122 | ||
| 122 | /// Queries a handle to determine if it supports a specified protocol. | 123 | /// Queries a handle to determine if it supports a specified protocol. |
| 123 | openProtocol: *const fn (handle: Handle, protocol: *align(8) const Guid, interface: *?*anyopaque, agent_handle: ?Handle, controller_handle: ?Handle, attributes: OpenProtocolAttributes) callconv(.C) Status, | 124 | openProtocol: *const fn (handle: Handle, protocol: *align(8) const Guid, interface: *?*anyopaque, agent_handle: ?Handle, controller_handle: ?Handle, attributes: OpenProtocolAttributes) callconv(cc) Status, |
| 124 | 125 | ||
| 125 | /// Closes a protocol on a handle that was opened using openProtocol(). | 126 | /// Closes a protocol on a handle that was opened using openProtocol(). |
| 126 | closeProtocol: *const fn (handle: Handle, protocol: *align(8) const Guid, agentHandle: Handle, controller_handle: ?Handle) callconv(.C) Status, | 127 | closeProtocol: *const fn (handle: Handle, protocol: *align(8) const Guid, agentHandle: Handle, controller_handle: ?Handle) callconv(cc) Status, |
| 127 | 128 | ||
| 128 | /// Retrieves the list of agents that currently have a protocol interface opened. | 129 | /// Retrieves the list of agents that currently have a protocol interface opened. |
| 129 | openProtocolInformation: *const fn (handle: Handle, protocol: *align(8) const Guid, entry_buffer: *[*]ProtocolInformationEntry, entry_count: *usize) callconv(.C) Status, | 130 | openProtocolInformation: *const fn (handle: Handle, protocol: *align(8) const Guid, entry_buffer: *[*]ProtocolInformationEntry, entry_count: *usize) callconv(cc) Status, |
| 130 | 131 | ||
| 131 | /// Retrieves the list of protocol interface GUIDs that are installed on a handle in a buffer allocated from pool. | 132 | /// Retrieves the list of protocol interface GUIDs that are installed on a handle in a buffer allocated from pool. |
| 132 | protocolsPerHandle: *const fn (handle: Handle, protocol_buffer: *[*]*align(8) const Guid, protocol_buffer_count: *usize) callconv(.C) Status, | 133 | protocolsPerHandle: *const fn (handle: Handle, protocol_buffer: *[*]*align(8) const Guid, protocol_buffer_count: *usize) callconv(cc) Status, |
| 133 | 134 | ||
| 134 | /// Returns an array of handles that support the requested protocol in a buffer allocated from pool. | 135 | /// Returns an array of handles that support the requested protocol in a buffer allocated from pool. |
| 135 | locateHandleBuffer: *const fn (search_type: LocateSearchType, protocol: ?*align(8) const Guid, search_key: ?*const anyopaque, num_handles: *usize, buffer: *[*]Handle) callconv(.C) Status, | 136 | locateHandleBuffer: *const fn (search_type: LocateSearchType, protocol: ?*align(8) const Guid, search_key: ?*const anyopaque, num_handles: *usize, buffer: *[*]Handle) callconv(cc) Status, |
| 136 | 137 | ||
| 137 | /// Returns the first protocol instance that matches the given protocol. | 138 | /// Returns the first protocol instance that matches the given protocol. |
| 138 | locateProtocol: *const fn (protocol: *align(8) const Guid, registration: ?*const anyopaque, interface: *?*anyopaque) callconv(.C) Status, | 139 | locateProtocol: *const fn (protocol: *align(8) const Guid, registration: ?*const anyopaque, interface: *?*anyopaque) callconv(cc) Status, |
| 139 | 140 | ||
| 140 | /// Installs one or more protocol interfaces into the boot services environment | 141 | /// Installs one or more protocol interfaces into the boot services environment |
| 142 | // TODO: use callconv(cc) instead once that works | ||
| 141 | installMultipleProtocolInterfaces: *const fn (handle: *Handle, ...) callconv(.C) Status, | 143 | installMultipleProtocolInterfaces: *const fn (handle: *Handle, ...) callconv(.C) Status, |
| 142 | 144 | ||
| 143 | /// Removes one or more protocol interfaces into the boot services environment | 145 | /// Removes one or more protocol interfaces into the boot services environment |
| 146 | // TODO: use callconv(cc) instead once that works | ||
| 144 | uninstallMultipleProtocolInterfaces: *const fn (handle: *Handle, ...) callconv(.C) Status, | 147 | uninstallMultipleProtocolInterfaces: *const fn (handle: *Handle, ...) callconv(.C) Status, |
| 145 | 148 | ||
| 146 | /// Computes and returns a 32-bit CRC for a data buffer. | 149 | /// Computes and returns a 32-bit CRC for a data buffer. |
| 147 | calculateCrc32: *const fn (data: [*]const u8, data_size: usize, *u32) callconv(.C) Status, | 150 | calculateCrc32: *const fn (data: [*]const u8, data_size: usize, *u32) callconv(cc) Status, |
| 148 | 151 | ||
| 149 | /// Copies the contents of one buffer to another buffer | 152 | /// Copies the contents of one buffer to another buffer |
| 150 | copyMem: *const fn (dest: [*]u8, src: [*]const u8, len: usize) callconv(.C) void, | 153 | copyMem: *const fn (dest: [*]u8, src: [*]const u8, len: usize) callconv(cc) void, |
| 151 | 154 | ||
| 152 | /// Fills a buffer with a specified value | 155 | /// Fills a buffer with a specified value |
| 153 | setMem: *const fn (buffer: [*]u8, size: usize, value: u8) callconv(.C) void, | 156 | setMem: *const fn (buffer: [*]u8, size: usize, value: u8) callconv(cc) void, |
| 154 | 157 | ||
| 155 | /// Creates an event in a group. | 158 | /// Creates an event in a group. |
| 156 | createEventEx: *const fn (type: u32, notify_tpl: usize, notify_func: EfiEventNotify, notify_ctx: *const anyopaque, event_group: *align(8) const Guid, event: *Event) callconv(.C) Status, | 159 | createEventEx: *const fn (type: u32, notify_tpl: usize, notify_func: EfiEventNotify, notify_ctx: *const anyopaque, event_group: *align(8) const Guid, event: *Event) callconv(cc) Status, |
| 157 | 160 | ||
| 158 | /// Opens a protocol with a structure as the loaded image for a UEFI application | 161 | /// Opens a protocol with a structure as the loaded image for a UEFI application |
| 159 | pub fn openProtocolSt(self: *BootServices, comptime protocol: type, handle: Handle) !*protocol { | 162 | pub fn openProtocolSt(self: *BootServices, comptime protocol: type, handle: Handle) !*protocol { |
| ... | @@ -191,7 +194,7 @@ pub const BootServices = extern struct { | ... | @@ -191,7 +194,7 @@ pub const BootServices = extern struct { |
| 191 | pub const tpl_high_level: usize = 31; | 194 | pub const tpl_high_level: usize = 31; |
| 192 | }; | 195 | }; |
| 193 | 196 | ||
| 194 | pub const EfiEventNotify = *const fn (event: Event, ctx: *anyopaque) callconv(.C) void; | 197 | pub const EfiEventNotify = *const fn (event: Event, ctx: *anyopaque) callconv(cc) void; |
| 195 | 198 | ||
| 196 | pub const TimerDelay = enum(u32) { | 199 | pub const TimerDelay = enum(u32) { |
| 197 | TimerCancel, | 200 | TimerCancel, |
lib/std/os/uefi/tables/runtime_services.zig+15-14| ... | @@ -6,6 +6,7 @@ const Time = uefi.Time; | ... | @@ -6,6 +6,7 @@ const Time = uefi.Time; |
| 6 | const TimeCapabilities = uefi.TimeCapabilities; | 6 | const TimeCapabilities = uefi.TimeCapabilities; |
| 7 | const Status = uefi.Status; | 7 | const Status = uefi.Status; |
| 8 | const MemoryDescriptor = uefi.tables.MemoryDescriptor; | 8 | const MemoryDescriptor = uefi.tables.MemoryDescriptor; |
| 9 | const cc = uefi.cc; | ||
| 9 | 10 | ||
| 10 | /// Runtime services are provided by the firmware before and after exitBootServices has been called. | 11 | /// Runtime services are provided by the firmware before and after exitBootServices has been called. |
| 11 | /// | 12 | /// |
| ... | @@ -19,50 +20,50 @@ pub const RuntimeServices = extern struct { | ... | @@ -19,50 +20,50 @@ pub const RuntimeServices = extern struct { |
| 19 | hdr: TableHeader, | 20 | hdr: TableHeader, |
| 20 | 21 | ||
| 21 | /// Returns the current time and date information, and the time-keeping capabilities of the hardware platform. | 22 | /// Returns the current time and date information, and the time-keeping capabilities of the hardware platform. |
| 22 | getTime: *const fn (time: *uefi.Time, capabilities: ?*TimeCapabilities) callconv(.C) Status, | 23 | getTime: *const fn (time: *uefi.Time, capabilities: ?*TimeCapabilities) callconv(cc) Status, |
| 23 | 24 | ||
| 24 | /// Sets the current local time and date information | 25 | /// Sets the current local time and date information |
| 25 | setTime: *const fn (time: *uefi.Time) callconv(.C) Status, | 26 | setTime: *const fn (time: *uefi.Time) callconv(cc) Status, |
| 26 | 27 | ||
| 27 | /// Returns the current wakeup alarm clock setting | 28 | /// Returns the current wakeup alarm clock setting |
| 28 | getWakeupTime: *const fn (enabled: *bool, pending: *bool, time: *uefi.Time) callconv(.C) Status, | 29 | getWakeupTime: *const fn (enabled: *bool, pending: *bool, time: *uefi.Time) callconv(cc) Status, |
| 29 | 30 | ||
| 30 | /// Sets the system wakeup alarm clock time | 31 | /// Sets the system wakeup alarm clock time |
| 31 | setWakeupTime: *const fn (enable: *bool, time: ?*uefi.Time) callconv(.C) Status, | 32 | setWakeupTime: *const fn (enable: *bool, time: ?*uefi.Time) callconv(cc) Status, |
| 32 | 33 | ||
| 33 | /// Changes the runtime addressing mode of EFI firmware from physical to virtual. | 34 | /// Changes the runtime addressing mode of EFI firmware from physical to virtual. |
| 34 | setVirtualAddressMap: *const fn (mmap_size: usize, descriptor_size: usize, descriptor_version: u32, virtual_map: [*]MemoryDescriptor) callconv(.C) Status, | 35 | setVirtualAddressMap: *const fn (mmap_size: usize, descriptor_size: usize, descriptor_version: u32, virtual_map: [*]MemoryDescriptor) callconv(cc) Status, |
| 35 | 36 | ||
| 36 | /// Determines the new virtual address that is to be used on subsequent memory accesses. | 37 | /// Determines the new virtual address that is to be used on subsequent memory accesses. |
| 37 | convertPointer: *const fn (debug_disposition: usize, address: **anyopaque) callconv(.C) Status, | 38 | convertPointer: *const fn (debug_disposition: usize, address: **anyopaque) callconv(cc) Status, |
| 38 | 39 | ||
| 39 | /// Returns the value of a variable. | 40 | /// Returns the value of a variable. |
| 40 | getVariable: *const fn (var_name: [*:0]const u16, vendor_guid: *align(8) const Guid, attributes: ?*u32, data_size: *usize, data: ?*anyopaque) callconv(.C) Status, | 41 | getVariable: *const fn (var_name: [*:0]const u16, vendor_guid: *align(8) const Guid, attributes: ?*u32, data_size: *usize, data: ?*anyopaque) callconv(cc) Status, |
| 41 | 42 | ||
| 42 | /// Enumerates the current variable names. | 43 | /// Enumerates the current variable names. |
| 43 | getNextVariableName: *const fn (var_name_size: *usize, var_name: [*:0]u16, vendor_guid: *align(8) Guid) callconv(.C) Status, | 44 | getNextVariableName: *const fn (var_name_size: *usize, var_name: [*:0]u16, vendor_guid: *align(8) Guid) callconv(cc) Status, |
| 44 | 45 | ||
| 45 | /// Sets the value of a variable. | 46 | /// Sets the value of a variable. |
| 46 | setVariable: *const fn (var_name: [*:0]const u16, vendor_guid: *align(8) const Guid, attributes: u32, data_size: usize, data: *anyopaque) callconv(.C) Status, | 47 | setVariable: *const fn (var_name: [*:0]const u16, vendor_guid: *align(8) const Guid, attributes: u32, data_size: usize, data: *anyopaque) callconv(cc) Status, |
| 47 | 48 | ||
| 48 | /// Return the next high 32 bits of the platform's monotonic counter | 49 | /// Return the next high 32 bits of the platform's monotonic counter |
| 49 | getNextHighMonotonicCount: *const fn (high_count: *u32) callconv(.C) Status, | 50 | getNextHighMonotonicCount: *const fn (high_count: *u32) callconv(cc) Status, |
| 50 | 51 | ||
| 51 | /// Resets the entire platform. | 52 | /// Resets the entire platform. |
| 52 | resetSystem: *const fn (reset_type: ResetType, reset_status: Status, data_size: usize, reset_data: ?*const anyopaque) callconv(.C) noreturn, | 53 | resetSystem: *const fn (reset_type: ResetType, reset_status: Status, data_size: usize, reset_data: ?*const anyopaque) callconv(cc) noreturn, |
| 53 | 54 | ||
| 54 | /// Passes capsules to the firmware with both virtual and physical mapping. | 55 | /// Passes capsules to the firmware with both virtual and physical mapping. |
| 55 | /// Depending on the intended consumption, the firmware may process the capsule immediately. | 56 | /// Depending on the intended consumption, the firmware may process the capsule immediately. |
| 56 | /// If the payload should persist across a system reset, the reset value returned from | 57 | /// If the payload should persist across a system reset, the reset value returned from |
| 57 | /// `queryCapsuleCapabilities` must be passed into resetSystem and will cause the capsule | 58 | /// `queryCapsuleCapabilities` must be passed into resetSystem and will cause the capsule |
| 58 | /// to be processed by the firmware as part of the reset process. | 59 | /// to be processed by the firmware as part of the reset process. |
| 59 | updateCapsule: *const fn (capsule_header_array: **CapsuleHeader, capsule_count: usize, scatter_gather_list: EfiPhysicalAddress) callconv(.C) Status, | 60 | updateCapsule: *const fn (capsule_header_array: **CapsuleHeader, capsule_count: usize, scatter_gather_list: EfiPhysicalAddress) callconv(cc) Status, |
| 60 | 61 | ||
| 61 | /// Returns if the capsule can be supported via `updateCapsule` | 62 | /// Returns if the capsule can be supported via `updateCapsule` |
| 62 | queryCapsuleCapabilities: *const fn (capsule_header_array: **CapsuleHeader, capsule_count: usize, maximum_capsule_size: *usize, resetType: ResetType) callconv(.C) Status, | 63 | queryCapsuleCapabilities: *const fn (capsule_header_array: **CapsuleHeader, capsule_count: usize, maximum_capsule_size: *usize, resetType: ResetType) callconv(cc) Status, |
| 63 | 64 | ||
| 64 | /// Returns information about the EFI variables | 65 | /// Returns information about the EFI variables |
| 65 | queryVariableInfo: *const fn (attributes: *u32, maximum_variable_storage_size: *u64, remaining_variable_storage_size: *u64, maximum_variable_size: *u64) callconv(.C) Status, | 66 | queryVariableInfo: *const fn (attributes: *u32, maximum_variable_storage_size: *u64, remaining_variable_storage_size: *u64, maximum_variable_size: *u64) callconv(cc) Status, |
| 66 | 67 | ||
| 67 | pub const signature: u64 = 0x56524553544e5552; | 68 | pub const signature: u64 = 0x56524553544e5552; |
| 68 | }; | 69 | }; |