From 3951997c2a7a00e9efd442ccb36c45d183f63c6e Mon Sep 17 00:00:00 2001 From: Greg Bellows Date: Mon, 12 Feb 2018 21:33:00 -0500 Subject: [PATCH] target-arm: Add WFx syndrome function Adds a utility function for creating a WFx exception syndrome Backports commit 06fbb2fdf7a7ac468d62c66cfe4537d3c71f7bb9 from qemu --- qemu/target-arm/internals.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qemu/target-arm/internals.h b/qemu/target-arm/internals.h index 3d69f532..57239452 100644 --- a/qemu/target-arm/internals.h +++ b/qemu/target-arm/internals.h @@ -349,6 +349,12 @@ static inline uint32_t syn_breakpoint(int same_el) | ARM_EL_IL | 0x22; } +static inline uint32_t syn_wfx(int cv, int cond, int ti) +{ + return (EC_WFX_TRAP << ARM_EL_EC_SHIFT) | + (cv << 24) | (cond << 20) | ti; +} + /* Update a QEMU watchpoint based on the information the guest has set in the * DBGWCR_EL1 and DBGWVR_EL1 registers. */