From b4a10d55e55752c3423a9d0f4b529f7f80432590 Mon Sep 17 00:00:00 2001 From: Giacomo Travaglini Date: Tue, 5 Jun 2018 16:17:48 +0100 Subject: arch-arm: AArch32 execution triggering AArch64 SW Break AArch32 Software Breakpoint (BKPT) can trigger an AArch64 fault when interprocessing if the trapping conditions are met. Change-Id: I485852ed19429f9cd928a6447a95eb6f471f189c Signed-off-by: Giacomo Travaglini Reviewed-by: Andreas Sandberg Reviewed-on: https://gem5-review.googlesource.com/11197 Maintainer: Andreas Sandberg --- src/arch/arm/isa/formats/breakpoint.isa | 44 +-------------------------------- 1 file changed, 1 insertion(+), 43 deletions(-) (limited to 'src/arch/arm/isa/formats') diff --git a/src/arch/arm/isa/formats/breakpoint.isa b/src/arch/arm/isa/formats/breakpoint.isa index 4f281e045..67360f1b5 100644 --- a/src/arch/arm/isa/formats/breakpoint.isa +++ b/src/arch/arm/isa/formats/breakpoint.isa @@ -45,53 +45,11 @@ // Breakpoint instructions // -output header {{ - /** - * Static instruction class for Breakpoint (illegal) instructions. - * These cause simulator termination if they are executed in a - * non-speculative mode. This is a leaf class. - */ - class Breakpoint : public ArmStaticInst - { - public: - /// Constructor - Breakpoint(ExtMachInst _machInst) - : ArmStaticInst("Breakpoint", _machInst, No_OpClass) - { - // don't call execute() (which panics) if we're on a - // speculative path - flags[IsNonSpeculative] = true; - } - - Fault execute(ExecContext *, Trace::InstRecord *) const override; - - std::string - generateDisassembly(Addr pc, const SymbolTable *symtab) const override; - }; -}}; - -output decoder {{ - std::string - Breakpoint::generateDisassembly(Addr pc, const SymbolTable *symtab) const - { - return csprintf("%-10s (inst 0x%x)", "Breakpoint", machInst); - } -}}; - -output exec {{ - Fault - Breakpoint::execute(ExecContext *xc, Trace::InstRecord *traceData) const - { - return std::make_shared(xc->pcState().pc(), - ArmFault::DebugEvent); - } -}}; - def format ArmBkptHlt() {{ decode_block = ''' { if (bits(machInst, 21)) { - return new Breakpoint(machInst); + return new BkptInst(machInst); } else { uint32_t imm16 = (bits(machInst, 19, 8) << 4) | (bits(machInst, 3, 0) << 0); -- cgit v1.2.3