diff --git a/uefi-macros/CHANGELOG.md b/uefi-macros/CHANGELOG.md index b56ff7fce..a2e56ccd4 100644 --- a/uefi-macros/CHANGELOG.md +++ b/uefi-macros/CHANGELOG.md @@ -1,5 +1,8 @@ # uefi-macros - [Unreleased] +## Changed +- The `entry` macro now sets the global system table pointer with `uefi::set_system_table`. + ## Removed - Removed the `cstr8` and `cstr16` macros. Use the declarative macros of the same names exported by the `uefi` crate as a replacement. diff --git a/uefi-macros/src/lib.rs b/uefi-macros/src/lib.rs index 9f5b67da8..09a67716e 100644 --- a/uefi-macros/src/lib.rs +++ b/uefi-macros/src/lib.rs @@ -204,6 +204,7 @@ pub fn entry(args: TokenStream, input: TokenStream) -> TokenStream { parse_quote! { unsafe { #system_table_ident.boot_services().set_image_handle(#image_handle_ident); + ::uefi::table::set_system_table(#system_table_ident.as_ptr().cast()); } }, );