Skip to content

Commit 493ceaf

Browse files
committed
acpi: fix doc warnings and add missing links
When generating the documentation, cargo doc would emit some warnings regarding redundant and broken links, so fix them. Also add some convenient links which were missing.
1 parent e46723a commit 493ceaf

File tree

1 file changed

+17
-21
lines changed

1 file changed

+17
-21
lines changed

acpi/src/lib.rs

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,27 @@
2020
//! default configuration of the crate.
2121
//!
2222
//! ### 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
2424
//! library to make requests such as mapping a particular region of physical memory into the virtual address space.
2525
//!
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
2727
//! 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
3131
//! 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
3535
//! `aml`.
3636
//!
3737
//! 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.
4544
4645
/*
4746
* Contributing notes (you may find these useful if you're new to contributing to the library):
@@ -210,8 +209,7 @@ where
210209
}
211210

212211
/// 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.
215213
pub unsafe fn search_for_rsdp_bios(handler: H) -> AcpiResult<Self> {
216214
let rsdp_mapping = unsafe { Rsdp::search_for_on_bios(handler.clone())? };
217215
// Safety: RSDP has been validated from `Rsdp::search_for_on_bios`
@@ -355,19 +353,17 @@ where
355353
SsdtIterator { tables_phys_ptrs: self.tables_phys_ptrs(), handler: self.handler.clone() }
356354
}
357355

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.
361358
///
362-
/// Like `platform_info_in`, but uses the global allocator.
359+
/// Like [`platform_info_in`](Self::platform_info_in), but uses the global allocator.
363360
#[cfg(feature = "alloc")]
364361
pub fn platform_info(&self) -> AcpiResult<PlatformInfo<alloc::alloc::Global>> {
365362
PlatformInfo::new(self)
366363
}
367364

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.
371367
#[cfg(feature = "allocator_api")]
372368
pub fn platform_info_in<A>(&self, allocator: A) -> AcpiResult<PlatformInfo<A>>
373369
where

0 commit comments

Comments
 (0)