| ... | ... | @@ -59,23 +59,34 @@ pub const BootServices = extern struct { |
| 59 | 59 | /// Checks whether an event is in the signaled state. |
| 60 | 60 | checkEvent: fn (Event) callconv(.C) Status, |
| 61 | 61 | |
| 62 | | installProtocolInterface: Status, // TODO |
| 63 | | reinstallProtocolInterface: Status, // TODO |
| 64 | | uninstallProtocolInterface: Status, // TODO |
| 62 | /// Installs a protocol interface on a device handle. If the handle does not exist, it is created |
| 63 | /// and added to the list of handles in the system. installMultipleProtocolInterfaces() |
| 64 | /// performs more error checking than installProtocolInterface(), so its use is recommended over this. |
| 65 | installProtocolInterface: fn (Handle, *align(8) const Guid, EfiInterfaceType, *anyopaque) callconv(.C) Status, |
| 66 | |
| 67 | /// Reinstalls a protocol interface on a device handle |
| 68 | reinstallProtocolInterface: fn (Handle, *align(8) const Guid, *anyopaque, *anyopaque) callconv(.C) Status, |
| 69 | |
| 70 | /// Removes a protocol interface from a device handle. Usage of |
| 71 | /// uninstallMultipleProtocolInterfaces is recommended over this. |
| 72 | uninstallProtocolInterface: fn (Handle, *align(8) const Guid, *anyopaque) callconv(.C) Status, |
| 65 | 73 | |
| 66 | 74 | /// Queries a handle to determine if it supports a specified protocol. |
| 67 | 75 | handleProtocol: fn (Handle, *align(8) const Guid, *?*anyopaque) callconv(.C) Status, |
| 68 | 76 | |
| 69 | 77 | reserved: *anyopaque, |
| 70 | 78 | |
| 71 | | registerProtocolNotify: Status, // TODO |
| 79 | /// Creates an event that is to be signaled whenever an interface is installed for a specified protocol. |
| 80 | registerProtocolNotify: fn (*align(8) const Guid, Event, **anyopaque) callconv(.C) Status, |
| 72 | 81 | |
| 73 | 82 | /// Returns an array of handles that support a specified protocol. |
| 74 | 83 | locateHandle: fn (LocateSearchType, ?*align(8) const Guid, ?*const anyopaque, *usize, [*]Handle) callconv(.C) Status, |
| 75 | 84 | |
| 76 | 85 | /// Locates the handle to a device on the device path that supports the specified protocol |
| 77 | 86 | locateDevicePath: fn (*align(8) const Guid, **const DevicePathProtocol, *?Handle) callconv(.C) Status, |
| 78 | | installConfigurationTable: Status, // TODO |
| 87 | |
| 88 | /// Adds, updates, or removes a configuration table entry from the EFI System Table. |
| 89 | installConfigurationTable: fn (*align(8) const Guid, ?*anyopaque) callconv(.C) Status, |
| 79 | 90 | |
| 80 | 91 | /// Loads an EFI image into memory. |
| 81 | 92 | loadImage: fn (bool, Handle, ?*const DevicePathProtocol, ?[*]const u8, usize, *?Handle) callconv(.C) Status, |
| ... | ... | @@ -101,8 +112,11 @@ pub const BootServices = extern struct { |
| 101 | 112 | /// Sets the system's watchdog timer. |
| 102 | 113 | setWatchdogTimer: fn (usize, u64, usize, ?[*]const u16) callconv(.C) Status, |
| 103 | 114 | |
| 104 | | connectController: Status, // TODO |
| 105 | | disconnectController: Status, // TODO |
| 115 | /// Connects one or more drives to a controller. |
| 116 | connectController: fn (Handle, ?Handle, ?*DevicePathProtocol, bool) callconv(.C) Status, |
| 117 | |
| 118 | // Disconnects one or more drivers from a controller |
| 119 | disconnectController: fn (Handle, ?Handle, ?Handle) callconv(.C) Status, |
| 106 | 120 | |
| 107 | 121 | /// Queries a handle to determine if it supports a specified protocol. |
| 108 | 122 | openProtocol: fn (Handle, *align(8) const Guid, *?*anyopaque, ?Handle, ?Handle, OpenProtocolAttributes) callconv(.C) Status, |
| ... | ... | @@ -122,8 +136,11 @@ pub const BootServices = extern struct { |
| 122 | 136 | /// Returns the first protocol instance that matches the given protocol. |
| 123 | 137 | locateProtocol: fn (*align(8) const Guid, ?*const anyopaque, *?*anyopaque) callconv(.C) Status, |
| 124 | 138 | |
| 125 | | installMultipleProtocolInterfaces: Status, // TODO |
| 126 | | uninstallMultipleProtocolInterfaces: Status, // TODO |
| 139 | /// Installs one or more protocol interfaces into the boot services environment |
| 140 | installMultipleProtocolInterfaces: fn (*Handle, ...) callconv(.C) Status, |
| 141 | |
| 142 | /// Removes one or more protocol interfaces into the boot services environment |
| 143 | uninstallMultipleProtocolInterfaces: fn (*Handle, ...) callconv(.C) Status, |
| 127 | 144 | |
| 128 | 145 | /// Computes and returns a 32-bit CRC for a data buffer. |
| 129 | 146 | calculateCrc32: fn ([*]const u8, usize, *u32) callconv(.C) Status, |
| ... | ... | @@ -134,7 +151,8 @@ pub const BootServices = extern struct { |
| 134 | 151 | /// Fills a buffer with a specified value |
| 135 | 152 | setMem: fn ([*]u8, usize, u8) callconv(.C) void, |
| 136 | 153 | |
| 137 | | createEventEx: Status, // TODO |
| 154 | /// Creates an event in a group. |
| 155 | createEventEx: fn (u32, usize, EfiEventNotify, *const anyopaque, *align(8) const Guid, *Event) callconv(.C) Status, |
| 138 | 156 | |
| 139 | 157 | pub const signature: u64 = 0x56524553544f4f42; |
| 140 | 158 | |
| ... | ... | @@ -151,6 +169,8 @@ pub const BootServices = extern struct { |
| 151 | 169 | pub const tpl_high_level: usize = 31; |
| 152 | 170 | }; |
| 153 | 171 | |
| 172 | pub const EfiEventNotify = fn (event: Event, ctx: *anyopaque) callconv(.C) void; |
| 173 | |
| 154 | 174 | pub const TimerDelay = enum(u32) { |
| 155 | 175 | TimerCancel, |
| 156 | 176 | TimerPeriodic, |
| ... | ... | @@ -231,6 +251,10 @@ pub const ProtocolInformationEntry = extern struct { |
| 231 | 251 | open_count: u32, |
| 232 | 252 | }; |
| 233 | 253 | |
| 254 | pub const EfiInterfaceType = enum(u32) { |
| 255 | EfiNativeInterface, |
| 256 | }; |
| 257 | |
| 234 | 258 | pub const AllocateType = enum(u32) { |
| 235 | 259 | AllocateAnyPages, |
| 236 | 260 | AllocateMaxAddress, |