changeset 06ec4e8fc7cd in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=06ec4e8fc7cd
description:
arm: Add a method to query interrupt state ignoring CPSR masks
Add the method checkRaw to ArmISA::Interrupts. This method can be used
to query the raw state (ignoring CPSR masks) of an interrupt. It is
primarily intended for hardware virtualized CPUs.
diffstat:
src/arch/arm/interrupts.hh | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
diffs (35 lines):
diff -r 78c9adc85718 -r 06ec4e8fc7cd src/arch/arm/interrupts.hh
--- a/src/arch/arm/interrupts.hh Mon Apr 22 13:20:32 2013 -0400
+++ b/src/arch/arm/interrupts.hh Mon Apr 22 13:20:32 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 ARM Limited
+ * Copyright (c) 2010,2012 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
@@ -150,6 +150,24 @@
return intStatus;
}
+ /**
+ * Check the state of a particular interrupt, ignoring CPSR masks.
+ *
+ * This method is primarily used when running the target CPU in a
+ * hardware VM (e.g., KVM) to check if interrupts should be
+ * delivered upon guest entry.
+ *
+ * @param interrupt Interrupt type to check the state of.
+ * @return true if the interrupt is asserted, false otherwise.
+ */
+ bool
+ checkRaw(InterruptTypes interrupt) const
+ {
+ if (interrupt >= NumInterruptTypes)
+ panic("Interrupt number out of range.\n");
+
+ return interrupts[interrupt];
+ }
Fault
getInterrupt(ThreadContext *tc)
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev