Skip to content

Commit

Permalink
Merge pull request #32 from hermit-os/fdt
Browse files Browse the repository at this point in the history
feat(v4/0.10.0): add `PlatformInfo::Fdt` for transitioning to FDTs
  • Loading branch information
mkroening authored Apr 11, 2024
2 parents 544317d + c019768 commit 93485ad
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hermit-entry"
version = "0.9.10"
version = "0.10.0"
authors = ["Martin Kröning <[email protected]>"]
edition = "2021"
description = "Hermit's loading and entry API."
Expand Down
1 change: 1 addition & 0 deletions src/boot_info/kernel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ impl From<RawPlatformInfo> for PlatformInfo {
boot_params_addr,
}
}
RawPlatformInfo::Fdt => Self::Fdt,
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/boot_info/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ impl From<PlatformInfo> for RawPlatformInfo {
command_line_len: command_line.map(|s| s.len() as u64).unwrap_or(0),
boot_params_addr,
},
PlatformInfo::Fdt => Self::Fdt,
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions src/boot_info/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ pub enum PlatformInfo {
/// Address to Linux boot parameters.
boot_params_addr: core::num::NonZeroU64,
},
/// FDT.
///
/// This is a transitional platform for migrating to FDTs.
/// The real platform information is stored in [`HardwareInfo::device_tree`].
Fdt,
}

/// Thread local storage (TLS) image information.
Expand Down Expand Up @@ -192,4 +197,5 @@ enum RawPlatformInfo {
command_line_len: u64,
boot_params_addr: core::num::NonZeroU64,
},
Fdt,
}
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const NT_HERMIT_ENTRY_VERSION: u32 = 0x5a00;

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

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

0 comments on commit 93485ad

Please sign in to comment.