Skip to content

Commit 4928e71

Browse files
committed
Merge branch 'missing-tag-info-getters' into main
2 parents 50ee5db + 1556981 commit 4928e71

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

multiboot2/src/efi.rs

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub struct EFISdt32 {
1212
}
1313

1414
impl EFISdt32 {
15-
/// The Physical address of a i386 EFI system table.
15+
/// The physical address of a i386 EFI system table.
1616
pub fn sdt_address(&self) -> usize {
1717
self.pointer as usize
1818
}
@@ -28,7 +28,7 @@ pub struct EFISdt64 {
2828
}
2929

3030
impl EFISdt64 {
31-
/// The Physical address of a x86_64 EFI system table.
31+
/// The physical address of a x86_64 EFI system table.
3232
pub fn sdt_address(&self) -> usize {
3333
self.pointer as usize
3434
}
@@ -43,6 +43,13 @@ pub struct EFIImageHandle32 {
4343
pointer: u32,
4444
}
4545

46+
impl EFIImageHandle32 {
47+
/// The Physical address of a i386 EFI system table.
48+
pub fn image_handle(&self) -> usize {
49+
self.pointer as usize
50+
}
51+
}
52+
4653
/// Contains pointer to boot loader image handle.
4754
#[derive(Debug)]
4855
#[repr(C)]
@@ -51,3 +58,10 @@ pub struct EFIImageHandle64 {
5158
size: u32,
5259
pointer: u64,
5360
}
61+
62+
impl EFIImageHandle64 {
63+
/// The Physical address of a i386 EFI system table.
64+
pub fn sdt_address(&self) -> usize {
65+
self.pointer as usize
66+
}
67+
}

multiboot2/src/image_load_addr.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,10 @@ pub struct ImageLoadPhysAddr {
99
size: u32,
1010
load_base_addr: u32,
1111
}
12+
13+
impl ImageLoadPhysAddr {
14+
/// Returns the load base address.
15+
pub fn load_base_addr(&self) -> u32 {
16+
self.load_base_addr
17+
}
18+
}

0 commit comments

Comments
 (0)