Skip to content

Commit f0fe055

Browse files
uefi: Add SystemTable::as_ptr
1 parent 1f0d83b commit f0fe055

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### Added
66
- Implemented `Index`, `IndexMut`, `get`, and `get_mut` on `MemoryMap`.
7+
- Added `SystemTable::as_ptr`.
78

89
### Changed
910
- We fixed a memory leak in `GraphicsOutput::query_mode`. As a consequence, we

uefi/src/table/system.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@ impl<View: SystemTableView> SystemTable<View> {
113113
_marker: PhantomData,
114114
})
115115
}
116+
117+
/// Get the underlying raw pointer.
118+
#[must_use]
119+
pub fn as_ptr(&self) -> *const c_void {
120+
self.table.cast()
121+
}
116122
}
117123

118124
// These parts of the UEFI System Table interface may only be used until boot

0 commit comments

Comments
 (0)