Skip to content

Commit 5db374a

Browse files
authored
Merge pull request #789 from nicholasbishop/bishop-raw-addr-types
Add PhysicalAddress/VirtualAddress to uefi-raw and use them from uefi
2 parents 17e5aa0 + d82019d commit 5db374a

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

uefi-raw/src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,11 @@ mod status;
2424

2525
pub use status::Status;
2626
pub use uguid::{guid, Guid};
27+
28+
/// Physical memory address. This is always a 64-bit value, regardless
29+
/// of target platform.
30+
pub type PhysicalAddress = u64;
31+
32+
/// Virtual memory address. This is always a 64-bit value, regardless
33+
/// of target platform.
34+
pub type VirtualAddress = u64;

uefi/src/data_types/mod.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,6 @@ pub trait Align {
113113
}
114114
}
115115

116-
/// Physical memory address. This is always a 64-bit value, regardless
117-
/// of target platform.
118-
pub type PhysicalAddress = u64;
119-
120-
/// Virtual memory address. This is always a 64-bit value, regardless
121-
/// of target platform.
122-
pub type VirtualAddress = u64;
123-
124116
mod guid;
125117
pub use self::guid::{Guid, Identify};
126118

@@ -143,6 +135,8 @@ pub use self::owned_strs::{CString16, FromStrError};
143135
mod unaligned_slice;
144136
pub use unaligned_slice::UnalignedSlice;
145137

138+
pub use uefi_raw::{PhysicalAddress, VirtualAddress};
139+
146140
#[cfg(test)]
147141
mod tests {
148142
use super::*;

0 commit comments

Comments
 (0)