set hash default value to 0x30 ("0")

this makes it much easier to detect if a loader failed to set
a hash in other routines.
This commit is contained in:
bunnie 2024-01-08 00:21:06 +08:00
parent 7b8a598020
commit 3da1ed181e

View file

@ -38,7 +38,7 @@ pub fn phase_2(cfg: &mut BootConfig, fs_prehash: &[u8; 64]) {
0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
0x30, 0x41, 0x42, 0x43, 0x44, 0x45, 0x30, 0x30,
0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
];
// Convert the fs_prehash into a hex ascii string, suitable for environment variables
// The initial loader environment is hard-coded, so we use a hard-coded offset for the string