@@ -18,38 +18,38 @@ pub struct BootServices {
1818 header : Header ,
1919
2020 // 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 ) ,
2323
2424 // Memory allocation functions
25- allocate_pages : extern "win64 " fn (
25+ allocate_pages : extern "efiapi " fn (
2626 alloc_ty : u32 ,
2727 mem_ty : MemoryType ,
2828 count : usize ,
2929 addr : & mut u64 ,
3030 ) -> 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 (
3333 size : & mut usize ,
3434 map : * mut MemoryDescriptor ,
3535 key : & mut MemoryMapKey ,
3636 desc_size : & mut usize ,
3737 desc_version : & mut u32 ,
3838 ) -> Status ,
3939 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 ,
4242
4343 // Event & timer functions
44- create_event : unsafe extern "win64 " fn (
44+ create_event : unsafe extern "efiapi " fn (
4545 ty : EventType ,
4646 notify_tpl : Tpl ,
4747 notify_func : Option < EventNotifyFn > ,
4848 notify_ctx : * mut c_void ,
4949 event : * mut Event ,
5050 ) -> Status ,
5151 set_timer : usize ,
52- wait_for_event : unsafe extern "win64 " fn (
52+ wait_for_event : unsafe extern "efiapi " fn (
5353 number_of_events : usize ,
5454 events : * mut Event ,
5555 out_index : * mut usize ,
@@ -63,10 +63,10 @@ pub struct BootServices {
6363 reinstall_protocol_interface : usize ,
6464 uninstall_protocol_interface : usize ,
6565 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 ,
6767 _reserved : usize ,
6868 register_protocol_notify : usize ,
69- locate_handle : unsafe extern "win64 " fn (
69+ locate_handle : unsafe extern "efiapi " fn (
7070 search_ty : i32 ,
7171 proto : * const Guid ,
7272 key : * mut c_void ,
@@ -82,12 +82,12 @@ pub struct BootServices {
8282 exit : usize ,
8383 unload_image : usize ,
8484 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 ,
8686
8787 // Misc services
8888 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 (
9191 timeout : usize ,
9292 watchdog_code : u64 ,
9393 data_size : usize ,
@@ -106,7 +106,7 @@ pub struct BootServices {
106106 // Library services
107107 protocols_per_handle : usize ,
108108 locate_handle_buffer : usize ,
109- locate_protocol : extern "win64 " fn (
109+ locate_protocol : extern "efiapi " fn (
110110 proto : & Guid ,
111111 registration : * mut c_void ,
112112 out_proto : & mut * mut c_void ,
@@ -118,8 +118,8 @@ pub struct BootServices {
118118 calculate_crc32 : usize ,
119119
120120 // 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 ) ,
123123
124124 // New event functions (UEFI 2.0 or newer)
125125 create_event_ex : usize ,
@@ -272,7 +272,7 @@ impl BootServices {
272272 let mut event = MaybeUninit :: < Event > :: uninit ( ) ;
273273
274274 // 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 ) {
276276 let notify_fn: fn ( Event ) = mem:: transmute ( ctx) ;
277277 notify_fn ( e) ; // SAFETY: Aborting panics are assumed here
278278 }
@@ -789,4 +789,4 @@ bitflags! {
789789}
790790
791791/// 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