All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerhard Wiesinger <lists@wiesinger.com>
To: Kevin O'Connor <kevin@koconnor.net>
Cc: seabios@seabios.org, qemu-devel@nongnu.org, Roy Tam <roytam@gmail.com>
Subject: Re: [SeaBIOS] [Qemu-devel] QEMU regression problems
Date: Mon, 19 Apr 2010 08:19:55 +0200	[thread overview]
Message-ID: <4BCBF60B.50809@wiesinger.com> (raw)
In-Reply-To: <20100414011646.GA28219@morn.localdomain>


[-- Attachment #1.1: Type: text/plain, Size: 4016 bytes --]

Kevin O'Connor wrote:
> On Tue, Apr 13, 2010 at 02:26:10PM +0800, Roy Tam wrote:
>   
>> 2010/4/12 Gerhard Wiesinger <lists@wiesinger.com>:
>>     
>>> 3.) There is also a problem with the reported base memory under QEMM386
>>> (HIMEM.SYS and EMM386.EXE is correct here). It is 646kB instead of 640kB.
>>> Therefore base memory test fails. I guess that reporting memory CMOS
>>> tables/interrupt functions are not implemented correctly.
>>>       
>> - The Base Memory > 640K error seems to be SeaBIOS related. QEMU Bochs
>> BIOS(tested with both -old-bios hack in 0.12 series and old 0.11.1)
>> will just freeze after QEMU counted RAM.(Tested with ScriptPC and
>> Bochs).
>>     
>
> The SeaBIOS log would really help.  This can be done by adding:
>
> -chardev stdio,id=seabios -device isa-debugcon,iobase=0x402,chardev=seabios
>
> to the qemu command line.
>
> The memory can be obtained in several places (int 12, int 1588, int
> 15e801, int 15e820, and mem 40:13).  All look fine to me from looking
> at the code.

OK, I made some research on the topic. Problem is that QEMM pushes the 
Extended BIOS data area to High RAM on some machines (QEMU, P733). 
Therefore 640k low memory is available and checkit reports 640kB + 
6kB=646kB EBIOS DATA AREA. Whats strange that on a physical Pentium 733 
machine this works correctly (details see below and attached files), 
maybe someone can try to find the problem with QEMM+Checkit 3.0 (maybe 
there is still some other BIOS function incorrectly implemented). QEMM 
parameter NOXBDA avoids moving the XBDA up to HI RAM and therefore 
checkit reports 640kB well.

SeaBIOS seems to be correct (see below and attached patch files and 
description below).
Total Memory: 256MB (262144kB), Base RAM: 637kB
Extended BIOS Data Area size: 3 kB, segment=9f40

SCSI option ROM:
After option ROMS, Total Memory: 256MB (262144kB), Base RAM: 634kB
Extended BIOS Data Area size: 6 kB, segment=9e80

*MS-DOS 6.22, QEMM 8.03*

*QEMU*

*Testcase*

	

*BDA*

*40h:13h*

	

*INT*

*12h*

	

*INT 15h,*

*AX=E820h*

	

*EBIOS*

*DATAAREA*

	

*Checkit*

*3.0*

Plain DOS, after Boot

	

634kB

	

634kB

	

634kB

	

9E80h-A000h (6k)

	

640kB

HIMEM.SYS+EMM386.EXE

	

634kB

	

634kB

	

634kB

	

9E80h-A000h (6k)

	

640kB

QEMM

	

640kB

	

640kB

	

634kB

	

CEB5h-D035h (6k)

	

646kB

QEMURAMD + QEMM

	

628kB

	

628kB

	

634kB

	

9E80h-A000h (6k)

	

634k

*VMWare*

*Testcase*

	

*BDA*

*40h:13h*

	

*INT*

*12h*

	

*INT 15h,*

*AX=E820h*

	

*EBIOS*

*DATAAREA*

	

*Checkit 3.0*

Plain DOS, after Boot

	

638kB

	

638kB

	

638kB

	

9F80h-A000h (2k)

	

640kB

HIMEM.SYS+EMM386.EXE

	

638kB

	

638kB

	

638kB

	

9F80h-A000h (2k)

	

640kB

QEMM

	

638kB

	

638kB

	

638kB

	

9F80h-A000h (2k)

	

