44 #include "debug/Loader.hh" 55 enableContextSwitchStatsDump(p->enable_context_switch_stats_dump),
56 taskFile(nullptr), kernelPanicEvent(nullptr), kernelOopsEvent(nullptr)
58 if (p->panic_on_panic) {
60 "panic",
"Kernel panic in simulated kernel");
67 if (p->panic_on_oops) {
69 "oops_exit",
"Kernel oops in guest");
73 "DELAY",
"DELAY", 1000, 0);
88 if (
params()->early_kernel_symbols) {
98 bool kernel_has_fdt_support =
100 bool dtb_file_specified =
params()->dtb_filename !=
"";
102 if (!dtb_file_specified)
103 fatal(
"dtb file is not specified\n");
105 if (!kernel_has_fdt_support)
106 fatal(
"kernel must have fdt support\n");
110 inform(
"Loading DTB file: %s at address %#x\n",
params()->dtb_filename,
116 params()->boot_osflags.size())) {
117 warn(
"couldn't append bootargs to DTB file: %s\n",
146 FreebsdArmSystemParams::create()
virtual void initState()
Initialise the system.
#define fatal(...)
This implements a cprintf based fatal() function.
FreebsdArmSystemParams Params
Boilerplate params code.
SymbolTable * debugSymbolTable
Global unified debugging symbol table (for target).
const Params * params() const
FreeBSD::UDelayEvent * uDelaySkipEvent
PC based event to skip udelay(<time>) calls and quiesce the processor for the appropriate amount of t...
PortProxy physProxy
Port to physical memory used for writing object files into ram at boot.
void startup()
startup() is the final initialization call before simulation.
bool findAddress(const std::string &symbol, Addr &address) const
Addr loadAddrMask
Mask that should be anded for binary/symbol loading.
std::vector< ThreadContext * > threadContexts
Addr findReleaseAddr()
Parse the DTB file enough to find the provided release address and return it.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
#define ULL(N)
uint64_t constant
SymbolTable * kernelSymtab
kernel symbol table
This implements an image file format to support loading and modifying flattened device tree blobs for...
ObjectFile * kernel
Object pointer for the kernel code.
FreebsdArmSystem(Params *p)
MemoryImage buildImage() const override
PCEvent * kernelPanicEvent
Event to halt the simulator if the kernel calls panic()
bool addBootCmdLine(const char *_args, size_t len)
Adds the passed in Command Line options for the kernel to the proper location in the device tree...
PCEvent * kernelOopsEvent
Event to halt the simulator if the kernel calls oopses.
TranslatingPortProxy Object Declaration for FS.
void initState()
Initialise the system.
Addr loadAddrOffset
Offset that should be used for binary/symbol loading.
virtual bool loadGlobalSymbols(SymbolTable *symtab, Addr base=0, Addr offset=0, Addr mask=MaxAddr)
FreeBSD::UDelayEvent * constUDelaySkipEvent
Another PC based skip event for const_udelay().