assert:read content of undefinedinsn address
read content of undefinedinsn address, and compare it with what it is in elf to check if there is a ram bit flip Signed-off-by: liaoao <liaoao@xiaomi.com>
This commit is contained in:
parent
eb2f661170
commit
0e2bf8ce2c
|
@ -42,7 +42,16 @@
|
||||||
|
|
||||||
void arm_undefinedinsn(uint32_t *regs)
|
void arm_undefinedinsn(uint32_t *regs)
|
||||||
{
|
{
|
||||||
_alert("Undefined instruction at 0x%" PRIx32 "\n", regs[REG_PC]);
|
if (regs[REG_PC] >= (uint32_t)_stext && regs[REG_PC] < (uint32_t)_etext)
|
||||||
|
{
|
||||||
|
_alert("Undefined instruction at 0x%" PRIx32 ": 0x%" PRIx32 "\n",
|
||||||
|
regs[REG_PC], *(uint32_t *)regs[REG_PC]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_alert("Undefined instruction at 0x%" PRIx32 "\n", regs[REG_PC]);
|
||||||
|
}
|
||||||
|
|
||||||
up_set_current_regs(regs);
|
up_set_current_regs(regs);
|
||||||
|
|
||||||
PANIC_WITH_REGS("panic", regs);
|
PANIC_WITH_REGS("panic", regs);
|
||||||
|
|
|
@ -42,7 +42,16 @@
|
||||||
|
|
||||||
uint32_t *arm_undefinedinsn(uint32_t *regs)
|
uint32_t *arm_undefinedinsn(uint32_t *regs)
|
||||||
{
|
{
|
||||||
_alert("Undefined instruction at 0x%" PRIx32 "\n", regs[REG_PC]);
|
if (regs[REG_PC] >= (uint32_t)_stext && regs[REG_PC] < (uint32_t)_etext)
|
||||||
|
{
|
||||||
|
_alert("Undefined instruction at 0x%" PRIx32 ": 0x%" PRIx32 "\n",
|
||||||
|
regs[REG_PC], *(uint32_t *)regs[REG_PC]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_alert("Undefined instruction at 0x%" PRIx32 "\n", regs[REG_PC]);
|
||||||
|
}
|
||||||
|
|
||||||
up_set_current_regs(regs);
|
up_set_current_regs(regs);
|
||||||
|
|
||||||
PANIC_WITH_REGS("panic", regs);
|
PANIC_WITH_REGS("panic", regs);
|
||||||
|
|
|
@ -42,7 +42,16 @@
|
||||||
|
|
||||||
uint32_t *arm_undefinedinsn(uint32_t *regs)
|
uint32_t *arm_undefinedinsn(uint32_t *regs)
|
||||||
{
|
{
|
||||||
_alert("Undefined instruction at 0x%" PRIx32 "\n", regs[REG_PC]);
|
if (regs[REG_PC] >= (uint32_t)_stext && regs[REG_PC] < (uint32_t)_etext)
|
||||||
|
{
|
||||||
|
_alert("Undefined instruction at 0x%" PRIx32 ": 0x%" PRIx32 "\n",
|
||||||
|
regs[REG_PC], *(uint32_t *)regs[REG_PC]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_alert("Undefined instruction at 0x%" PRIx32 "\n", regs[REG_PC]);
|
||||||
|
}
|
||||||
|
|
||||||
up_set_current_regs(regs);
|
up_set_current_regs(regs);
|
||||||
|
|
||||||
PANIC_WITH_REGS("panic", regs);
|
PANIC_WITH_REGS("panic", regs);
|
||||||
|
|
|
@ -42,7 +42,16 @@
|
||||||
|
|
||||||
uint32_t *arm_undefinedinsn(uint32_t *regs)
|
uint32_t *arm_undefinedinsn(uint32_t *regs)
|
||||||
{
|
{
|
||||||
_alert("Undefined instruction at 0x%" PRIx32 "\n", regs[REG_PC]);
|
if (regs[REG_PC] >= (uint32_t)_stext && regs[REG_PC] < (uint32_t)_etext)
|
||||||
|
{
|
||||||
|
_alert("Undefined instruction at 0x%" PRIx32 ": 0x%" PRIx32 "\n",
|
||||||
|
regs[REG_PC], *(uint32_t *)regs[REG_PC]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_alert("Undefined instruction at 0x%" PRIx32 "\n", regs[REG_PC]);
|
||||||
|
}
|
||||||
|
|
||||||
up_set_current_regs(regs);
|
up_set_current_regs(regs);
|
||||||
|
|
||||||
PANIC_WITH_REGS("panic", regs);
|
PANIC_WITH_REGS("panic", regs);
|
||||||
|
|
|
@ -99,6 +99,7 @@ SECTIONS
|
||||||
|
|
||||||
.paged : {
|
.paged : {
|
||||||
_spaged = ABSOLUTE(.);
|
_spaged = ABSOLUTE(.);
|
||||||
|
_stext = _spaged;
|
||||||
*(.text .text.*)
|
*(.text .text.*)
|
||||||
*(.fixup)
|
*(.fixup)
|
||||||
*(.gnu.warning)
|
*(.gnu.warning)
|
||||||
|
@ -110,6 +111,7 @@ SECTIONS
|
||||||
*(.gcc_except_table)
|
*(.gcc_except_table)
|
||||||
*(.gnu.linkonce.r.*)
|
*(.gnu.linkonce.r.*)
|
||||||
_epaged = ABSOLUTE(.);
|
_epaged = ABSOLUTE(.);
|
||||||
|
_etext = _epaged;
|
||||||
} > paged
|
} > paged
|
||||||
|
|
||||||
.data : {
|
.data : {
|
||||||
|
|
Loading…
Reference in New Issue