WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: [PATCH] SeaBIOS/Xen: Compute the low RAM memory size

To: Keir Fraser <keir@xxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH] SeaBIOS/Xen: Compute the low RAM memory size in the BDA according to the e820
From: Julian Pidancet <julian.pidancet@xxxxxxxxx>
Date: Mon, 14 Nov 2011 19:25:54 +0000
Cc: Kevin O'Connor <kevin@xxxxxxxxxxxx>, seabios@xxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, ian.campbell@xxxxxxxxxx
Delivery-date: Mon, 14 Nov 2011 12:35:57 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=7oIsLcHGihT99/pLZ/Q2tDZSQjqdH+b+jz4OfzlbPtc=; b=HyeCNNWBxVZahcfLsLHGyfsEW6RQo6WtDtwDBjRt7w8FnAX0hLB9tLA55PCH7SRBXi oE33H6LmIF2RtiY1AbD0qfcht2zGEnVpgypLJIPLOhTpRxhP3mTytQLmGAu0nIpd0LIM Z0fSBBYwUFfyQvvM99JZ15wGi93CO4E+IiLtE=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <CAE6C6DF.34049%keir@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <CAE687A1.24CDF%keir.xen@xxxxxxxxx> <CAE6C6DF.34049%keir@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Mon, Nov 14, 2011 at 1:23 PM, Keir Fraser <keir@xxxxxxx> wrote:
> On 14/11/2011 08:53, "Keir Fraser" <keir.xen@xxxxxxxxx> wrote:
>
>> On 14/11/2011 03:36, "Kevin O'Connor" <kevin@xxxxxxxxxxxx> wrote:
>>
>>> On Xen, the PCI init code isn't used, so assuming this struct doesn't
>>> need to live in real "ram", I think it could live just about anywhere
>>> past the end of ram.  Even with pciinit.c, addresses over 0xfc00000
>>> (with the exception of a few bytes for hpet, apic, ioapic, and bios
>>> image) could be used.
>>
>> I suggest we stick it at FC000000, and shift hvmloader's mem_alloc()
>> starting address up by one page to FC001000. The acpi build code will have
>> to manually mem_hole_populate_ram() that one page before writing to it. This
>> can then be documented in hvmloader/config.h which contains a description
>> of, and defines for, the system memory map. This is by far the easiest
>> solution to this problem; manually crafting an SSDT is a right pain in the
>> arse, whereas this is maybe a 5-line patch.
>
> Like the attached patch (untested), which is a bit larger than anticipated,
> but actually allows code to be net deleted. :-)
>

I just tested your patch with Windows 7 and Linux guest booted from iPXE.

Everything seems to work fine. SeaBIOS reports the following e820:

(XEN) HVM23: e820 map has 6 items:
(XEN) HVM23:   0: 0000000000000000 - 000000000009f400 = 1 RAM
(XEN) HVM23:   1: 000000000009f400 - 00000000000a0000 = 2 RESERVED
(XEN) HVM23:   2: 00000000000f0000 - 0000000000100000 = 2 RESERVED
(XEN) HVM23:   3: 0000000000100000 - 000000003f7ff000 = 1 RAM
(XEN) HVM23:   4: 000000003f7ff000 - 000000003f800000 = 2 RESERVED
(XEN) HVM23:   5: 00000000fc000000 - 0000000100000000 = 2 RESERVED

The ACPI code in Linux reports the right PCI memory window:

[    0.338966] PCI: Using host bridge windows from ACPI; if necessary,
use "pci=nocrs" and report a bug
[    0.340000] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[    0.341029] pci_root PNP0A03:00: host bridge window [io  0x0000-0x0cf7]
[    0.341965] pci_root PNP0A03:00: host bridge window [io  0x0d00-0xffff]
[    0.342965] pci_root PNP0A03:00: host bridge window [mem
0x000a0000-0x000bffff]
[    0.343965] pci_root PNP0A03:00: host bridge window [mem
0xf0000000-0xfbffffff]

Can you ship it ?

-- 
Julian

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>