2828//! * Use [`AcpiTables::from_rsdp`] if you have the physical address of the RSDP
2929//! * Use [`AcpiTables::from_rsdt`] if you have the physical address of the RSDT/XSDT
3030//! * 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**
3232//!
3333//! `AcpiTables` stores the addresses of all of the tables detected on a platform. The SDTs are parsed by this
3434//! library, or can be accessed directly with `from_sdt`, while the `DSDT` and any `SSDTs` should be parsed with
@@ -199,7 +199,9 @@ where
199199{
200200 /// Create an `AcpiTables` if you have the physical address of the RSDP.
201201 ///
202- /// ### Safety: Caller must ensure the provided address is valid to read as an RSDP.
202+ /// ### Safety
203+ ///
204+ /// Caller must ensure the provided address is valid to read as an RSDP.
203205 pub unsafe fn from_rsdp ( handler : H , address : usize ) -> AcpiResult < Self > {
204206 let rsdp_mapping = unsafe { handler. map_physical_region :: < Rsdp > ( address, mem:: size_of :: < Rsdp > ( ) ) } ;
205207 rsdp_mapping. validate ( ) ?;
@@ -210,6 +212,11 @@ where
210212
211213 /// Search for the RSDP on a BIOS platform. This accesses BIOS-specific memory locations and will probably not
212214 /// work on UEFI platforms. See [`Rsdp::search_for_on_bios`] for details.
215+ /// details.
216+ ///
217+ /// ### Safety
218+ ///
219+ /// The caller must ensure that this function is called on BIOS platforms.
213220 pub unsafe fn search_for_rsdp_bios ( handler : H ) -> AcpiResult < Self > {
214221 let rsdp_mapping = unsafe { Rsdp :: search_for_on_bios ( handler. clone ( ) ) ? } ;
215222 // Safety: RSDP has been validated from `Rsdp::search_for_on_bios`
@@ -220,7 +227,9 @@ where
220227 /// from `from_rsdp` after validation, but can also be used if you've searched for the RSDP manually on a BIOS
221228 /// system.
222229 ///
223- /// ### Safety: Caller must ensure that the provided mapping is a fully validated RSDP.
230+ /// ### Safety
231+ ///
232+ /// Caller must ensure that the provided mapping is a fully validated RSDP.
224233 pub unsafe fn from_validated_rsdp ( handler : H , rsdp_mapping : PhysicalMapping < H , Rsdp > ) -> AcpiResult < Self > {
225234 let revision = rsdp_mapping. revision ( ) ;
226235 let root_table_mapping = if revision == 0 {
@@ -245,7 +254,9 @@ where
245254
246255 /// Create an `AcpiTables` if you have the physical address of the RSDT/XSDT.
247256 ///
248- /// ### Safety: Caller must ensure the provided address is valid RSDT/XSDT address.
257+ /// ### Safety
258+ ///
259+ /// Caller must ensure the provided address is valid RSDT/XSDT address.
249260 pub unsafe fn from_rsdt ( handler : H , revision : u8 , address : usize ) -> AcpiResult < Self > {
250261 let root_table_mapping = if revision == 0 {
251262 /*
@@ -404,7 +415,9 @@ impl AmlTable {
404415 }
405416}
406417
407- /// ### Safety: Caller must ensure the provided address is valid for being read as an `SdtHeader`.
418+ /// ### Safety
419+ ///
420+ /// Caller must ensure the provided address is valid for being read as an `SdtHeader`.
408421unsafe fn read_table < H : AcpiHandler , T : AcpiTable > (
409422 handler : H ,
410423 address : usize ,
@@ -427,7 +440,7 @@ where
427440 handler : H ,
428441}
429442
430- impl < ' t , H > Iterator for SsdtIterator < ' t , H >
443+ impl < H > Iterator for SsdtIterator < ' _ , H >
431444where
432445 H : AcpiHandler ,
433446{
@@ -475,7 +488,7 @@ where
475488 handler : H ,
476489}
477490
478- impl < ' t , H > Iterator for SdtHeaderIterator < ' t , H >
491+ impl < H > Iterator for SdtHeaderIterator < ' _ , H >
479492where
480493 H : AcpiHandler ,
481494{
0 commit comments