From 9708ea40f94076deba45238be0d1e1945276ea20 Mon Sep 17 00:00:00 2001 From: Iain Robertson Date: Sun, 20 Oct 2024 19:33:11 +0100 Subject: [PATCH 1/2] Clarifications related to privilege and synchronization --- branchTrace.adoc | 1 + payload.adoc | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/branchTrace.adoc b/branchTrace.adoc index e62e1aa..b06366c 100644 --- a/branchTrace.adoc +++ b/branchTrace.adoc @@ -119,6 +119,7 @@ The instruction trace encoder needs to synchronise fully: was not traced; * If the instruction is the first of an interrupt service routine or exception handler; +* If the privilege level changes; * After a prolonged period of time. [[sec:endoftrace]] diff --git a/payload.adoc b/payload.adoc index dab4a5e..6331a57 100644 --- a/payload.adoc +++ b/payload.adoc @@ -185,7 +185,7 @@ must be left shifted in order to recreate original byte address. |=== [[sec:thaddr]] -==== Format 3 *thaddr* and *address* fields +==== Format 3 *thaddr*, *address* and *privilege* fields If an exception occurs at the target of an uninferable PC discontinuity, the value of the EPC cannot be infered from the program binary, and so @@ -206,6 +206,8 @@ is 0 is that it may be at either the address of the next instruction or current instruction depending on the exception cause, which can be inferred by the decoder without adding complexity to the encoder.) +Where an interrupt or exception causes a privilege change, this changes comes into force from the start of the trap handler. As such, the privilege value reported when *thaddr* is 0 will be the privilege level prior to any change. + ==== Format 3 *tval* field This field reports the "trap value" from the appropriate From a59736f6e697de3a9ce6a887a12fa8e1814c260f Mon Sep 17 00:00:00 2001 From: Iain Robertson Date: Fri, 25 Oct 2024 14:28:57 -0700 Subject: [PATCH 2/2] Fix grammatical typo --- payload.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/payload.adoc b/payload.adoc index 6331a57..3f6bdc0 100644 --- a/payload.adoc +++ b/payload.adoc @@ -206,7 +206,7 @@ is 0 is that it may be at either the address of the next instruction or current instruction depending on the exception cause, which can be inferred by the decoder without adding complexity to the encoder.) -Where an interrupt or exception causes a privilege change, this changes comes into force from the start of the trap handler. As such, the privilege value reported when *thaddr* is 0 will be the privilege level prior to any change. +Where an interrupt or exception causes a privilege change, this change comes into force from the start of the trap handler. As such, the privilege value reported when *thaddr* is 0 will be the privilege level prior to any change. ==== Format 3 *tval* field