nixos-riscv/patches/opensbi-dump-mregs.patch

20 lines
766 B
Diff
Raw Normal View History

2024-08-21 07:13:45 +02:00
diff --git a/lib/sbi/sbi_hart.c b/lib/sbi/sbi_hart.c
index c366701..1ef6145 100644
--- a/lib/sbi/sbi_hart.c
+++ b/lib/sbi/sbi_hart.c
@@ -241,6 +241,14 @@ void sbi_hart_delegation_dump(struct sbi_scratch *scratch,
prefix, suffix, csr_read(CSR_MIDELEG));
sbi_printf("%sMEDELEG%s: 0x%" PRILX "\n",
prefix, suffix, csr_read(CSR_MEDELEG));
+ sbi_printf("%sMTVEC%s : 0x%" PRILX "\n",
+ prefix, suffix, csr_read(CSR_MTVEC));
+ sbi_printf("%sMIE%s : 0x%" PRILX "\n",
+ prefix, suffix, csr_read(CSR_MIE));
+ sbi_printf("%sMIP%s : 0x%" PRILX "\n",
+ prefix, suffix, csr_read(CSR_MIP));
+ sbi_printf("%sMSTATUS%s: 0x%" PRILX "\n",
+ prefix, suffix, csr_read(CSR_MSTATUS));
}
unsigned int sbi_hart_mhpm_mask(struct sbi_scratch *scratch)