This Pull-Request addresses gem5 Issue #550. The code that dumps the Dmesg buffer is now templated on the two variants of the `Metadata` structure, and the correct one is chosen based on the detected Kernel version. To support this functionality, the pull request also adds Symbol Size data to the loader Symbol Table, and adds a method to query the Kernel Version from the image in guest memory. The new attributes in the Symbol class are de-serialized speculatively, so no checkpoint upgrader is required to support this change.
This commit is contained in:
@@ -66,8 +66,8 @@ KernelWorkload::KernelWorkload(const Params &p) : Workload(p),
|
||||
kernelSymtab = kernelObj->symtab();
|
||||
auto initKernelSymtab = kernelSymtab.mask(_loadAddrMask)
|
||||
->offset(_loadAddrOffset)
|
||||
->rename([](std::string &name) {
|
||||
name = "kernel_init." + name;
|
||||
->rename([](const std::string &name) {
|
||||
return "kernel_init." + name;
|
||||
});
|
||||
|
||||
loader::debugSymbolTable.insert(*initKernelSymtab);
|
||||
|
||||
@@ -141,7 +141,7 @@ class Workload : public SimObject
|
||||
if (it == symtab.end())
|
||||
return nullptr;
|
||||
|
||||
return new T(system, desc, fixFuncEventAddr(it->address),
|
||||
return new T(system, desc, fixFuncEventAddr(it->address()),
|
||||
std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user