alpha: Implement simPalCheck within the ISA description.
This doesn't need to be plumbed through generic interfaces. If the function/instruction got more complex in the future (unlikely since Alpha doesn't really see development these days), it could be moved to a helper function defined within Alpha files. Change-Id: Ib746fad7bb13c5cc9c6ee555c3a46ce686771c12 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18433 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
This commit is contained in:
@@ -858,7 +858,30 @@ decode OPCODE default Unknown::unknown() {
|
||||
} else {
|
||||
// check to see if simulator wants to do something special
|
||||
// on this PAL call (including maybe suppress it)
|
||||
bool dopal = xc->simPalCheck(palFunc);
|
||||
bool dopal = true;
|
||||
ThreadContext *tc = xc->tcBase();
|
||||
auto *base_stats = tc->getKernelStats();
|
||||
auto *stats = dynamic_cast<AlphaISA::Kernel::Statistics *>(
|
||||
base_stats);
|
||||
assert(stats || !base_stats);
|
||||
if (stats)
|
||||
stats->callpal(palFunc, tc);
|
||||
|
||||
System *sys = tc->getSystemPtr();
|
||||
|
||||
switch (palFunc) {
|
||||
case PAL::halt:
|
||||
xc->tcBase()->halt();
|
||||
if (--System::numSystemsRunning == 0)
|
||||
exitSimLoop("all cpus halted");
|
||||
break;
|
||||
|
||||
case PAL::bpt:
|
||||
case PAL::bugchk:
|
||||
if (sys->breakpoint())
|
||||
dopal = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (dopal) {
|
||||
xc->setMiscReg(IPR_EXC_ADDR, NPC);
|
||||
|
||||
@@ -77,6 +77,7 @@ output exec {{
|
||||
|
||||
#include "arch/alpha/decoder.hh"
|
||||
#include "arch/alpha/kernel_stats.hh"
|
||||
#include "arch/alpha/osfpal.hh"
|
||||
#include "arch/alpha/registers.hh"
|
||||
#include "arch/alpha/regredir.hh"
|
||||
#include "arch/generic/memhelpers.hh"
|
||||
|
||||
Reference in New Issue
Block a user