aboutsummaryrefslogtreecommitdiff
path: root/riscv/sim.cc
diff options
context:
space:
mode:
authorPalmer Dabbelt <palmer@dabbelt.com>2017-11-03 15:38:12 -0700
committerPalmer Dabbelt <palmer@dabbelt.com>2017-11-03 16:26:10 -0700
commit092b464c06d2eba580b95a3ac7013449cb2687e4 (patch)
treeb9670941b1c05a0cfa9de32590abacd7a1d52b6c /riscv/sim.cc
parent95fafa8f05320a761f70bef022a05c3053ea7b27 (diff)
downloadspike-092b464c06d2eba580b95a3ac7013449cb2687e4.zip
spike-092b464c06d2eba580b95a3ac7013449cb2687e4.tar.gz
spike-092b464c06d2eba580b95a3ac7013449cb2687e4.tar.bz2
Put HTIF in the device tree
I wanted to actually put the address of the HTIF into the DTS, but that seems to be a bit too much work: since the HTIF addresses are just defined in an ELF file it's a bit awkward to make that work. Instead, I'm just putting a dummy HTIF key in the DTS.
Diffstat (limited to 'riscv/sim.cc')
-rw-r--r--riscv/sim.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/riscv/sim.cc b/riscv/sim.cc
index 647cc46..5aa9213 100644
--- a/riscv/sim.cc
+++ b/riscv/sim.cc
@@ -300,6 +300,9 @@ void sim_t::make_dtb()
" 0x" << (clintsz >> 32) << " 0x" << (clintsz & (uint32_t)-1) << ">;\n"
" };\n"
" };\n"
+ " htif {\n"
+ " compatible = \"ucb,htif0\";\n"
+ " };\n"
"};\n";
dts = s.str();