From ebffd69b8ea90b690514dc48d40041c005682b46 Mon Sep 17 00:00:00 2001 From: Palmer Dabbelt Date: Thu, 25 Feb 2016 21:48:32 -0800 Subject: [PATCH] Provide both __OFFSET and __PADDR for SCR entries This was recently changed to write out physical addresses for SCR file entries, but to bring up the chip we need SCR offsets so we can write the uncore SCR file over HTIF. This changes the map generator to generate both. Without this change things happened to work anyway because the high bits were getting dropped by the SCR file. --- uncore/src/main/scala/scr.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uncore/src/main/scala/scr.scala b/uncore/src/main/scala/scr.scala index 74205fb5..ecc9317f 100644 --- a/uncore/src/main/scala/scr.scala +++ b/uncore/src/main/scala/scr.scala @@ -29,7 +29,8 @@ class SCRFileMap(prefix: String, maxAddress: Int, baseAddress: BigInt) { def as_c_header(): String = { addr2name.map{ case(address, name) => - "#define " + prefix + "__" + name + " 0x%x".format(baseAddress + address) + "#define " + prefix + "__" + name + "__PADDR 0x%x".format(baseAddress + address) + "#define " + prefix + "__" + name + "__OFFSET 0x%x".format(address) }.mkString("\n") + "\n" } }