mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
UPSTREAM: arch/riscv: Visually align trap frame information
The pointers printed on unaligned memory accesses are now aligned to those printed at the end of print_trap_information. BUG=None BRANCH=None TEST=None Signed-off-by: Jonathan Neuschfer <j.neuschaefer@gmx.net> Reviewed-on: https://review.coreboot.org/16983 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Change-Id: Ifec1cb639036ce61b81fe8d0a9b14c00d5b2781a Reviewed-on: https://chromium-review.googlesource.com/400106 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
d2c8826a58
commit
c1bd90e3d0
1 changed files with 4 additions and 4 deletions
|
@ -172,8 +172,8 @@ static uint32_t fetch_instruction(uintptr_t vaddr) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void handle_misaligned_load(trapframe *tf) {
|
void handle_misaligned_load(trapframe *tf) {
|
||||||
printk(BIOS_DEBUG, "Trapframe ptr: %p\n", tf);
|
printk(BIOS_DEBUG, "Trapframe ptr: %p\n", tf);
|
||||||
printk(BIOS_DEBUG, "Stored sp: %p\n", (void*) tf->gpr[2]);
|
printk(BIOS_DEBUG, "Stored sp: %p\n", (void*) tf->gpr[2]);
|
||||||
uintptr_t faultingInstructionAddr = tf->epc;
|
uintptr_t faultingInstructionAddr = tf->epc;
|
||||||
insn_t faultingInstruction = fetch_instruction(faultingInstructionAddr);
|
insn_t faultingInstruction = fetch_instruction(faultingInstructionAddr);
|
||||||
printk(BIOS_DEBUG, "Faulting instruction: 0x%x\n", faultingInstruction);
|
printk(BIOS_DEBUG, "Faulting instruction: 0x%x\n", faultingInstruction);
|
||||||
|
@ -202,8 +202,8 @@ void handle_misaligned_load(trapframe *tf) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void handle_misaligned_store(trapframe *tf) {
|
void handle_misaligned_store(trapframe *tf) {
|
||||||
printk(BIOS_DEBUG, "Trapframe ptr: %p\n", tf);
|
printk(BIOS_DEBUG, "Trapframe ptr: %p\n", tf);
|
||||||
printk(BIOS_DEBUG, "Stored sp: %p\n", (void*) tf->gpr[2]);
|
printk(BIOS_DEBUG, "Stored sp: %p\n", (void*) tf->gpr[2]);
|
||||||
uintptr_t faultingInstructionAddr = tf->epc;
|
uintptr_t faultingInstructionAddr = tf->epc;
|
||||||
insn_t faultingInstruction = fetch_instruction(faultingInstructionAddr);
|
insn_t faultingInstruction = fetch_instruction(faultingInstructionAddr);
|
||||||
printk(BIOS_DEBUG, "Faulting instruction: 0x%x\n", faultingInstruction);
|
printk(BIOS_DEBUG, "Faulting instruction: 0x%x\n", faultingInstruction);
|
||||||
|
|
Loading…
Add table
Reference in a new issue