Skip to content

Commit 3287067

Browse files
uefi: Make some data in the uefi::table::boot module pub(crate)
This will allow some code to be shared with the upcoming `uefi::boot` module.
1 parent 9cb1d38 commit 3287067

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

uefi/src/table/boot.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub use uefi_raw::table::boot::{
2525

2626
/// Global image handle. This is only set by `BootServices::set_image_handle`,
2727
/// and it is only read by `BootServices::image_handle`.
28-
static IMAGE_HANDLE: AtomicPtr<c_void> = AtomicPtr::new(ptr::null_mut());
28+
pub(crate) static IMAGE_HANDLE: AtomicPtr<c_void> = AtomicPtr::new(ptr::null_mut());
2929

3030
/// Size in bytes of a UEFI page.
3131
///
@@ -1606,7 +1606,7 @@ impl Align for MemoryDescriptor {
16061606
/// If the memory map changes, this value is no longer valid.
16071607
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
16081608
#[repr(C)]
1609-
pub struct MemoryMapKey(usize);
1609+
pub struct MemoryMapKey(pub(crate) usize);
16101610

16111611
/// A structure containing the size of a memory descriptor and the size of the
16121612
/// memory map.
@@ -1638,12 +1638,12 @@ pub struct MemoryMapSize {
16381638
/// [0]: https://github.com/tianocore/edk2/blob/7142e648416ff5d3eac6c6d607874805f5de0ca8/MdeModulePkg/Core/PiSmmCore/Page.c#L1059
16391639
#[derive(Debug)]
16401640
pub struct MemoryMap<'buf> {
1641-
key: MemoryMapKey,
1642-
buf: &'buf mut [u8],
1641+
pub(crate) key: MemoryMapKey,
1642+
pub(crate) buf: &'buf mut [u8],
16431643
/// Usually bound to the size of a [`MemoryDescriptor`] but can indicate if
16441644
/// this field is ever extended by a new UEFI standard.
1645-
entry_size: usize,
1646-
len: usize,
1645+
pub(crate) entry_size: usize,
1646+
pub(crate) len: usize,
16471647
}
16481648

16491649
impl<'buf> MemoryMap<'buf> {
@@ -1863,7 +1863,8 @@ impl<'guid> SearchType<'guid> {
18631863
}
18641864

18651865
/// Raw event notification function
1866-
type EventNotifyFn = unsafe extern "efiapi" fn(event: Event, context: Option<NonNull<c_void>>);
1866+
pub(crate) type EventNotifyFn =
1867+
unsafe extern "efiapi" fn(event: Event, context: Option<NonNull<c_void>>);
18671868

18681869
/// Timer events manipulation.
18691870
#[derive(Debug)]
@@ -1962,7 +1963,7 @@ impl<'a> HandleBuffer<'a> {
19621963
/// with [`BootServices::locate_handle`] via [`SearchType::ByRegisterNotify`].
19631964
#[derive(Debug, Clone, Copy)]
19641965
#[repr(transparent)]
1965-
pub struct ProtocolSearchKey(NonNull<c_void>);
1966+
pub struct ProtocolSearchKey(pub(crate) NonNull<c_void>);
19661967

19671968
#[cfg(test)]
19681969
mod tests {

0 commit comments

Comments
 (0)