Put HTIF in the device tree
authorPalmer Dabbelt <palmer@dabbelt.com>
Fri, 3 Nov 2017 22:38:12 +0000 (15:38 -0700)
committerPalmer Dabbelt <palmer@dabbelt.com>
Fri, 3 Nov 2017 23:26:10 +0000 (16:26 -0700)
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.

riscv/sim.cc

index 647cc46fa2a2b44bf64489f230eed03219b13851..5aa92136897208858ddf85e7815421f510dd67bb 100644 (file)
@@ -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();