我对PowerPC体系结构很陌生,试图实现mce-inject命令(如x86),.The要求在运行PowerPC linux内核时注入机器检查(指令缓存奇偶校验错误)。
按照下面的链接,我可以看到如果设置了MSRME和L1CSR1ICPE,它将生成机器检查中断。
注/AN3532.pdf 3532.pdf
我想知道产生机器检查中断并调用机器检查处理程序(如果是PowerPC,我相信machine_check_e500mc就是处理程序)是否就足够了?
发布于 2015-03-16 17:44:27
我知道这个问题已经6周了,很可能你已经自己解决了。但是,由于该解决方案可能对其他人有用,而且对于e200内核,我不得不解决同样的问题,下面是我是如何做到的。
它不是e500核心,但e200应该足够近。
您将找到关于指令缓存这里的大部分细节。
以下是e200指令缓存的相关寄存器。
L1CSR1[ICECE] (e500: L1CSR1[ICEP])
L1CSR1[ICEA] (e500: -)
L1CSR1[ICEI] (e500: L1CSR1[ICPI])- Stop your system at a position where the IVOR registers and the cache have been initialized. In my case, this is the first instruction of a function prologue, se\_mflr r0.
- Set a breakpoint at the first instruction in machine\_check\_e500mc.
- Set L1CSR1[ICEI] := 1
- Step a few times. In my case, se\_stw r0,0x14(r1) is the first instruction with a parity error.
- Now you should have hit the breakpoint in machine\_check\_e500mc.
- MCSRR0 contains the address of the instruction that was executed when the machine check occurred.
- I had to set MSR[ME] := 0, otherwise my debugger refused to step any further.
- Now the first thing you do is to invalidate the cache line with the parity error, as they say in the application note.
https://stackoverflow.com/questions/28050301
复制相似问题