[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] hw/mips/jazz: Use generic I/O bus via get_system_io()
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 1/2] hw/mips/jazz: Use generic I/O bus via get_system_io() |
Date: |
Wed, 10 Mar 2021 21:11:40 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 |
On 3/10/21 8:49 PM, Peter Xu wrote:
> On Wed, Mar 10, 2021 at 08:12:54PM +0100, Philippe Mathieu-Daudé wrote:
>> No need to create a local ISA I/O MemoryRegion, use get_system_io().
>>
>> This partly reverts commit 5c63bcf7501527b844f61624957bdba254d75bfc.
>
> I think it's not a clean revert of that, see below.
>
>>
>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> ---
>> hw/mips/jazz.c | 6 ++----
>> 1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c
>> index 1a0888a0fd5..9ac9361b7eb 100644
>> --- a/hw/mips/jazz.c
>> +++ b/hw/mips/jazz.c
>> @@ -158,7 +158,6 @@ static void mips_jazz_init(MachineState *machine,
>> rc4030_dma *dmas;
>> IOMMUMemoryRegion *rc4030_dma_mr;
>> MemoryRegion *isa_mem = g_new(MemoryRegion, 1);
>> - MemoryRegion *isa_io = g_new(MemoryRegion, 1);
>> MemoryRegion *rtc = g_new(MemoryRegion, 1);
>> MemoryRegion *i8042 = g_new(MemoryRegion, 1);
>> MemoryRegion *dma_dummy = g_new(MemoryRegion, 1);
>> @@ -259,11 +258,10 @@ static void mips_jazz_init(MachineState *machine,
>> memory_region_add_subregion(address_space, 0x8000d000, dma_dummy);
>>
>> /* ISA bus: IO space at 0x90000000, mem space at 0x91000000 */
>> - memory_region_init(isa_io, NULL, "isa-io", 0x00010000);
>> memory_region_init(isa_mem, NULL, "isa-mem", 0x01000000);
>> - memory_region_add_subregion(address_space, 0x90000000, isa_io);
>> + memory_region_add_subregion(address_space, 0x90000000, get_system_io());
>
> The old code has an alias created just for adding subregion into
> address_space:
>
> - /* ISA IO space at 0x90000000 */
> - memory_region_init_alias(isa, NULL, "isa_mmio",
> - get_system_io(), 0, 0x01000000);
> - memory_region_add_subregion(address_space, 0x90000000, isa);
> - isa_mem_base = 0x11000000;
>
> While you didn't revert that part. Maybe that's the issue?
Hmm I'll have a look. This is not the series I'm working on, which
is much bigger and not ready for posting yet. I simply looked for
something similar (a bus mapped into sysbus) and remembered the
ISA bus from Jazz machines. I'll see if I can find a better PoC.
Thanks for having a look at this patch,
Phil.
- [PATCH 1/3] memory: Better name 'offset' argument in mtree_print_mr(), (continued)
- [PATCH 1/3] memory: Better name 'offset' argument in mtree_print_mr(), Philippe Mathieu-Daudé, 2021/03/05
- [PATCH 2/3] memory: Provide 'base address' argument to mtree_print_mr(), Philippe Mathieu-Daudé, 2021/03/05
- Re: [PATCH 2/3] memory: Provide 'base address' argument to mtree_print_mr(), Peter Xu, 2021/03/08
- Re: [PATCH 2/3] memory: Provide 'base address' argument to mtree_print_mr(), Philippe Mathieu-Daudé, 2021/03/09
- Re: [PATCH 2/3] memory: Provide 'base address' argument to mtree_print_mr(), Philippe Mathieu-Daudé, 2021/03/09
- Re: [PATCH 2/3] memory: Provide 'base address' argument to mtree_print_mr(), Peter Xu, 2021/03/10
- Re: [PATCH 2/3] memory: Provide 'base address' argument to mtree_print_mr(), Philippe Mathieu-Daudé, 2021/03/10
- [PATCH 1/2] hw/mips/jazz: Use generic I/O bus via get_system_io(), Philippe Mathieu-Daudé, 2021/03/10
- [PATCH 2/2] NOTFORMERGE memory: Ensure AddressSpace physical base address is zero, Philippe Mathieu-Daudé, 2021/03/10
- Re: [PATCH 1/2] hw/mips/jazz: Use generic I/O bus via get_system_io(), Peter Xu, 2021/03/10
- Re: [PATCH 1/2] hw/mips/jazz: Use generic I/O bus via get_system_io(),
Philippe Mathieu-Daudé <=
- Re: [PATCH 1/2] hw/mips/jazz: Use generic I/O bus via get_system_io(), Peter Xu, 2021/03/10
- Re: [PATCH 1/2] hw/mips/jazz: Use generic I/O bus via get_system_io(), Philippe Mathieu-Daudé, 2021/03/11
- Re: [PATCH 1/2] hw/mips/jazz: Use generic I/O bus via get_system_io(), Philippe Mathieu-Daudé, 2021/03/11
- Re: [PATCH 1/2] hw/mips/jazz: Use generic I/O bus via get_system_io(), Peter Xu, 2021/03/11
- Re: [PATCH 1/2] hw/mips/jazz: Use generic I/O bus via get_system_io(), Philippe Mathieu-Daudé, 2021/03/11
- Re: [PATCH 1/2] hw/mips/jazz: Use generic I/O bus via get_system_io(), Cédric Le Goater, 2021/03/12
- Re: [PATCH 1/2] hw/mips/jazz: Use generic I/O bus via get_system_io(), Peter Xu, 2021/03/11
- Re: [PATCH 1/2] hw/mips/jazz: Use generic I/O bus via get_system_io(), Philippe Mathieu-Daudé, 2021/03/11
- Re: [PATCH 1/2] hw/mips/jazz: Use generic I/O bus via get_system_io(), Jiaxun Yang, 2021/03/10
- Re: [PATCH 2/3] memory: Provide 'base address' argument to mtree_print_mr(), Peter Xu, 2021/03/10