| 604 | } |
| 605 | |
| 606 | VOID |
| 607 | DumpExceptionDataVgaOut ( |
| 608 | IN EFI_EXCEPTION_TYPE InterruptType, |
| 609 | IN EFI_SYSTEM_CONTEXT SystemContext |
| 610 | ) |
| 611 | { |
| 612 | UINTN COLUMN_MAX; |
| 613 | UINTN ROW_MAX; |
| 614 | UINT32 ErrorCodeFlag; |
| 615 | CHAR16 *VideoBufferBase; |
| 616 | CHAR16 *VideoBuffer; |
| 617 | UINTN Index; |
| 618 | |
| 619 | COLUMN_MAX = 80; |
| 620 | ROW_MAX = 25; |
| 621 | ErrorCodeFlag = 0x00027d00; |
| 622 | VideoBufferBase = (CHAR16 *) (UINTN) 0xb8000; |
| 623 | VideoBuffer = (CHAR16 *) (UINTN) 0xb8000; |
| 624 | |
| 625 | #ifdef MDE_CPU_IA32 |
| 626 | UnicodeSPrintAsciiFormat ( |
| 627 | VideoBuffer, |
| 628 | COLUMN_MAX * sizeof (CHAR16), |
| 629 | "!!!! IA32 Exception Type - %08x !!!!", |
| 630 | InterruptType |
| 631 | ); |
| 632 | VideoBuffer += COLUMN_MAX; |
| 633 | UnicodeSPrintAsciiFormat ( |
| 634 | VideoBuffer, |
| 635 | COLUMN_MAX * sizeof (CHAR16), |
| 636 | "EIP - %08x, CS - %08x, EFLAGS - %08x", |
| 637 | SystemContext.SystemContextIa32->Eip, |
| 638 | SystemContext.SystemContextIa32->Cs, |
| 639 | SystemContext.SystemContextIa32->Eflags |
| 640 | ); |
| 641 | VideoBuffer += COLUMN_MAX; |
| 642 | if (ErrorCodeFlag & (1 << InterruptType)) { |
| 643 | UnicodeSPrintAsciiFormat ( |
| 644 | VideoBuffer, |
| 645 | COLUMN_MAX * sizeof (CHAR16), |
| 646 | "ExceptionData - %08x", |
| 647 | SystemContext.SystemContextIa32->ExceptionData |
| 648 | ); |
| 649 | VideoBuffer += COLUMN_MAX; |
| 650 | } |
| 651 | UnicodeSPrintAsciiFormat ( |
| 652 | VideoBuffer, |
| 653 | COLUMN_MAX * sizeof (CHAR16), |
| 654 | "EAX - %08x, ECX - %08x, EDX - %08x, EBX - %08x", |
| 655 | SystemContext.SystemContextIa32->Eax, |
| 656 | SystemContext.SystemContextIa32->Ecx, |
| 657 | SystemContext.SystemContextIa32->Edx, |
| 658 | SystemContext.SystemContextIa32->Ebx |
| 659 | ); |
| 660 | VideoBuffer += COLUMN_MAX; |
| 661 | |
| 662 | UnicodeSPrintAsciiFormat ( |
| 663 | VideoBuffer, |
no test coverage detected