|
20 | 20 | //! default configuration of the crate. |
21 | 21 | //! |
22 | 22 | //! ### Usage |
23 | | -//! To use the library, you will need to provide an implementation of the `AcpiHandler` trait, which allows the |
| 23 | +//! To use the library, you will need to provide an implementation of the [`AcpiHandler`] trait, which allows the |
24 | 24 | //! library to make requests such as mapping a particular region of physical memory into the virtual address space. |
25 | 25 | //! |
26 | | -//! You then need to construct an instance of `AcpiTables`, which can be done in a few ways depending on how much |
| 26 | +//! You then need to construct an instance of [`AcpiTables`], which can be done in a few ways depending on how much |
27 | 27 | //! information you have: |
28 | | -//! * Use `AcpiTables::from_rsdp` if you have the physical address of the RSDP |
29 | | -//! * Use `AcpiTables::from_rsdt` if you have the physical address of the RSDT/XSDT |
30 | | -//! * Use `AcpiTables::search_for_rsdp_bios` if you don't have the address of either, but **you know you are |
| 28 | +//! * Use [`AcpiTables::from_rsdp`] if you have the physical address of the RSDP |
| 29 | +//! * Use [`AcpiTables::from_rsdt`] if you have the physical address of the RSDT/XSDT |
| 30 | +//! * Use [`AcpiTables::search_for_rsdp_bios`] if you don't have the address of either, but **you know you are |
31 | 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 |
35 | 35 | //! `aml`. |
36 | 36 | //! |
37 | 37 | //! To gather information out of the static tables, a few of the types you should take a look at are: |
38 | | -//! - [`PlatformInfo`](crate::platform::PlatformInfo) parses the FADT and MADT to create a nice view of the |
39 | | -//! processor topology and interrupt controllers on `x86_64`, and the interrupt controllers on other platforms. |
40 | | -//! `AcpiTables::platform_info` is a convenience method for constructing a `PlatformInfo`. |
41 | | -//! - [`HpetInfo`](crate::hpet::HpetInfo) parses the HPET table and tells you how to configure the High |
42 | | -//! Precision Event Timer. |
43 | | -//! - [`PciConfigRegions`](crate::mcfg::PciConfigRegions) parses the MCFG and tells you how PCIe configuration |
44 | | -//! space is mapped into physical memory. |
| 38 | +//! - [`PlatformInfo`] parses the FADT and MADT to create a nice view of the processor topology and interrupt |
| 39 | +//! controllers on `x86_64`, and the interrupt controllers on other platforms. |
| 40 | +//! [`AcpiTables::platform_info`] is a convenience method for constructing a `PlatformInfo`. |
| 41 | +//! - [`HpetInfo`] parses the HPET table and tells you how to configure the High Precision Event Timer. |
| 42 | +//! - [`PciConfigRegions`] parses the MCFG and tells you how PCIe configuration space is mapped into physical |
| 43 | +//! memory. |
45 | 44 |
|
46 | 45 | /* |
47 | 46 | * Contributing notes (you may find these useful if you're new to contributing to the library): |
@@ -210,8 +209,7 @@ where |
210 | 209 | } |
211 | 210 |
|
212 | 211 | /// Search for the RSDP on a BIOS platform. This accesses BIOS-specific memory locations and will probably not |
213 | | - /// work on UEFI platforms. See [Rsdp::search_for_rsdp_bios](rsdp_search::Rsdp::search_for_rsdp_bios) for |
214 | | - /// details. |
| 212 | + /// work on UEFI platforms. See [`Rsdp::search_for_on_bios`] for details. |
215 | 213 | pub unsafe fn search_for_rsdp_bios(handler: H) -> AcpiResult<Self> { |
216 | 214 | let rsdp_mapping = unsafe { Rsdp::search_for_on_bios(handler.clone())? }; |
217 | 215 | // Safety: RSDP has been validated from `Rsdp::search_for_on_bios` |
@@ -355,19 +353,17 @@ where |
355 | 353 | SsdtIterator { tables_phys_ptrs: self.tables_phys_ptrs(), handler: self.handler.clone() } |
356 | 354 | } |
357 | 355 |
|
358 | | - /// Convenience method for contructing a [`PlatformInfo`](crate::platform::PlatformInfo). This is one of the |
359 | | - /// first things you should usually do with an `AcpiTables`, and allows to collect helpful information about |
360 | | - /// the platform from the ACPI tables. |
| 356 | + /// Convenience method for contructing a [`PlatformInfo`]. This is one of the first things you should usually do |
| 357 | + /// with an `AcpiTables`, and allows to collect helpful information about the platform from the ACPI tables. |
361 | 358 | /// |
362 | | - /// Like `platform_info_in`, but uses the global allocator. |
| 359 | + /// Like [`platform_info_in`](Self::platform_info_in), but uses the global allocator. |
363 | 360 | #[cfg(feature = "alloc")] |
364 | 361 | pub fn platform_info(&self) -> AcpiResult<PlatformInfo<alloc::alloc::Global>> { |
365 | 362 | PlatformInfo::new(self) |
366 | 363 | } |
367 | 364 |
|
368 | | - /// Convenience method for contructing a [`PlatformInfo`](crate::platform::PlatformInfo). This is one of the |
369 | | - /// first things you should usually do with an `AcpiTables`, and allows to collect helpful information about |
370 | | - /// the platform from the ACPI tables. |
| 365 | + /// Convenience method for contructing a [`PlatformInfo`]. This is one of the first things you should usually do |
| 366 | + /// with an `AcpiTables`, and allows to collect helpful information about the platform from the ACPI tables. |
371 | 367 | #[cfg(feature = "allocator_api")] |
372 | 368 | pub fn platform_info_in<A>(&self, allocator: A) -> AcpiResult<PlatformInfo<A>> |
373 | 369 | where |
|
0 commit comments