Skip to content

Commit 4693e78

Browse files
uefi: BootServices: Make MemoryMap args compatible with uefi_raw
1 parent 5c91d95 commit 4693e78

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

uefi/src/table/boot.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ struct BootServicesInternal {
6262
get_memory_map: unsafe extern "efiapi" fn(
6363
size: &mut usize,
6464
map: *mut MemoryDescriptor,
65-
key: &mut MemoryMapKey,
65+
key: &mut usize,
6666
desc_size: &mut usize,
6767
desc_version: &mut u32,
6868
) -> Status,
@@ -157,8 +157,7 @@ struct BootServicesInternal {
157157
exit_data: *mut Char16,
158158
) -> !,
159159
unload_image: unsafe extern "efiapi" fn(image_handle: Handle) -> Status,
160-
exit_boot_services:
161-
unsafe extern "efiapi" fn(image_handle: Handle, map_key: MemoryMapKey) -> Status,
160+
exit_boot_services: unsafe extern "efiapi" fn(image_handle: Handle, map_key: usize) -> Status,
162161

163162
// Misc services
164163
get_next_monotonic_count: usize,
@@ -408,7 +407,7 @@ impl BootServices {
408407
(self.0.get_memory_map)(
409408
&mut map_size,
410409
ptr::null_mut(),
411-
&mut map_key,
410+
&mut map_key.0,
412411
&mut entry_size,
413412
&mut entry_version,
414413
)
@@ -458,7 +457,7 @@ impl BootServices {
458457
(self.0.get_memory_map)(
459458
&mut map_size,
460459
map_buffer,
461-
&mut map_key,
460+
&mut map_key.0,
462461
&mut entry_size,
463462
&mut entry_version,
464463
)
@@ -1142,7 +1141,7 @@ impl BootServices {
11421141
image: Handle,
11431142
mmap_key: MemoryMapKey,
11441143
) -> Result {
1145-
(self.0.exit_boot_services)(image, mmap_key).to_result()
1144+
(self.0.exit_boot_services)(image, mmap_key.0).to_result()
11461145
}
11471146

11481147
/// Stalls the processor for an amount of time.

0 commit comments

Comments
 (0)