mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
aarch64: Add a memory-simulated flash for UEFI
EDK2 execution requires a flash device at address 0. The new added device is not a fully functional flash. It doesn't implement any spec of a flash device. Instead, a piece of memory is used to simulate the flash simply. Signed-off-by: Michael Zhao <michael.zhao@arm.com>
This commit is contained in:
committed by
Rob Bradford
parent
9dd107bb03
commit
d1b2a3fca9
@@ -1001,8 +1001,11 @@ impl Vm {
|
||||
// If failed, retry to load it as UEFI binary.
|
||||
// As the UEFI binary is formatless, it must be the last option to try.
|
||||
Err(linux_loader::loader::Error::Pe(InvalidImageMagicNumber)) => {
|
||||
let uefi_flash = self.device_manager.lock().as_ref().unwrap().uefi_flash();
|
||||
let mem = uefi_flash.memory();
|
||||
arch::aarch64::uefi::load_uefi(mem.deref(), arch::layout::UEFI_START, &mut kernel)
|
||||
.map_err(Error::UefiLoad)?;
|
||||
|
||||
// The entry point offset in UEFI image is always 0.
|
||||
return Ok(EntryPoint {
|
||||
entry_addr: arch::layout::UEFI_START,
|
||||
|
||||
Reference in New Issue
Block a user