diff options
author | Andreas Sandberg <andreas.sandberg@arm.com> | 2016-06-20 14:39:49 +0100 |
---|---|---|
committer | Andreas Sandberg <andreas.sandberg@arm.com> | 2016-06-20 14:39:49 +0100 |
commit | 37bb0d0fb30a3548173253b0f19861a7ee4f8fce (patch) | |
tree | ee2e89b4a804e4bcaca76c0f38a359c1f5bab3c0 /src/arch/arm/linux/system.hh | |
parent | 60fb5e79f358b7d0784e4cfae4df9ec196e47f19 (diff) | |
download | gem5-37bb0d0fb30a3548173253b0f19861a7ee4f8fce.tar.xz |
kern, arm: Dump dmesg on kernel panic/oops
Add helper functions to dump the guest kernel's dmesg buffer to a text
file in m5out. This functionality is split into two parts. First, a
dmesg dump function that can be used in other places:
void Linux::dumpDmesg(ThreadContext *, std::ostream &)
This function is used to implement two PCEvents: DmesgDumpEvent and
KernelPanic event. The only difference between the two is that the
latter produces a gem5 panic instead of a warning in addition to
dumping the kernel log.
Change-Id: I6d2af1d666ace57124089648ea906f6c787ac63c
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Gabor Dozsa <gabor.dozsa@arm.com>
Diffstat (limited to 'src/arch/arm/linux/system.hh')
-rw-r--r-- | src/arch/arm/linux/system.hh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/arch/arm/linux/system.hh b/src/arch/arm/linux/system.hh index ce1d84b6b..709776ffc 100644 --- a/src/arch/arm/linux/system.hh +++ b/src/arch/arm/linux/system.hh @@ -95,6 +95,12 @@ class LinuxArmSystem : public GenericArmSystem * @param tc thread context that is currentyl executing */ void mapPid(ThreadContext* tc, uint32_t pid); + public: // Exported Python methods + /** + * Dump the kernel's dmesg buffer to stdout + */ + void dumpDmesg(); + private: /** Event to halt the simulator if the kernel calls panic() */ PCEvent *kernelPanicEvent; |