Move ARM disassembler into a library and out of the exception handler. Add a hook to call the lib from a platform specific EBL command on BeagleBoard.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9903 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -154,13 +154,15 @@ RotateRight (
|
||||
@param OpCodePtr Pointer to pointer of ARM instruction to disassemble.
|
||||
@param Buf Buffer to sprintf disassembly into.
|
||||
@param Size Size of Buf in bytes.
|
||||
@param Extended TRUE dump hex for instruction too.
|
||||
|
||||
**/
|
||||
VOID
|
||||
DisassembleArmInstruction (
|
||||
IN UINT32 **OpCodePtr,
|
||||
OUT CHAR8 *Buf,
|
||||
OUT UINTN Size
|
||||
OUT UINTN Size,
|
||||
IN BOOLEAN Extended
|
||||
)
|
||||
{
|
||||
UINT32 OpCode = **OpCodePtr;
|
||||
@ -183,6 +185,13 @@ DisassembleArmInstruction (
|
||||
Rd = (OpCode >> 12) & 0xf;
|
||||
Rm = (OpCode & 0xf);
|
||||
|
||||
|
||||
if (Extended) {
|
||||
Index = AsciiSPrint (Buf, Size, "0x%08x ", OpCode);
|
||||
Buf += Index;
|
||||
Size -= Index;
|
||||
}
|
||||
|
||||
// LDREX, STREX
|
||||
if ((OpCode & 0x0fe000f0) == 0x01800090) {
|
||||
if (L) {
|
||||
|
Reference in New Issue
Block a user