Patchwork sun4u: don't set up isa_mem_base

login
register
mail settings
Submitter Blue Swirl
Date Sept. 17, 2011, 7:28 p.m.
Message ID <CAAu8pHtC+WrAq8AwweK98sfpbfD-W4kHJ6NtsOPDyqhUCLzMyQ@mail.gmail.com>
Download mbox | patch
Permalink /patch/115160/
State New
Headers show

Comments

Blue Swirl - Sept. 17, 2011, 7:28 p.m.
Since we use memory API in sun4u.c, after
71579cae30b53c910cd6c47ab4e683f647d36519, setting up isa_mem_base
puts vga.chain4 outside of the physical address space.

Fix by removing obsolete isa_mem_base set up.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
 hw/sun4u.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
Avi Kivity - Sept. 18, 2011, 11:30 a.m.
On 09/17/2011 10:28 PM, Blue Swirl wrote:
> Since we use memory API in sun4u.c, after
> 71579cae30b53c910cd6c47ab4e683f647d36519, setting up isa_mem_base
> puts vga.chain4 outside of the physical address space.
>
> Fix by removing obsolete isa_mem_base set up.
>
> Signed-off-by: Blue Swirl<blauwirbel@gmail.com>
> ---
>   hw/sun4u.c |    1 -
>   1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/hw/sun4u.c b/hw/sun4u.c
> index 32e6ab9..6afb0e7 100644
> --- a/hw/sun4u.c
> +++ b/hw/sun4u.c
> @@ -763,7 +763,6 @@ static void sun4uv_init(ram_addr_t RAM_size,
>       irq = qemu_allocate_irqs(cpu_set_irq, env, MAX_PILS);
>       pci_bus = pci_apb_init(APB_SPECIAL_BASE, APB_MEM_BASE, irq,&pci_bus2,
>                              &pci_bus3);
> -    isa_mem_base = APB_PCI_IO_BASE;
>       pci_vga_init(pci_bus);

Good catch, I wonder how many more such cases remain.

I guess we should prioritize their conversion.
Blue Swirl - Sept. 18, 2011, 12:09 p.m.
On Sun, Sep 18, 2011 at 11:30 AM, Avi Kivity <avi@redhat.com> wrote:
> On 09/17/2011 10:28 PM, Blue Swirl wrote:
>>
>> Since we use memory API in sun4u.c, after
>> 71579cae30b53c910cd6c47ab4e683f647d36519, setting up isa_mem_base
>> puts vga.chain4 outside of the physical address space.
>>
>> Fix by removing obsolete isa_mem_base set up.
>>
>> Signed-off-by: Blue Swirl<blauwirbel@gmail.com>
>> ---
>>  hw/sun4u.c |    1 -
>>  1 files changed, 0 insertions(+), 1 deletions(-)
>>
>> diff --git a/hw/sun4u.c b/hw/sun4u.c
>> index 32e6ab9..6afb0e7 100644
>> --- a/hw/sun4u.c
>> +++ b/hw/sun4u.c
>> @@ -763,7 +763,6 @@ static void sun4uv_init(ram_addr_t RAM_size,
>>      irq = qemu_allocate_irqs(cpu_set_irq, env, MAX_PILS);
>>      pci_bus = pci_apb_init(APB_SPECIAL_BASE, APB_MEM_BASE, irq,&pci_bus2,
>>                             &pci_bus3);
>> -    isa_mem_base = APB_PCI_IO_BASE;
>>      pci_vga_init(pci_bus);
>
> Good catch, I wonder how many more such cases remain.

Thanks, I applied the patch. The cases excluding VGA are:

./hw/bonito.c:    isa_mem_base = s->bonito_pciio_start;
./hw/ppc_newworld.c:    isa_mem_base = 0x80000000;
./hw/ppc_oldworld.c:    isa_mem_base = 0x80000000;
./hw/mips_r4k.c:    isa_mem_base = 0x10000000;
./hw/ppc_prep.c:    isa_mem_base = 0xc0000000;
./hw/gt64xxx.c:      isa_mem_base = s->PCI0IO_start;
./hw/gt64xxx.c:    isa_mem_base = 0x10000000;
./hw/mips_jazz.c:    isa_mem_base = 0x11000000;

> I guess we should prioritize their conversion.

I guess only ISA bus machines (gt64xxx.c and mips_jazz.c) need the
base until ISA has been converted to memory API.

Patch

diff --git a/hw/sun4u.c b/hw/sun4u.c
index 32e6ab9..6afb0e7 100644
--- a/hw/sun4u.c
+++ b/hw/sun4u.c
@@ -763,7 +763,6 @@  static void sun4uv_init(ram_addr_t RAM_size,
     irq = qemu_allocate_irqs(cpu_set_irq, env, MAX_PILS);
     pci_bus = pci_apb_init(APB_SPECIAL_BASE, APB_MEM_BASE, irq, &pci_bus2,
                            &pci_bus3);
-    isa_mem_base = APB_PCI_IO_BASE;
     pci_vga_init(pci_bus);

     // XXX Should be pci_bus3