Skip to content

Commit

Permalink
feat: add PlatformInfo::Fdt for transitioning to FDTs
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Kröning <[email protected]>
  • Loading branch information
mkroening committed Apr 10, 2024
1 parent 544317d commit b8e5854
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
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,
}

0 comments on commit b8e5854

Please sign in to comment.