[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] gt64xxx: fix crash in gt64120_pci_mapping()
From: |
Avi Kivity |
Subject: |
[Qemu-devel] [PATCH] gt64xxx: fix crash in gt64120_pci_mapping() |
Date: |
Wed, 24 Aug 2011 22:09:41 +0300 |
The map/unmap code was assymetric - unmap used the local MemoryRegion while
map used isa_mmio_init(), which cannot handle dynamic mappings.
Fix by using isa_mmio_setup() and the local MemoryRegion.
Signed-off-by: Avi Kivity <address@hidden>
---
Untested.
hw/gt64xxx.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/hw/gt64xxx.c b/hw/gt64xxx.c
index 6af9782..1c34253 100644
--- a/hw/gt64xxx.c
+++ b/hw/gt64xxx.c
@@ -297,7 +297,11 @@ static void gt64120_pci_mapping(GT64120State *s)
s->PCI0IO_start = s->regs[GT_PCI0IOLD] << 21;
s->PCI0IO_length = ((s->regs[GT_PCI0IOHD] + 1) - (s->regs[GT_PCI0IOLD] &
0x7f)) << 21;
isa_mem_base = s->PCI0IO_start;
- isa_mmio_init(s->PCI0IO_start, s->PCI0IO_length);
+ if (s->PCI0IO_length) {
+ isa_mmio_setup(&s->PCI0IO_mem, s->PCI0IO_length);
+ memory_region_add_subregion(get_system_memory(), s->PCI0IO_start,
+ &s->PCI0IO_mem);
+ }
}
}
--
1.7.5.3
- [Qemu-devel] PPC* and Sparc32 crash, Blue Swirl, 2011/08/23
- Re: [Qemu-devel] PPC* and Sparc32 crash, Peter Maydell, 2011/08/23
- Re: [Qemu-devel] PPC* and Sparc32 crash, Edgar E. Iglesias, 2011/08/23
- Re: [Qemu-devel] PPC* and Sparc32 crash, Blue Swirl, 2011/08/24
- Re: [Qemu-devel] PPC* and Sparc32 crash, Edgar E. Iglesias, 2011/08/24
- Re: [Qemu-devel] PPC* and Sparc32 crash, Edgar E. Iglesias, 2011/08/24
- Re: [Qemu-devel] PPC* and Sparc32 crash, Edgar E. Iglesias, 2011/08/24
- [Qemu-devel] [PATCH] gt64xxx: fix crash in gt64120_pci_mapping(),
Avi Kivity <=
- Re: [Qemu-devel] [PATCH] gt64xxx: fix crash in gt64120_pci_mapping(), Edgar E. Iglesias, 2011/08/24
Re: [Qemu-devel] PPC* and Sparc32 crash, Blue Swirl, 2011/08/24
Re: [Qemu-devel] PPC* and Sparc32 crash, Avi Kivity, 2011/08/24
- Re: [Qemu-devel] PPC* and Sparc32 crash, Blue Swirl, 2011/08/24
- Re: [Qemu-devel] PPC* and Sparc32 crash, Avi Kivity, 2011/08/24
- [Qemu-devel] [PATCH] ppc_oldworld, ppc_newworld: fix escc BAR related crash, Avi Kivity, 2011/08/24
- Re: [Qemu-devel] PPC* and Sparc32 crash, Avi Kivity, 2011/08/24
- Re: [Qemu-devel] PPC* and Sparc32 crash, Blue Swirl, 2011/08/24
- Re: [Qemu-devel] PPC* and Sparc32 crash, Avi Kivity, 2011/08/24