28
28
//! * Use `AcpiTables::from_rsdp` if you have the physical address of the RSDP
29
29
//! * Use `AcpiTables::from_rsdt` if you have the physical address of the RSDT/XSDT
30
30
//! * Use `AcpiTables::search_for_rsdp_bios` if you don't have the address of either, but **you know you are
31
- //! running on BIOS, not UEFI**
31
+ //! running on BIOS, not UEFI**
32
32
//!
33
33
//! `AcpiTables` stores the addresses of all of the tables detected on a platform. The SDTs are parsed by this
34
34
//! library, or can be accessed directly with `from_sdt`, while the `DSDT` and any `SSDTs` should be parsed with
@@ -200,7 +200,9 @@ where
200
200
{
201
201
/// Create an `AcpiTables` if you have the physical address of the RSDP.
202
202
///
203
- /// ### Safety: Caller must ensure the provided address is valid to read as an RSDP.
203
+ /// ### Safety
204
+ ///
205
+ /// Caller must ensure the provided address is valid to read as an RSDP.
204
206
pub unsafe fn from_rsdp ( handler : H , address : usize ) -> AcpiResult < Self > {
205
207
let rsdp_mapping = unsafe { handler. map_physical_region :: < Rsdp > ( address, mem:: size_of :: < Rsdp > ( ) ) } ;
206
208
rsdp_mapping. validate ( ) ?;
@@ -212,6 +214,10 @@ where
212
214
/// Search for the RSDP on a BIOS platform. This accesses BIOS-specific memory locations and will probably not
213
215
/// work on UEFI platforms. See [Rsdp::search_for_rsdp_bios](rsdp_search::Rsdp::search_for_rsdp_bios) for
214
216
/// details.
217
+ ///
218
+ /// ### Safety
219
+ ///
220
+ /// The caller must ensure that this function is called on BIOS platforms.
215
221
pub unsafe fn search_for_rsdp_bios ( handler : H ) -> AcpiResult < Self > {
216
222
let rsdp_mapping = unsafe { Rsdp :: search_for_on_bios ( handler. clone ( ) ) ? } ;
217
223
// Safety: RSDP has been validated from `Rsdp::search_for_on_bios`
@@ -222,7 +228,9 @@ where
222
228
/// from `from_rsdp` after validation, but can also be used if you've searched for the RSDP manually on a BIOS
223
229
/// system.
224
230
///
225
- /// ### Safety: Caller must ensure that the provided mapping is a fully validated RSDP.
231
+ /// ### Safety
232
+ ///
233
+ /// Caller must ensure that the provided mapping is a fully validated RSDP.
226
234
pub unsafe fn from_validated_rsdp ( handler : H , rsdp_mapping : PhysicalMapping < H , Rsdp > ) -> AcpiResult < Self > {
227
235
let revision = rsdp_mapping. revision ( ) ;
228
236
let root_table_mapping = if revision == 0 {
@@ -247,7 +255,9 @@ where
247
255
248
256
/// Create an `AcpiTables` if you have the physical address of the RSDT/XSDT.
249
257
///
250
- /// ### Safety: Caller must ensure the provided address is valid RSDT/XSDT address.
258
+ /// ### Safety
259
+ ///
260
+ /// Caller must ensure the provided address is valid RSDT/XSDT address.
251
261
pub unsafe fn from_rsdt ( handler : H , revision : u8 , address : usize ) -> AcpiResult < Self > {
252
262
let root_table_mapping = if revision == 0 {
253
263
/*
@@ -408,7 +418,9 @@ impl AmlTable {
408
418
}
409
419
}
410
420
411
- /// ### Safety: Caller must ensure the provided address is valid for being read as an `SdtHeader`.
421
+ /// ### Safety
422
+ ///
423
+ /// Caller must ensure the provided address is valid for being read as an `SdtHeader`.
412
424
unsafe fn read_table < H : AcpiHandler , T : AcpiTable > (
413
425
handler : H ,
414
426
address : usize ,
@@ -431,7 +443,7 @@ where
431
443
handler : H ,
432
444
}
433
445
434
- impl < ' t , H > Iterator for SsdtIterator < ' t , H >
446
+ impl < H > Iterator for SsdtIterator < ' _ , H >
435
447
where
436
448
H : AcpiHandler ,
437
449
{
@@ -479,7 +491,7 @@ where
479
491
handler : H ,
480
492
}
481
493
482
- impl < ' t , H > Iterator for SdtHeaderIterator < ' t , H >
494
+ impl < H > Iterator for SdtHeaderIterator < ' _ , H >
483
495
where
484
496
H : AcpiHandler ,
485
497
{
0 commit comments