diff options
author | Anup Patel <anup.patel@wdc.com> | 2020-02-14 11:31:38 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2020-02-14 11:31:38 +0530 |
commit | 813ab1718417e09465edc2ed2e4910ce4a58f07a (patch) | |
tree | 2d646f0a1b7fc1fa76e7f15f5dd7c2473d1e8ac4 /riscv/sim.h | |
parent | 6baf42ac1d93c82ff59669c00a6a8991e3b7e4e1 (diff) | |
download | spike-813ab1718417e09465edc2ed2e4910ce4a58f07a.zip spike-813ab1718417e09465edc2ed2e4910ce4a58f07a.tar.gz spike-813ab1718417e09465edc2ed2e4910ce4a58f07a.tar.bz2 |
Make spike capable of booting Linux
Latest Linux does not boot Spike mainly because:
1. Spike does not set bootargs in DTS
2. Spike does not provide mechanism to load initrd for Linux
This patch addresses both above issues and we can now
get latest Linux to prompt on Spike.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'riscv/sim.h')
-rw-r--r-- | riscv/sim.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/riscv/sim.h b/riscv/sim.h index 3b7e25c..44f2f92 100644 --- a/riscv/sim.h +++ b/riscv/sim.h @@ -22,7 +22,7 @@ class sim_t : public htif_t, public simif_t { public: sim_t(const char* isa, const char* priv, const char* varch, size_t _nprocs, - bool halted, + bool halted, reg_t initrd_start, reg_t initrd_end, reg_t start_pc, std::vector<std::pair<reg_t, mem_t*>> mems, std::vector<std::pair<reg_t, abstract_device_t*>> plugin_devices, const std::vector<std::string>& args, const std::vector<int> hartids, @@ -54,6 +54,8 @@ private: std::vector<std::pair<reg_t, abstract_device_t*>> plugin_devices; mmu_t* debug_mmu; // debug port into main memory std::vector<processor_t*> procs; + reg_t initrd_start; + reg_t initrd_end; reg_t start_pc; std::string dts; std::unique_ptr<rom_device_t> boot_rom; |