Skip to content

Commit 4644bc3

Browse files
committed
dedicated module file for ImageLoadPhysAddr MBI tag
1 parent c044e26 commit 4644bc3

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

src/image_load_addr.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
use crate::TagType;
2+
3+
/// If the image has relocatable header tag, this tag contains the image's
4+
/// base physical address.
5+
#[derive(Debug)]
6+
#[repr(C)]
7+
pub struct ImageLoadPhysAddr {
8+
typ: TagType,
9+
size: u32,
10+
load_base_addr: u32,
11+
}

src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ pub use memory_map::{
3939
};
4040
pub use module::{ModuleIter, ModuleTag};
4141
pub use rsdp::{
42-
ImageLoadPhysAddr, RsdpV1Tag, RsdpV2Tag,
42+
RsdpV1Tag, RsdpV2Tag,
4343
};
44+
pub use image_load_addr::ImageLoadPhysAddr;
4445
pub use efi::{EFIImageHandle32, EFIImageHandle64, EFISdt32, EFISdt64};
4546
pub use vbe_info::{
4647
VBECapabilities, VBEControlInfo, VBEDirectColorAttributes, VBEField, VBEInfoTag,
@@ -60,6 +61,7 @@ mod module;
6061
mod rsdp;
6162
mod vbe_info;
6263
mod efi;
64+
mod image_load_addr;
6365

6466
/// Load the multiboot boot information struct from an address.
6567
///

src/rsdp.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,6 @@ use crate::TagType;
1414

1515
const RSDPV1_LENGTH: usize = 20;
1616

17-
/// If the image has relocatable header tag, this tag contains the image's
18-
/// base physical address.
19-
#[derive(Debug)]
20-
#[repr(C)]
21-
pub struct ImageLoadPhysAddr {
22-
typ: TagType,
23-
size: u32,
24-
load_base_addr: u32,
25-
}
26-
2717
/// This tag contains a copy of RSDP as defined per ACPI 1.0 specification.
2818
#[derive(Clone, Copy, Debug)]
2919
#[repr(C, packed)]

0 commit comments

Comments
 (0)