Minor style stuff

This commit is contained in:
Aurora Wright 2017-08-21 19:32:39 +02:00
parent 2492c8273a
commit 538d1dec77
2 changed files with 12 additions and 16 deletions

View File

@ -91,19 +91,6 @@ void detectAndProcessExceptionDumps(void)
if(dumpHeader->processor == 11) posY = drawFormattedString(true, 10, 30, COLOR_WHITE, "Processor: ARM11 (core %u)", dumpHeader->core); if(dumpHeader->processor == 11) posY = drawFormattedString(true, 10, 30, COLOR_WHITE, "Processor: ARM11 (core %u)", dumpHeader->core);
else posY = drawString(true, 10, 30, COLOR_WHITE, "Processor: ARM9"); else posY = drawString(true, 10, 30, COLOR_WHITE, "Processor: ARM9");
const char *faultStatusInfos = NULL;
if(dumpHeader->type >= 2)
{
u32 xfsr = dumpHeader->type == 2 ? regs[18] : regs[17];
xfsr &= 0xF;
for(u32 i = 0; i < 15; i++)
if(xfsr == faultStatusValues[i])
{
faultStatusInfos = faultStatusNames[i];
break;
}
}
if(dumpHeader->type == 2) if(dumpHeader->type == 2)
{ {
if((regs[16] & 0x20) == 0 && dumpHeader->codeDumpSize >= 4) if((regs[16] & 0x20) == 0 && dumpHeader->codeDumpSize >= 4)
@ -130,7 +117,17 @@ void detectAndProcessExceptionDumps(void)
else else
posY = drawFormattedString(true, 10, posY + SPACING_Y, COLOR_WHITE, "Exception type: %s", handledExceptionNames[dumpHeader->type]); posY = drawFormattedString(true, 10, posY + SPACING_Y, COLOR_WHITE, "Exception type: %s", handledExceptionNames[dumpHeader->type]);
if(faultStatusInfos != NULL) posY = drawFormattedString(true, 10, posY + SPACING_Y, COLOR_WHITE, "Fault status: %s", faultStatusInfos); if(dumpHeader->type >= 2)
{
u32 xfsr = (dumpHeader->type == 2 ? regs[18] : regs[17]) & 0xF;
for(u32 i = 0; i < 15; i++)
if(xfsr == faultStatusValues[i])
{
posY = drawFormattedString(true, 10, posY + SPACING_Y, COLOR_WHITE, "Fault status: %s", faultStatusNames[i]);
break;
}
}
if(dumpHeader->processor == 11 && dumpHeader->additionalDataSize != 0) if(dumpHeader->processor == 11 && dumpHeader->additionalDataSize != 0)
posY = drawFormattedString(true, 10, posY + SPACING_Y, COLOR_WHITE, posY = drawFormattedString(true, 10, posY + SPACING_Y, COLOR_WHITE,

View File

@ -177,7 +177,6 @@ void main(int argc, char **argv, u32 magicWord)
//If it's a MCU reboot, try to force boot options //If it's a MCU reboot, try to force boot options
if(CFG_BOOTENV && needConfig != CREATE_CONFIGURATION) if(CFG_BOOTENV && needConfig != CREATE_CONFIGURATION)
{ {
//Always force a SysNAND boot when quitting AGB_FIRM //Always force a SysNAND boot when quitting AGB_FIRM
if(CFG_BOOTENV == 7) if(CFG_BOOTENV == 7)
{ {