On 01/15/14 14:06, Laszlo Ersek wrote:
> On 01/15/14 04:22, Ni, Ruiyu wrote:
>> Still no luck to reproduce it in OVMF.
> 
> I can't reproduce it either... I guess I'll try to instrument the code
> the next time it shows up. Thanks!

I've run into another assertion failure -- it is quite reproducible. The edk2 
version I use is r15250, building the OVMF platform.

(1) Boot the VM and enter the TUI.

(2) From the boot manager, boot the UEFI Interactive Shell v2.0.

(3) In the shell, issue the following command, and verify the output:

    Shell> mode
    Available modes for console output device.
      Col    80 Row    25  *
      Col   100 Row    31   

(4) Change to 100x31:

    Shell> mode 100 31

(5) generate a bunch of output -- for example, issue the following commands 
repeatedly, enough times so that the screen scrolls a bit:

    Shell> map

(6) Switch back to 80x25:

    Shell> mode 80 25

This will change the mode, and also clear the screen.

(7) Now repeat step (5), ie. generate enough output eg. with "map" to scroll 
the screen.

You should get a crash fairly quickly. If you don't, then goto (4), and 
continue from there. I never need to jump back to (4) more than once.

Results:

When the screen is scrolled at step (7), the following assert triggers:

ASSERT /.../ShellPkg/Application/Shell/ConsoleLogger.c(455): 
ConsoleInfo->HistoryMode.CursorRow == (INT32)((ConsoleInfo->RowsPerScreen * 
ConsoleInfo->ScreenCount)-1)

And the following register dump is written to the serial port:

!!!! X64 Exception Type - 0000000000000003     CPU Apic ID - 00000000 !!!!
RIP  - 000000003D67B47C, CS  - 0000000000000028, RFLAGS - 0000000000000202
RAX  - 000000003D67B477, RCX - 0000000000000402, RDX - 0000000000000402
RBX  - 000000003D67EC46, RSP - 000000003FF74200, RBP - 000000003FF74200
RSI  - 000000003D68280A, RDI - 0000000000000050
R8   - 0000000000000001, R9  - 0000000000000000, R10 - 00000000000003F8
R11  - 0000000000000040, R12 - 0000000000000000, R13 - 0000000000000000
R14  - 0000000000000000, R15 - 0000000000000000
DS   - 0000000000000008, ES  - 0000000000000008, FS  - 0000000000000008
GS   - 0000000000000008, SS  - 0000000000000008
CR0  - 0000000080000033, CR2 - 0000000000000000, CR3 - 000000003FF13000
CR4  - 0000000000000668, CR8 - 0000000000000000
DR0  - 0000000000000000, DR1 - 0000000000000000, DR2 - 0000000000000000
DR3  - 0000000000000000, DR6 - 00000000FFFF0FF0, DR7 - 0000000000000400
GDTR - 000000003FEFCD98 000000000000003F, LDTR - 0000000000000000
IDTR - 000000003FC20018 0000000000000FFF,   TR - 0000000000000000
FXSAVE_STATE - 000000003FF73E60
!!!! Find PE image 
/.../Build/OvmfX64/DEBUG_GCC48/X64/ShellPkg/Application/Shell/Shell/DEBUG/Shell.dll
 (ImageBase=000000003D5D6000, EntryPoint=000000003D5D6260) !!!!

The affected source code seems to be:

    case (CHAR_LINEFEED):
      if (ConsoleInfo->HistoryMode.CursorRow >= 
(INT32)((ConsoleInfo->RowsPerScreen * ConsoleInfo->ScreenCount)-1)) {
        //
        // Should never be bigger
        //
        ASSERT(ConsoleInfo->HistoryMode.CursorRow == 
(INT32)((ConsoleInfo->RowsPerScreen * ConsoleInfo->ScreenCount)-1));

Thanks
Laszlo


------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to