From: Glenn Miles <milesg@linux.ibm.com>
To: qemu-devel@nongnu.org
Cc: Glenn Miles <milesg@linux.ibm.com>,
qemu-ppc@nongnu.org, clg@redhat.com, npiggin@gmail.com,
harshpb@linux.ibm.com, thuth@redhat.com, rathc@linux.ibm.com,
richard.henderson@linaro.org
Subject: [PATCH v3 3/9] target/ppc: IBM PPE42 exception flags and regs
Date: Mon, 8 Sep 2025 15:00:13 -0500 [thread overview]
Message-ID: <20250908200028.115789-4-milesg@linux.ibm.com> (raw)
In-Reply-To: <20250908200028.115789-1-milesg@linux.ibm.com>
Introduces flags and register definitions needed
for the IBM PPE42 exception model.
Signed-off-by: Glenn Miles <milesg@linux.ibm.com>
---
Changes from v2:
- Split exception flags and registers from v2 patch 1
target/ppc/cpu.h | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h
index 81a0e16641..c68dd4f141 100644
--- a/target/ppc/cpu.h
+++ b/target/ppc/cpu.h
@@ -220,6 +220,8 @@ typedef enum powerpc_excp_t {
POWERPC_EXCP_POWER10,
/* POWER11 exception model */
POWERPC_EXCP_POWER11,
+ /* PPE42 exception model */
+ POWERPC_EXCP_PPE42,
} powerpc_excp_t;
/*****************************************************************************/
@@ -760,6 +762,31 @@ FIELD(MSR, SIBRCA, MSR_SIBRCA7, 8)
#define ESR_VLEMI PPC_BIT(58) /* VLE operation */
#define ESR_MIF PPC_BIT(62) /* Misaligned instruction (VLE) */
+/* PPE42 Interrupt Status Register bits */
+#define PPE42_ISR_SRSMS0 PPC_BIT_NR(48) /* Sys Reset State Machine State 0 */
+#define PPE42_ISR_SRSMS1 PPC_BIT_NR(49) /* Sys Reset State Machine State 1 */
+#define PPE42_ISR_SRSMS2 PPC_BIT_NR(50) /* Sys Reset State Machine State 2 */
+#define PPE42_ISR_SRSMS3 PPC_BIT_NR(51) /* Sys Reset State Machine State 3 */
+#define PPE42_ISR_EP PPC_BIT_NR(53) /* MSR[EE] Maskable Event Pending */
+#define PPE42_ISR_PTR PPC_BIT_NR(56) /* Program Interrupt from trap */
+#define PPE42_ISR_ST PPC_BIT_NR(57) /* Data Interrupt caused by store */
+#define PPE42_ISR_MFE PPC_BIT_NR(60) /* Multiple Fault Error */
+#define PPE42_ISR_MCS0 PPC_BIT_NR(61) /* Machine Check Status bit0 */
+#define PPE42_ISR_MCS1 PPC_BIT_NR(62) /* Machine Check Status bit1 */
+#define PPE42_ISR_MCS2 PPC_BIT_NR(63) /* Machine Check Status bit2 */
+FIELD(PPE42_ISR, SRSMS, PPE42_ISR_SRSMS3, 4)
+FIELD(PPE42_ISR, MCS, PPE42_ISR_MCS2, 3)
+
+/* PPE42 Machine Check Status field values */
+#define PPE42_ISR_MCS_INSTRUCTION 0
+#define PPE42_ISR_MCS_DATA_LOAD 1
+#define PPE42_ISR_MCS_DATA_PRECISE_STORE 2
+#define PPE42_ISR_MCS_DATA_IMPRECISE_STORE 3
+#define PPE42_ISR_MCS_PROGRAM 4
+#define PPE42_ISR_MCS_ISI 5
+#define PPE42_ISR_MCS_ALIGNMENT 6
+#define PPE42_ISR_MCS_DSI 7
+
/* Transaction EXception And Summary Register bits */
#define TEXASR_FAILURE_PERSISTENT (63 - 7)
#define TEXASR_DISALLOWED (63 - 8)
--
2.43.0
next prev parent reply other threads:[~2025-09-08 20:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-08 20:00 [PATCH v3 0/9] Add IBM PPE42 CPU support Glenn Miles
2025-09-08 20:00 ` [PATCH v3 1/9] target/ppc: IBM PPE42 general regs and flags Glenn Miles
2025-09-08 20:00 ` [PATCH v3 2/9] target/ppc: Add IBM PPE42 family of processors Glenn Miles
2025-09-08 20:00 ` Glenn Miles [this message]
2025-09-08 20:00 ` [PATCH v3 4/9] target/ppc: Add IBM PPE42 exception model Glenn Miles
2025-09-08 20:00 ` [PATCH v3 5/9] target/ppc: Support for IBM PPE42 MMU Glenn Miles
2025-09-08 20:00 ` [PATCH v3 6/9] target/ppc: Add IBM PPE42 special instructions Glenn Miles
2025-09-12 10:50 ` Chinmay Rath
2025-09-12 15:59 ` Miles Glenn
2025-09-08 20:00 ` [PATCH v3 7/9] hw/ppc: Support for an IBM PPE42 CPU decrementer Glenn Miles
2025-09-08 20:00 ` [PATCH v3 8/9] hw/ppc: Add a test machine for the IBM PPE42 CPU Glenn Miles
2025-09-10 7:10 ` Cédric Le Goater
2025-09-10 14:21 ` Miles Glenn
2025-09-08 20:00 ` [PATCH v3 9/9] tests/functional: Add test for IBM PPE42 instructions Glenn Miles
2025-09-08 21:17 ` Miles Glenn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250908200028.115789-4-milesg@linux.ibm.com \
--to=milesg@linux.ibm.com \
--cc=clg@redhat.com \
--cc=harshpb@linux.ibm.com \
--cc=npiggin@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=rathc@linux.ibm.com \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.