matcha_utils: stop loading cantrip-builtins from load_sel4
load_sel4 is used only when running on Renode; but Renode already loads
the builtins cpio archive with an explicit LoadFile so doing it here is
redundant.
Change-Id: I4a260178cd441d2c358e06c01cc0cc8719dfa419
diff --git a/utils/src/lib.rs b/utils/src/lib.rs
index e792644..d21d6e9 100644
--- a/utils/src/lib.rs
+++ b/utils/src/lib.rs
@@ -1,5 +1,10 @@
#![no_std]
+// Support for loading sel4 & co directly from the tarball. This is only
+// used when running in simulation where there is no SPI Flash support
+// (the elfloader capsule calls out to load_sel4 based on whether it
+// detects fpga hardware or not).
+
use matcha_hal::dprintf;
use matcha_hal::mailbox_hal::MailboxHAL;
@@ -18,7 +23,6 @@
// Look in our tar file for the ELFs we need to boot Shodan.
let sel4_elf = elf_loader::find_elf("kernel");
let capdl_elf = elf_loader::find_elf("capdl-loader");
- let (_, builtins_size) = tar_loader::find_file("cantrip-builtins");
if sel4_elf.is_null() {
dprintf!("Boot failure, seL4 kernel ELF missing in FLASH.\n");
@@ -30,11 +34,6 @@
return;
}
- if builtins_size == 0 {
- // NB: not present on Renode where the file is loaded directly.
- dprintf!("WARNING, cantrip-builtins missing in FLASH; ignoring\r\n");
- }
-
// If we found all of them, boot in Shodan mode.
dprintf!("Loading seL4 kernel elf\n");
elf_loader::load_elf_segments(sel4_elf.as_ref().unwrap(), 0);
@@ -50,9 +49,8 @@
ui_p_reg_start - elf_loader::elf_phys_min(capdl_segments),
);
- if builtins_size != 0 {
- tar_loader::copy_file("cantrip-builtins", 0x50380000);
- }
+ // NB: Renode loads the cantrip-builtins cpioarchive to the SMC memory
+ // carve-out so there's nothing to do here.
dprintf!("Starting management core\n");