1
0

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.
This commit is contained in:
Palmer Dabbelt 2016-02-25 21:48:32 -08:00
parent 19420cd5df
commit ebffd69b8e

View File

@ -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"
}
}