Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102549559
D38983.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D38983.diff
View Options
diff --git a/sys/arm64/arm64/db_trace.c b/sys/arm64/arm64/db_trace.c
--- a/sys/arm64/arm64/db_trace.c
+++ b/sys/arm64/arm64/db_trace.c
@@ -102,18 +102,18 @@
switch (frame_type) {
case FRAME_SYNC:
- db_printf("--- exception, esr %#x\n",
+ db_printf("--- exception, esr %#lx\n",
tf->tf_esr);
break;
case FRAME_IRQ:
db_printf("--- interrupt\n");
break;
case FRAME_SERROR:
- db_printf("--- system error, esr %#x\n",
+ db_printf("--- system error, esr %#lx\n",
tf->tf_esr);
break;
case FRAME_UNHANDLED:
- db_printf("--- unhandled exception, esr %#x\n",
+ db_printf("--- unhandled exception, esr %#lx\n",
tf->tf_esr);
break;
default:
diff --git a/sys/arm64/arm64/exception.S b/sys/arm64/arm64/exception.S
--- a/sys/arm64/arm64/exception.S
+++ b/sys/arm64/arm64/exception.S
@@ -67,7 +67,7 @@
mrs x12, esr_el1
stp x18, lr, [sp, #(TF_SP - TF_X)]!
str x10, [sp, #(TF_ELR)]
- stp w11, w12, [sp, #(TF_SPSR)]
+ stp x11, x12, [sp, #(TF_SPSR)]
mrs x18, tpidr_el1
.endm
diff --git a/sys/arm64/arm64/exec_machdep.c b/sys/arm64/arm64/exec_machdep.c
--- a/sys/arm64/arm64/exec_machdep.c
+++ b/sys/arm64/arm64/exec_machdep.c
@@ -457,7 +457,7 @@
set_mcontext(struct thread *td, mcontext_t *mcp)
{
struct trapframe *tf = td->td_frame;
- uint32_t spsr;
+ uint64_t spsr;
spsr = mcp->mc_gpregs.gp_spsr;
if ((spsr & PSR_M_MASK) != PSR_M_EL0t ||
diff --git a/sys/arm64/arm64/trap.c b/sys/arm64/arm64/trap.c
--- a/sys/arm64/arm64/trap.c
+++ b/sys/arm64/arm64/trap.c
@@ -212,7 +212,7 @@
if (!lower) {
print_registers(frame);
print_gp_register("far", far);
- printf(" esr: %.8lx\n", esr);
+ printf(" esr: %.16lx\n", esr);
panic("Misaligned access from kernel space!");
}
@@ -329,7 +329,7 @@
WARN_GIANTOK, NULL, "Kernel page fault") != 0) {
print_registers(frame);
print_gp_register("far", far);
- printf(" esr: %.8lx\n", esr);
+ printf(" esr: %.16lx\n", esr);
panic("data abort in critical section or under mutex");
}
@@ -370,7 +370,7 @@
printf("Fatal data abort:\n");
print_registers(frame);
print_gp_register("far", far);
- printf(" esr: %.8lx\n", esr);
+ printf(" esr: %.16lx\n", esr);
#ifdef KDB
if (debugger_on_trap) {
@@ -429,7 +429,7 @@
printf(" sp: %16lx\n", frame->tf_sp);
print_gp_register(" lr", frame->tf_lr);
print_gp_register("elr", frame->tf_elr);
- printf("spsr: %8x\n", frame->tf_spsr);
+ printf("spsr: %16lx\n", frame->tf_spsr);
}
#ifdef VFP
@@ -496,7 +496,7 @@
#endif
{
print_registers(frame);
- printf(" esr: %.8lx\n", esr);
+ printf(" esr: %.16lx\n", esr);
panic("VFP exception in the kernel");
}
break;
@@ -510,7 +510,7 @@
} else {
print_registers(frame);
print_gp_register("far", far);
- printf(" esr: %.8lx\n", esr);
+ printf(" esr: %.16lx\n", esr);
panic("Unhandled EL1 %s abort: %x",
exception == EXCP_INSN_ABORT ? "instruction" :
"data", dfsc);
@@ -624,7 +624,7 @@
else {
print_registers(frame);
print_gp_register("far", far);
- printf(" esr: %.8lx\n", esr);
+ printf(" esr: %.16lx\n", esr);
panic("Unhandled EL0 %s abort: %x",
exception == EXCP_INSN_ABORT_L ? "instruction" :
"data", dfsc);
@@ -716,7 +716,7 @@
print_registers(frame);
print_gp_register("far", far);
- printf(" esr: %.8lx\n", esr);
+ printf(" esr: %.16lx\n", esr);
panic("Unhandled System Error");
}
@@ -730,6 +730,6 @@
print_registers(frame);
print_gp_register("far", far);
- printf(" esr: %.8lx\n", esr);
+ printf(" esr: %.16lx\n", esr);
panic("Unhandled exception");
}
diff --git a/sys/arm64/include/frame.h b/sys/arm64/include/frame.h
--- a/sys/arm64/include/frame.h
+++ b/sys/arm64/include/frame.h
@@ -45,8 +45,9 @@
uint64_t tf_sp;
uint64_t tf_lr;
uint64_t tf_elr;
- uint32_t tf_spsr;
- uint32_t tf_esr;
+ uint64_t tf_spsr;
+ uint64_t tf_esr;
+ uint64_t pad; /* struct must be 16B aligned */
uint64_t tf_x[30];
};
diff --git a/sys/arm64/include/reg.h b/sys/arm64/include/reg.h
--- a/sys/arm64/include/reg.h
+++ b/sys/arm64/include/reg.h
@@ -40,7 +40,7 @@
__uint64_t lr;
__uint64_t sp;
__uint64_t elr;
- __uint32_t spsr;
+ __uint64_t spsr;
};
struct reg32 {
diff --git a/sys/arm64/include/ucontext.h b/sys/arm64/include/ucontext.h
--- a/sys/arm64/include/ucontext.h
+++ b/sys/arm64/include/ucontext.h
@@ -38,8 +38,7 @@
__register_t gp_lr;
__register_t gp_sp;
__register_t gp_elr;
- __uint32_t gp_spsr;
- int gp_pad;
+ __uint64_t gp_spsr;
};
struct fpregs {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 14, 10:25 PM (8 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14634548
Default Alt Text
D38983.diff (4 KB)
Attached To
Mode
D38983: arm64: extend ESR/SPSR registers to 64b
Attached
Detach File
Event Timeline
Log In to Comment