qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] piix: fix 32bit pci hole


From: Laszlo Ersek
Subject: Re: [Qemu-devel] [PATCH v2] piix: fix 32bit pci hole
Date: Thu, 28 Nov 2013 17:03:39 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131118 Thunderbird/17.0.11

Mike,

On 11/27/13 12:57, Gerd Hoffmann wrote:
> Make the 32bit pci hole start at end of ram, so all possible address
> space is covered.  Of course the firmware can use less than that.
> Leaving space unused is no problem, mapping pci bars outside the
> hole causes problems though.
> 
> Signed-off-by: Gerd Hoffmann <address@hidden>
> ---
>  hw/pci-host/piix.c | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c
> index edc974e..8e41ac1 100644
> --- a/hw/pci-host/piix.c
> +++ b/hw/pci-host/piix.c
> @@ -345,15 +345,7 @@ PCIBus *i440fx_init(PCII440FXState **pi440fx_state,
>      f->ram_memory = ram_memory;
>  
>      i440fx = I440FX_PCI_HOST_BRIDGE(dev);
> -    /* Set PCI window size the way seabios has always done it. */
> -    /* Power of 2 so bios can cover it with a single MTRR */
> -    if (ram_size <= 0x80000000) {
> -        i440fx->pci_info.w32.begin = 0x80000000;
> -    } else if (ram_size <= 0xc0000000) {
> -        i440fx->pci_info.w32.begin = 0xc0000000;
> -    } else {
> -        i440fx->pci_info.w32.begin = 0xe0000000;
> -    }
> +    i440fx->pci_info.w32.begin = pci_hole_start;
>  
>      memory_region_init_alias(&f->pci_hole, OBJECT(d), "pci-hole", 
> f->pci_address_space,
>                               pci_hole_start, pci_hole_size);
> 

please pick this up for 1.7.1.

1.7.0 has been released without this patch, also without etc/pci-info,
but with etc/acpi/tables.

For OVMF to work with "etc/acpi/tables" correctly, with eg. a guest RAM
size of 2560MB, OVMF needs:
- either this patch in qemu, or
- etc/pci-info (which won't come back), or
- a hack in OVMF that mimicks the same 0x80000000/0xc0000000/0xe0000000
  logic (which I won't add).

Thanks
Laszlo



reply via email to

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