Page MenuHomeFreeBSD

D55149.id171373.diff
No OneTemporary

D55149.id171373.diff

diff --git a/sys/arm/include/frame.h b/sys/arm/include/frame.h
--- a/sys/arm/include/frame.h
+++ b/sys/arm/include/frame.h
@@ -58,26 +58,30 @@
* Trap frame. Pushed onto the kernel stack on a trap (synchronous exception).
*/
+/*
+ * NB: The fields marked with (*) are used by kernel debuggers. Their
+ * ABI should be preserved.
+ */
struct trapframe {
register_t tf_spsr;
register_t tf_r0;
register_t tf_r1;
register_t tf_r2;
register_t tf_r3;
- register_t tf_r4;
- register_t tf_r5;
- register_t tf_r6;
- register_t tf_r7;
- register_t tf_r8;
- register_t tf_r9;
- register_t tf_r10;
- register_t tf_r11;
- register_t tf_r12;
- register_t tf_usr_sp;
- register_t tf_usr_lr;
- register_t tf_svc_sp;
- register_t tf_svc_lr;
- register_t tf_pc;
+ register_t tf_r4; /* (*) */
+ register_t tf_r5; /* (*) */
+ register_t tf_r6; /* (*) */
+ register_t tf_r7; /* (*) */
+ register_t tf_r8; /* (*) */
+ register_t tf_r9; /* (*) */
+ register_t tf_r10; /* (*) */
+ register_t tf_r11; /* (*) */
+ register_t tf_r12; /* (*) */
+ register_t tf_usr_sp; /* (*) */
+ register_t tf_usr_lr; /* (*) */
+ register_t tf_svc_sp; /* (*) */
+ register_t tf_svc_lr; /* (*) */
+ register_t tf_pc; /* (*) */
register_t tf_pad;
};
diff --git a/sys/arm64/include/pcb.h b/sys/arm64/include/pcb.h
--- a/sys/arm64/include/pcb.h
+++ b/sys/arm64/include/pcb.h
@@ -46,10 +46,14 @@
#define PCB_FP 10
#define PCB_LR 11
+/*
+ * NB: The fields marked with (*) are used by kernel debuggers. Their
+ * ABI should be preserved.
+ */
struct pcb {
- uint64_t pcb_x[12];
+ uint64_t pcb_x[12]; /* (*) */
/* These two need to be in order as we access them together */
- uint64_t pcb_sp;
+ uint64_t pcb_sp; /* (*) */
uint64_t pcb_tpidr_el0;
uint64_t pcb_tpidrro_el0;
diff --git a/sys/powerpc/include/pcb.h b/sys/powerpc/include/pcb.h
--- a/sys/powerpc/include/pcb.h
+++ b/sys/powerpc/include/pcb.h
@@ -41,12 +41,16 @@
#include <machine/setjmp.h>
#ifndef _STANDALONE
+/*
+ * NB: The fields marked with (*) are used by kernel debuggers. Their
+ * ABI should be preserved.
+ */
struct pcb {
- register_t pcb_context[20]; /* non-volatile r12-r31 */
- register_t pcb_cr; /* Condition register */
- register_t pcb_sp; /* stack pointer */
- register_t pcb_toc; /* toc pointer */
- register_t pcb_lr; /* link register */
+ register_t pcb_context[20]; /* (*) non-volatile r12-r31 */
+ register_t pcb_cr; /* (*) Condition register */
+ register_t pcb_sp; /* (*) stack pointer */
+ register_t pcb_toc; /* (*) toc pointer */
+ register_t pcb_lr; /* (*) link register */
register_t pcb_dscr; /* dscr value */
register_t pcb_fscr;
register_t pcb_tar;
diff --git a/sys/riscv/include/pcb.h b/sys/riscv/include/pcb.h
--- a/sys/riscv/include/pcb.h
+++ b/sys/riscv/include/pcb.h
@@ -39,12 +39,16 @@
struct trapframe;
+/*
+ * NB: The fields marked with (*) are used by kernel debuggers. Their
+ * ABI should be preserved.
+ */
struct pcb {
- uint64_t pcb_ra; /* Return address */
- uint64_t pcb_sp; /* Stack pointer */
- uint64_t pcb_gp; /* Global pointer */
- uint64_t pcb_tp; /* Thread pointer */
- uint64_t pcb_s[12]; /* Saved registers */
+ uint64_t pcb_ra; /* (*) Return address */
+ uint64_t pcb_sp; /* (*) Stack pointer */
+ uint64_t pcb_gp; /* (*) Global pointer */
+ uint64_t pcb_tp; /* (*) Thread pointer */
+ uint64_t pcb_s[12]; /* (*) Saved registers */
uint64_t pcb_x[32][2]; /* Floating point registers */
uint64_t pcb_fcsr; /* Floating point control reg */
uint64_t pcb_fpflags; /* Floating point flags */

File Metadata

Mime Type
text/plain
Expires
Sun, May 17, 11:11 PM (12 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33217126
Default Alt Text
D55149.id171373.diff (3 KB)

Event Timeline