This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Find cause of prefetch error

Hi,

i implemented a kind o standard prefetch handler as follows:

 

#pragma INTERRUPT (prefetchAbortHandler, PABT)

void prefetchAbortHandler (void)

{

InstructionFaultAddress=_coreGetInstructionFaultAddress_();

dataFault=_coreGetDataFault_();

dataFaultAddress=_coreGetDataFaultAddress_();

dataAuxFault=_coreGetAuxiliaryInstructionFault_();

_coreClearDataFault_();

asm(" B #-8");

}

 

My question: i set the pc to 0xffffffff which returns a "dataFaultAddress" of 0xffffffff - as expected. So "coreGetInstructionFaultAddress" return the address which - in the end - caused the prefetch abort.

That´s of limited help though. I need to know, when this happened. Is there anything to return the last pc value _before_ it becam invalid? I can´t trace as the pcb doesn´t support the BGA package...

 

best regards

Dominik

 

  • Dominik,

    This behavior is defined by the ARM CPU. You can look up more information at the ARM webstie (arm.com).

    The CPU attempts to save the instruction of the aborted instruction in the LR before switching to abort mode. (Obviously, the address is useful when the abort is precise and not necessarily useful when the abort is imprecise.)

    The CPU uses a "base restored Data Abort Model" -- which means that it does not over-write the CPU registers with the aborted data. 

    Best regards,

    Forum Support

  • Thanks for your immediate reply! I digged into it.... and it looks in my case no useful information is logged.... sad.