640kB

QEMURAMD + QEMM

	

632kB

	

632kB

	

632kB

	

9F80h-A000h (2k)

	

634kB

*Pentium 733*

*Testcase*

	

*BDA*

*40h:13h*

	

*INT*

*12h*

	

*INT 15h,*

*AX=E820h*

	

*EBIOS*

*DATAAREA*

	

*Checkit 3.0*

Plain DOS, after Boot

	

639kB

	

639kB

	

639kB

	

9FC0h-A000h (1k)

	

640kB

QEMM

	

640B

	

640kB

	

639kB

	

D1B5h- (1k)

	

640kB

Attached documents:
MEQEMU.TXT QEMU, no CONFIG.SYS/AUTOEXEC.BAT
MEQEMUH.TXT QEMU, HIMEM.SYS, EMM386.EXE
MEQEMUQ1.TXT QEMU, QEMM386.EXE, NOXBDA parameter
MEQEMUQ2.TXT QEMU, QEMM386.EXE
MEVMW.TXT VMWare, no CONFIG.SYS/AUTOEXEC.BAT
MEVMWH.TXT VMWare, HIMEM.SYS, EMM386.EXE
MEVMWQ.TXT QEMU, QEMM386.EXE (XBDA not moved to HMA!?!)
P733.TXT, Pentium 733, no CONFIG.SYS/AUTOEXEC.BAT
P733Q.TXT Pentium 733, QEMM386.EXE

Code and Patches can be found at (released under GPL V2):
http://www.wiesinger.com/opensource/seabios/meminfoa.asm
http://www.wiesinger.com/opensource/seabios/meminfo.c
http://www.wiesinger.com/opensource/seabios/meminfo.exe
http://www.wiesinger.com/opensource/seabios/seabios-0.6.0-gw-V01.patch
QEMURAMD: DOS Device driver, which modifies BDA reported memory by -6kB, 
released later.

Build script will be released under my DOS-Tools soon (some cleanup 
necessary).

Ciao,
Gerhard



