qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [SeaBIOS] Commit 77af8a2b95b79699de650965d5228772743efe


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [SeaBIOS] Commit 77af8a2b95b79699de650965d5228772743efe84 breaks Windows 2000 support
Date: Wed, 26 Jul 2017 09:20:16 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 26/07/2017 00:01, Kevin O'Connor wrote:
> On Tue, Jul 25, 2017 at 07:10:21PM +0200, Paolo Bonzini wrote:
>> On 25/07/2017 18:23, Paolo Bonzini wrote:
>>> On 25/07/2017 18:14, Laszlo Ersek wrote:
>>>>   "No regressions became apparent in tests with a range of Windows
>>>>    (XP-10)"
>>>>
>>>> In theory, w2k falls within that range.
>>>
>>> Nope, Windows 2000 is like NT 5.0, XP is like NT 5.1. :(
>>>
>>> One possibility is to fix it in SeaBIOS instead: if you get a 2.0 FADT
>>> and an XSDT and no RSDT, it can build an RSDT and a 1.0 FADT itself,
>>> patching the RSDT to point to it.
>>>
>>> It's a hack, but it's the only place I see to make it "just work".  And
>>> it could be extended nicely in the future.
> 
> It's an impressive hack!
> 
>>>
>>> All QEMU would have to do is to provide an XSDT _instead_ of an RSDT.
> [...]
>> SeaBIOS:
>>
>> From 73b0facdb7349f5dbf24dc675647b68eeeec0ff4 Mon Sep 17 00:00:00 2001
>> From: Paolo Bonzini <address@hidden>
>> Date: Tue, 25 Jul 2017 18:50:19 +0200
>> Subject: [PATCH 1/2] seabios: build RSDT from XSDT
>>
>> Old operating systems would like to have a v1 FADT, but new
>> operating systems would like to have v3.
>>
>> Since old operating systems do not know about XSDTs, the
>> solution is to point the RSDT to a v1 FADT and the XSDT to a
>> v3 FADT.
>>
>> But, OVMF is not able to do that and barfs when it sees the
>> second FADT---plus really it's only BIOS operating systems
>> such as win2k that complain.  So instead: 1) make QEMU provide
>> an XSDT only; 2) build the RSDT and v1 FADT in SeaBIOS.
>>
>> This patch makes SeaBIOS build an RSDT out of an existing XSDT.
> 
> I'd really prefer not to have SeaBIOS go back to producing ACPI
> tables.

Me too, but this is different from SeaBIOS producing ACPI tables.
(Patched) QEMU produces entirely valid ACPI 2.0 tables, while SeaBIOS is
only producing compatibility glue for old OSes.  Compared to producing
ACPI tables, SeaBIOS needs no knowledge of the underlying hardware, only
of the limitations of those old OSes.  Responsibilities between QEMU and
SeaBIOS are nicely split.

> As an alternative, how about some other possible hacks:
> 
> 1 - ovmf filters out the extra tables that it barfs on.
> 
> 2 - change ovmf to read the fw_cfg linker script
>     'etc/table-loader-ovmf' instead of '/etc/table-loader' and change
>     qemu to generate two linker scripts - one for seabios and one for
>     ovmf.
> 
> 3 - same as 2, but change seabios to use 'etc/table-loader-seabios'
>     and leave ovmf unchanged.
> 
> 4 - change seabios to read both the linker script 'etc/table-loader'
>     _and_ some new linker script '/etc/table-loader-legacy'.  Have
>     qemu introduce the RSDT/FADTv1 in the "legacy" linker script.

(4) would be acceptable I guess.  However I think it's a bit worse
because fw-cfg files are a somewhat scarce resource.  The "legacy"
aspect is something that SeaBIOS is in the best position to address,
because it knows what OSes are running on it; QEMU instead only takes
care of describing the hardware.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]