Skip to content

Commit 93485ad

Browse files
authored
Merge pull request #32 from hermit-os/fdt
feat(v4/0.10.0): add `PlatformInfo::Fdt` for transitioning to FDTs
2 parents 544317d + c019768 commit 93485ad

File tree

5 files changed

+10
-2
lines changed

5 files changed

+10
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "hermit-entry"
3-
version = "0.9.10"
3+
version = "0.10.0"
44
authors = ["Martin Kröning <mkroening@posteo.net>"]
55
edition = "2021"
66
description = "Hermit's loading and entry API."

src/boot_info/kernel.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ impl From<RawPlatformInfo> for PlatformInfo {
8989
boot_params_addr,
9090
}
9191
}
92+
RawPlatformInfo::Fdt => Self::Fdt,
9293
}
9394
}
9495
}

src/boot_info/loader.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ impl From<PlatformInfo> for RawPlatformInfo {
6666
command_line_len: command_line.map(|s| s.len() as u64).unwrap_or(0),
6767
boot_params_addr,
6868
},
69+
PlatformInfo::Fdt => Self::Fdt,
6970
}
7071
}
7172
}

src/boot_info/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ pub enum PlatformInfo {
109109
/// Address to Linux boot parameters.
110110
boot_params_addr: core::num::NonZeroU64,
111111
},
112+
/// FDT.
113+
///
114+
/// This is a transitional platform for migrating to FDTs.
115+
/// The real platform information is stored in [`HardwareInfo::device_tree`].
116+
Fdt,
112117
}
113118

114119
/// Thread local storage (TLS) image information.
@@ -192,4 +197,5 @@ enum RawPlatformInfo {
192197
command_line_len: u64,
193198
boot_params_addr: core::num::NonZeroU64,
194199
},
200+
Fdt,
195201
}

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const NT_HERMIT_ENTRY_VERSION: u32 = 0x5a00;
5151

5252
/// The current hermit entry version.
5353
#[cfg_attr(not(all(feature = "loader", feature = "kernel")), allow(dead_code))]
54-
const HERMIT_ENTRY_VERSION: u8 = 3;
54+
const HERMIT_ENTRY_VERSION: u8 = 4;
5555

5656
/// Offsets and values used to interpret the boot params ("zeropage") setup by firecracker
5757
/// For the full list of values see

0 commit comments

Comments
 (0)