Skip to content

Commit e7b3118

Browse files
authored
Merge pull request #1383 from nicholasbishop/bishop-raw-page-size
Move PAGE_SIZE to uefi-raw and reexport from uefi boot modules
2 parents 70122b5 + 98da390 commit e7b3118

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

uefi-raw/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# uefi-raw - [Unreleased]
22

3+
## Added
4+
5+
- Added `PAGE_SIZE` constant.
6+
37

48
# uefi-raw - 0.7.0 (2024-08-20)
59

uefi-raw/src/table/boot.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,3 +478,9 @@ pub enum Tpl: usize => {
478478
/// Even processor interrupts are disable at this level.
479479
HIGH_LEVEL = 31,
480480
}}
481+
482+
/// Size in bytes of a UEFI page.
483+
///
484+
/// Note that this is not necessarily the processor's page size. The UEFI page
485+
/// size is always 4 KiB.
486+
pub const PAGE_SIZE: usize = 4096;

uefi/src/boot.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
//!
2020
//! [`proto`]: crate::proto
2121
22-
pub use uefi_raw::table::boot::{EventType, MemoryAttribute, MemoryDescriptor, MemoryType, Tpl};
22+
pub use uefi_raw::table::boot::{EventType, MemoryAttribute, MemoryDescriptor, MemoryType, Tpl, PAGE_SIZE};
2323

2424
use crate::data_types::PhysicalAddress;
2525
use crate::mem::memory_map::{MemoryMapBackingMemory, MemoryMapKey, MemoryMapMeta, MemoryMapOwned};

uefi/src/table/boot.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pub use crate::boot::{
77
ProtocolSearchKey, SearchType, TimerTrigger,
88
};
99
pub use uefi_raw::table::boot::{
10-
EventType, InterfaceType, MemoryAttribute, MemoryDescriptor, MemoryType, Tpl,
10+
EventType, InterfaceType, MemoryAttribute, MemoryDescriptor, MemoryType, Tpl, PAGE_SIZE,
1111
};
1212

1313
use super::Revision;
@@ -29,12 +29,6 @@ use core::ops::{Deref, DerefMut};
2929
use core::ptr::NonNull;
3030
use core::{ptr, slice};
3131

32-
/// Size in bytes of a UEFI page.
33-
///
34-
/// Note that this is not necessarily the processor's page size. The UEFI page
35-
/// size is always 4 KiB.
36-
pub const PAGE_SIZE: usize = 4096;
37-
3832
/// Contains pointers to all of the boot services.
3933
///
4034
/// # Accessing `BootServices`

0 commit comments

Comments
 (0)