@@ -18,38 +18,38 @@ pub struct BootServices {
18
18
header : Header ,
19
19
20
20
// Task Priority services
21
- raise_tpl : unsafe extern "win64 " fn ( new_tpl : Tpl ) -> Tpl ,
22
- restore_tpl : unsafe extern "win64 " fn ( old_tpl : Tpl ) ,
21
+ raise_tpl : unsafe extern "efiapi " fn ( new_tpl : Tpl ) -> Tpl ,
22
+ restore_tpl : unsafe extern "efiapi " fn ( old_tpl : Tpl ) ,
23
23
24
24
// Memory allocation functions
25
- allocate_pages : extern "win64 " fn (
25
+ allocate_pages : extern "efiapi " fn (
26
26
alloc_ty : u32 ,
27
27
mem_ty : MemoryType ,
28
28
count : usize ,
29
29
addr : & mut u64 ,
30
30
) -> Status ,
31
- free_pages : extern "win64 " fn ( addr : u64 , pages : usize ) -> Status ,
32
- get_memory_map : unsafe extern "win64 " fn (
31
+ free_pages : extern "efiapi " fn ( addr : u64 , pages : usize ) -> Status ,
32
+ get_memory_map : unsafe extern "efiapi " fn (
33
33
size : & mut usize ,
34
34
map : * mut MemoryDescriptor ,
35
35
key : & mut MemoryMapKey ,
36
36
desc_size : & mut usize ,
37
37
desc_version : & mut u32 ,
38
38
) -> Status ,
39
39
allocate_pool :
40
- extern "win64 " fn ( pool_type : MemoryType , size : usize , buffer : & mut * mut u8 ) -> Status ,
41
- free_pool : extern "win64 " fn ( buffer : * mut u8 ) -> Status ,
40
+ extern "efiapi " fn ( pool_type : MemoryType , size : usize , buffer : & mut * mut u8 ) -> Status ,
41
+ free_pool : extern "efiapi " fn ( buffer : * mut u8 ) -> Status ,
42
42
43
43
// Event & timer functions
44
- create_event : unsafe extern "win64 " fn (
44
+ create_event : unsafe extern "efiapi " fn (
45
45
ty : EventType ,
46
46
notify_tpl : Tpl ,
47
47
notify_func : Option < EventNotifyFn > ,
48
48
notify_ctx : * mut c_void ,
49
49
event : * mut Event ,
50
50
) -> Status ,
51
51
set_timer : usize ,
52
- wait_for_event : unsafe extern "win64 " fn (
52
+ wait_for_event : unsafe extern "efiapi " fn (
53
53
number_of_events : usize ,
54
54
events : * mut Event ,
55
55
out_index : * mut usize ,
@@ -63,10 +63,10 @@ pub struct BootServices {
63
63
reinstall_protocol_interface : usize ,
64
64
uninstall_protocol_interface : usize ,
65
65
handle_protocol :
66
- extern "win64 " fn ( handle : Handle , proto : & Guid , out_proto : & mut * mut c_void ) -> Status ,
66
+ extern "efiapi " fn ( handle : Handle , proto : & Guid , out_proto : & mut * mut c_void ) -> Status ,
67
67
_reserved : usize ,
68
68
register_protocol_notify : usize ,
69
- locate_handle : unsafe extern "win64 " fn (
69
+ locate_handle : unsafe extern "efiapi " fn (
70
70
search_ty : i32 ,
71
71
proto : * const Guid ,
72
72
key : * mut c_void ,
@@ -82,12 +82,12 @@ pub struct BootServices {
82
82
exit : usize ,
83
83
unload_image : usize ,
84
84
exit_boot_services :
85
- unsafe extern "win64 " fn ( image_handle : Handle , map_key : MemoryMapKey ) -> Status ,
85
+ unsafe extern "efiapi " fn ( image_handle : Handle , map_key : MemoryMapKey ) -> Status ,
86
86
87
87
// Misc services
88
88
get_next_monotonic_count : usize ,
89
- stall : extern "win64 " fn ( microseconds : usize ) -> Status ,
90
- set_watchdog_timer : unsafe extern "win64 " fn (
89
+ stall : extern "efiapi " fn ( microseconds : usize ) -> Status ,
90
+ set_watchdog_timer : unsafe extern "efiapi " fn (
91
91
timeout : usize ,
92
92
watchdog_code : u64 ,
93
93
data_size : usize ,
@@ -106,7 +106,7 @@ pub struct BootServices {
106
106
// Library services
107
107
protocols_per_handle : usize ,
108
108
locate_handle_buffer : usize ,
109
- locate_protocol : extern "win64 " fn (
109
+ locate_protocol : extern "efiapi " fn (
110
110
proto : & Guid ,
111
111
registration : * mut c_void ,
112
112
out_proto : & mut * mut c_void ,
@@ -118,8 +118,8 @@ pub struct BootServices {
118
118
calculate_crc32 : usize ,
119
119
120
120
// Misc services
121
- copy_mem : unsafe extern "win64 " fn ( dest : * mut u8 , src : * const u8 , len : usize ) ,
122
- set_mem : unsafe extern "win64 " fn ( buffer : * mut u8 , len : usize , value : u8 ) ,
121
+ copy_mem : unsafe extern "efiapi " fn ( dest : * mut u8 , src : * const u8 , len : usize ) ,
122
+ set_mem : unsafe extern "efiapi " fn ( buffer : * mut u8 , len : usize , value : u8 ) ,
123
123
124
124
// New event functions (UEFI 2.0 or newer)
125
125
create_event_ex : usize ,
@@ -272,7 +272,7 @@ impl BootServices {
272
272
let mut event = MaybeUninit :: < Event > :: uninit ( ) ;
273
273
274
274
// Use a trampoline to handle the impedance mismatch between Rust & C
275
- unsafe extern "win64 " fn notify_trampoline ( e : Event , ctx : * mut c_void ) {
275
+ unsafe extern "efiapi " fn notify_trampoline ( e : Event , ctx : * mut c_void ) {
276
276
let notify_fn: fn ( Event ) = mem:: transmute ( ctx) ;
277
277
notify_fn ( e) ; // SAFETY: Aborting panics are assumed here
278
278
}
@@ -789,4 +789,4 @@ bitflags! {
789
789
}
790
790
791
791
/// Raw event notification function
792
- type EventNotifyFn = unsafe extern "win64 " fn ( event : Event , context : * mut c_void ) ;
792
+ type EventNotifyFn = unsafe extern "efiapi " fn ( event : Event , context : * mut c_void ) ;
0 commit comments