xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Keir Fraser <keir.xen@gmail.com>
To: Julian Pidancet <julian.pidancet@gmail.com>
Cc: seabios@seabios.org, xen-devel@lists.xensource.com,
	ian.campbell@citrix.com
Subject: Re: [Xen-devel] Re: [PATCH] SeaBIOS/Xen: Compute the low RAM memory size in the BDA according to the e820
Date: Mon, 14 Nov 2011 20:16:31 +0000	[thread overview]
Message-ID: <CAE7279F.24D77%keir.xen@gmail.com> (raw)
In-Reply-To: <CAKZ=5EUxqFjFqbMbkLOxMppTfFHxWgw=6bEagF1BCUO4WQx6Aw@mail.gmail.com>

On 14/11/2011 19:25, "Julian Pidancet" <julian.pidancet@gmail.com> wrote:

> On Mon, Nov 14, 2011 at 1:23 PM, Keir Fraser <keir@xen.org> wrote:
>> On 14/11/2011 08:53, "Keir Fraser" <keir.xen@gmail.com> wrote:
>> 
>>> On 14/11/2011 03:36, "Kevin O'Connor" <kevin@koconnor.net> 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 ?

Done. Xen-unstable:24143

 Thanks,
 Keir

      reply	other threads:[~2011-11-14 20:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-14  1:50 [PATCH] SeaBIOS/Xen: Compute the low RAM memory size in the BDA according to the e820 Julian Pidancet
2011-11-14  1:11 ` Kevin O'Connor
2011-11-14  2:03   ` Julian Pidancet
2011-11-14  2:09     ` Kevin O'Connor
2011-11-14  2:48       ` Julian Pidancet
2011-11-14  3:36         ` Kevin O'Connor
2011-11-14  7:37           ` Rudolf Marek
2011-11-14  8:53           ` Keir Fraser
2011-11-14 13:23             ` Keir Fraser
2011-11-14 13:27               ` Julian Pidancet
2011-11-14 13:43               ` Kevin O'Connor
2011-11-14 19:25               ` [Xen-devel] " Julian Pidancet
2011-11-14 20:16                 ` Keir Fraser [this message]

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=CAE7279F.24D77%keir.xen@gmail.com \
    --to=keir.xen@gmail.com \
    --cc=ian.campbell@citrix.com \
    --cc=julian.pidancet@gmail.com \
    --cc=seabios@seabios.org \
    --cc=xen-devel@lists.xensource.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).