kernel = Param.String("", "file that contains the kernel code")
kernel_addr_check = Param.Bool(True,
"whether to address check on kernel (disable for baremetal)")
+ kernel_extras = VectorParam.String([],"Additional object files to load")
readfile = Param.String("", "file to read startup script from")
symbolfile = Param.String("", "file to get the symbols from")
load_addr_mask = Param.UInt64(0xffffffffff,
// Loading only needs to happen once and after memory system is
// connected so it will happen in initState()
}
+
+ for (const auto &obj_name : p->kernel_extras) {
+ inform("Loading additional kernel object: %s", obj_name);
+ ObjectFile *obj = createObjectFile(obj_name);
+ fatal_if(!obj, "Failed to additional kernel object '%s'.\n",
+ obj_name);
+ kernelExtras.push_back(obj);
+ }
}
// increment the number of running systems
}
// Load program sections into memory
kernel->loadSections(physProxy, loadAddrMask, loadAddrOffset);
+ for (const auto &extra_kernel : kernelExtras) {
+ extra_kernel->loadSections(physProxy, loadAddrMask,
+ loadAddrOffset);
+ }
DPRINTF(Loader, "Kernel start = %#x\n", kernelStart);
DPRINTF(Loader, "Kernel end = %#x\n", kernelEnd);
/** Object pointer for the kernel code */
ObjectFile *kernel;
+ /** Additional object files */
+ std::vector<ObjectFile *> kernelExtras;
+
/** Beginning of kernel code */
Addr kernelStart;