Skip to content

Commit 1702832

Browse files
authored
Merge pull request #64 from fmckeogh/main
Make `output_address` method on `Descriptor` public
2 parents bc29601 + 6e86a6e commit 1702832

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### New features
66

77
- `MapError` now implements `core::error::Error`.
8+
- Made `output_address` method on `Descriptor` public.
89

910
## 0.8.0
1011

src/paging.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,11 @@ impl Descriptor {
890890

891891
const PHYSICAL_ADDRESS_BITMASK: usize = !(PAGE_SIZE - 1) & !(0xffff << 48);
892892

893-
pub(crate) fn output_address(self) -> PhysicalAddress {
893+
/// Returns the physical address that this descriptor refers to if it is valid.
894+
///
895+
/// Depending on the flags this could be the address of a subtable, a mapping, or (if it is not
896+
/// a valid mapping) entirely arbitrary.
897+
pub fn output_address(self) -> PhysicalAddress {
894898
PhysicalAddress(self.0 & Self::PHYSICAL_ADDRESS_BITMASK)
895899
}
896900

0 commit comments

Comments
 (0)