@@ -174,7 +174,8 @@ pub struct BootServices {
174
174
device_path : & mut * const FfiDevicePath ,
175
175
out_handle : & mut MaybeUninit < Handle > ,
176
176
) -> Status ,
177
- install_configuration_table : usize ,
177
+ install_configuration_table :
178
+ extern "efiapi" fn ( guid_entry : Guid , table_ptr : * const c_void ) -> Status ,
178
179
179
180
// Image services
180
181
load_image : unsafe extern "efiapi" fn (
@@ -1139,6 +1140,34 @@ impl BootServices {
1139
1140
assert_eq ! ( ( self . stall) ( time) , Status :: SUCCESS ) ;
1140
1141
}
1141
1142
1143
+ /// Adds, updates, or removes a configuration table entry
1144
+ /// from the EFI System Table.
1145
+ ///
1146
+ /// # Safety
1147
+ ///
1148
+ /// This relies on `table_ptr` being allocated in the
1149
+ /// pool of type [`uefi::table::boot::MemoryType::RUNTIME_SERVICES_DATA`]
1150
+ /// according to the specification.
1151
+ /// Other memory types such as
1152
+ /// [`uefi::table::boot::MemoryType::ACPI_RECLAIM`]
1153
+ /// can be considered.
1154
+ ///
1155
+ /// # Errors
1156
+ ///
1157
+ /// See section `EFI_BOOT_SERVICES.InstallConfigurationTable()` in the UEFI
1158
+ /// Specification for more details.
1159
+ ///
1160
+ /// * [`uefi::Status::INVALID_PARAMETER`]
1161
+ /// * [`uefi::Status::NOT_FOUND`]
1162
+ /// * [`uefi::Status::OUT_OF_RESOURCES`]
1163
+ pub unsafe fn install_configuration_table (
1164
+ & self ,
1165
+ guid_entry : Guid ,
1166
+ table_ptr : * const c_void ,
1167
+ ) -> Result {
1168
+ ( self . install_configuration_table ) ( guid_entry, table_ptr) . to_result ( )
1169
+ }
1170
+
1142
1171
/// Set the watchdog timer.
1143
1172
///
1144
1173
/// UEFI will start a 5-minute countdown after an UEFI image is loaded.
@@ -1581,7 +1610,7 @@ impl Debug for BootServices {
1581
1610
& ( self . locate_device_path as * const usize ) ,
1582
1611
)
1583
1612
. field (
1584
- "install_configuration_table" ,
1613
+ "install_configuration_table (fn ptr) " ,
1585
1614
& ( self . install_configuration_table as * const usize ) ,
1586
1615
)
1587
1616
. field ( "load_image (fn ptr)" , & ( self . load_image as * const usize ) )
0 commit comments