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:
@@ -86,8 +86,8 @@ BootloaderKernelWorkload::loadBootloaderSymbolTable()
|
||||
bootloaderSymbolTable.offset(
|
||||
bootloader_paddr_offset
|
||||
)->functionSymbols()->rename(
|
||||
[](std::string &name) {
|
||||
name = "bootloader." + name;
|
||||
[](const std::string &name) {
|
||||
return "bootloader." + name;
|
||||
}
|
||||
);
|
||||
loader::debugSymbolTable.insert(*renamedBootloaderSymbolTable);
|
||||
@@ -102,8 +102,8 @@ BootloaderKernelWorkload::loadKernelSymbolTable()
|
||||
kernelSymbolTable = kernel->symtab();
|
||||
auto renamedKernelSymbolTable = \
|
||||
kernelSymbolTable.functionSymbols()->rename(
|
||||
[](std::string &name) {
|
||||
name = "kernel." + name;
|
||||
[](const std::string &name) {
|
||||
return "kernel." + name;
|
||||
}
|
||||
);
|
||||
loader::debugSymbolTable.insert(*renamedKernelSymbolTable);
|
||||
|
||||
Reference in New Issue
Block a user