[-- Attachment #1.2: Type: text/html, Size: 28935 bytes --]

[-- Attachment #2: MEQEMUQ2.TXT --]
[-- Type: text/plain, Size: 802 bytes --]

Memory Information V1.0, (c) 2009-2010 by Gerhard Wiesinger

BIOS area 40h:13h=640, 640kB
INT 12h: AX=640, 640kB

INT 15h, AH=88h
AX=0, number of continuous kB starting at absolute address 100000h: 0kB

INT 15h, AX=E801h
AX=15360, extended memory between 1M and 16M: 15360kB
BX=3840, extended memory above 16M, in 64K blocks: 245760kB
CX=15360, configured memory between 1M and 16M: 15360kB
DX=3840, configured memory above 16M, in 64K blocks: 245760kB

INT 15h, AX=E820h
structure len=20
base address 0h (0)
length in bytes 9E800h (649216), 634kB
type of address range: memory type=1
type of address range: memory type=memory, available to OS

EBDA - Extended BIOS Data Area information, found, segment=B0B5h, memory=6kB
Device driver entry point=D1EEh:023Ch, Device flag 1st byte=00h, 2nd byte=83h



[-- Attachment #3: MEVMW.TXT --]
[-- Type: text/plain, Size: 810 bytes --]

Memory Information V1.0, (c) 2009-2010 by Gerhard Wiesinger

BIOS area 40h:13h=638, 638kB
INT 12h: AX=638, 638kB

INT 15h, AH=88h
AX=64512, number of continuous kB starting at absolute address 100000h: 64512kB

INT 15h, AX=E801h
AX=15360, extended memory between 1M and 16M: 15360kB
BX=3823, extended memory above 16M, in 64K blocks: 244672kB
CX=15360, configured memory between 1M and 16M: 15360kB
DX=3823, configured memory above 16M, in 64K blocks: 244672kB

INT 15h, AX=E820h
structure len=20
base address 0h (0)
length in bytes 9F800h (653312), 638kB
type of address range: memory type=1
type of address range: memory type=memory, available to OS

EBDA - Extended BIOS Data Area information, found, segment=9F80h, memory=2kB
Device driver entry point=0000h:0000h, Device flag 1st byte=00h, 2nd byte=02h



[-- Attachment #4: MEVMWH.TXT --]
[-- Type: text/plain, Size: 802 bytes --]

Memory Information V1.0, (c) 2009-2010 by Gerhard Wiesinger

BIOS area 40h:13h=638, 638kB
INT 12h: AX=638, 638kB

INT 15h, AH=88h
AX=0, number of continuous kB starting at absolute address 100000h: 0kB

INT 15h, AX=E801h
AX=15360, extended memory between 1M and 16M: 15360kB
BX=3823, extended memory above 16M, in 64K blocks: 244672kB
CX=15360, configured memory between 1M and 16M: 15360kB
DX=3823, configured memory above 16M, in 64K blocks: 244672kB

INT 15h, AX=E820h
structure len=20
base address 0h (0)
length in bytes 9F800h (653312), 638kB
type of address range: memory type=1
type of address range: memory type=memory, available to OS

EBDA - Extended BIOS Data Area information, found, segment=9F80h, memory=2kB
Device driver entry point=CB02h:023Ch, Device flag 1st byte=00h, 2nd byte=C2h



[-- Attachment #5: MEVMWQ.TXT --]
[-- Type: text/plain, Size: 802 bytes --]

Memory Information V1.0, (c) 2009-2010 by Gerhard Wiesinger

BIOS area 40h:13h=638, 638kB
INT 12h: AX=638, 638kB

INT 15h, AH=88h
AX=0, number of continuous kB starting at absolute address 100000h: 0kB

INT 15h, AX=E801h
AX=15360, extended memory between 1M and 16M: 15360kB
BX=3823, extended memory above 16M, in 64K blocks: 244672kB
CX=15360, configured memory between 1M and 16M: 15360kB
DX=3823, configured memory above 16M, in 64K blocks: 244672kB

INT 15h, AX=E820h
structure len=20
base address 0h (0)
length in bytes 9F800h (653312), 638kB
type of address range: memory type=1
type of address range: memory type=memory, available to OS

EBDA - Extended BIOS Data Area information, found, segment=9F80h, memory=2kB
Device driver entry point=02FFh:023Ch, Device flag 1st byte=00h, 2nd byte=C2h



[-- Attachment #6: P733.TXT --]
[-- Type: text/plain, Size: 593 bytes --]

Memory Information V1.0, (c) 2009-2010 by Gerhard Wiesinger

BIOS area 40h:13h=639, 639kB
INT 12h: AX=639, 639kB

INT 15h, AH=88h
AX=65472, number of continuous kB starting at absolute address 100000h: 65472kB

INT 15h, AX=E801h
Not successful

INT 15h, AX=E820h
structure len=20
base address 0h (0)
length in bytes 9FC00h (654336), 639kB
type of address range: memory type=1
type of address range: memory type=memory, available to OS

EBDA - Extended BIOS Data Area information, found, segment=9FC0h, memory=1kB
Device driver entry point=0000h:0000h, Device flag 1st byte=00h, 2nd byte=00h



[-- Attachment #7: P733Q.TXT --]
[-- Type: text/plain, Size: 585 bytes --]

Memory Information V1.0, (c) 2009-2010 by Gerhard Wiesinger

BIOS area 40h:13h=640, 640kB
INT 12h: AX=640, 640kB

INT 15h, AH=88h
AX=0, number of continuous kB starting at absolute address 100000h: 0kB

INT 15h, AX=E801h
Not successful

INT 15h, AX=E820h
structure len=20
base address 0h (0)
length in bytes 9FC00h (654336), 639kB
type of address range: memory type=1
type of address range: memory type=memory, available to OS

EBDA - Extended BIOS Data Area information, found, segment=D1B5h, memory=1kB
Device driver entry point=B11Bh:023Ch, Device flag 1st byte=00h, 2nd byte=82h



[-- Attachment #8: MEQEMU.TXT --]
[-- Type: text/plain, Size: 810 bytes --]

Memory Information V1.0, (c) 2009-2010 by Gerhard Wiesinger

BIOS area 40h:13h=634, 634kB
INT 12h: AX=634, 634kB

INT 15h, AH=88h
AX=64512, number of continuous kB starting at absolute address 100000h: 64512kB

INT 15h, AX=E801h
AX=15360, extended memory between 1M and 16M: 15360kB
BX=3840, extended memory above 16M, in 64K blocks: 245760kB
CX=15360, configured memory between 1M and 16M: 15360kB
DX=3840, configured memory above 16M, in 64K blocks: 245760kB

INT 15h, AX=E820h
structure len=20
base address 0h (0)
length in bytes 9E800h (649216), 634kB
type of address range: memory type=1
type of address range: memory type=memory, available to OS

EBDA - Extended BIOS Data Area information, found, segment=9E80h, memory=6kB
Device driver entry point=0000h:0000h, Device flag 1st byte=00h, 2nd byte=00h



[-- Attachment #9: MEQEMUH.TXT --]
[-- Type: text/plain, Size: 802 bytes --]

Memory Information V1.0, (c) 2009-2010 by Gerhard Wiesinger

BIOS area 40h:13h=634, 634kB
INT 12h: AX=634, 634kB

INT 15h, AH=88h
AX=0, number of continuous kB starting at absolute address 100000h: 0kB

INT 15h, AX=E801h
AX=15360, extended memory between 1M and 16M: 15360kB
BX=3840, extended memory above 16M, in 64K blocks: 245760kB
CX=15360, configured memory between 1M and 16M: 15360kB
DX=3840, configured memory above 16M, in 64K blocks: 245760kB

INT 15h, AX=E820h
structure len=20
base address 0h (0)
length in bytes 9E800h (649216), 634kB
type of address range: memory type=1
type of address range: memory type=memory, available to OS

EBDA - Extended BIOS Data Area information, found, segment=9E80h, memory=6kB
Device driver entry point=08A9h:023Ch, Device flag 1st byte=00h, 2nd byte=83h



[-- Attachment #10: MEQEMUQ1.TXT --]
[-- Type: text/plain, Size: 802 bytes --]

Memory Information V1.0, (c) 2009-2010 by Gerhard Wiesinger

BIOS area 40h:13h=634, 634kB
INT 12h: AX=634, 634kB

INT 15h, AH=88h
AX=0, number of continuous kB starting at absolute address 100000h: 0kB

INT 15h, AX=E801h
AX=15360, extended memory between 1M and 16M: 15360kB
BX=3840, extended memory above 16M, in 64K blocks: 245760kB
CX=15360, configured memory between 1M and 16M: 15360kB
DX=3840, configured memory above 16M, in 64K blocks: 245760kB

INT 15h, AX=E820h
structure len=20
base address 0h (0)
length in bytes 9E800h (649216), 634kB
type of address range: memory type=1
type of address range: memory type=memory, available to OS

EBDA - Extended BIOS Data Area information, found, segment=9E80h, memory=6kB
Device driver entry point=D1EEh:023Ch, Device flag 1st byte=00h, 2nd byte=83h



  reply	other threads:[~2010-04-19  6:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-12  5:31 [Qemu-devel] QEMU regression problems Gerhard Wiesinger
2010-04-13  6:26 ` Roy Tam
2010-04-14  1:16   ` [SeaBIOS] " Kevin O'Connor
2010-04-19  6:19     ` Gerhard Wiesinger [this message]
2010-04-20  1:26       ` Kevin O'Connor
2010-04-21 19:16         ` Gerhard Wiesinger
2010-04-21 23:02           ` Kevin O'Connor
2010-04-22  6:16             ` Gerhard Wiesinger
2011-02-18  7:12 ` [Qemu-devel] Re: QEMU regression problems - Update FPU Gerhard Wiesinger
2011-02-23  7:09   ` Gerhard Wiesinger
2011-02-23  8:16   ` Peter Maydell
2011-02-23  9:45     ` Laurent Desnogues
2011-02-23 19:04       ` Aurelien Jarno
2011-02-24 11:10         ` Paolo Bonzini
2011-02-24 11:21           ` Laurent Desnogues
2011-02-24  7:03     ` Gerhard Wiesinger
2011-02-24  7:31       ` Aurelien Jarno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BCBF60B.50809@wiesinger.com \
    --to=lists@wiesinger.com \
    --cc=kevin@koconnor.net \
    --cc=qemu-devel@nongnu.org \
    --cc=roytam@gmail.com \
    --cc=seabios@seabios.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.