[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 01/10] prep: Fix offset of BIOS MemoryRegion
From: |
Andreas Färber |
Subject: |
[Qemu-ppc] [PATCH 01/10] prep: Fix offset of BIOS MemoryRegion |
Date: |
Fri, 20 Jan 2012 00:35:22 +0100 |
From: Andreas Färber <address@hidden>
Since 0c90c52fab5ea92d7f12b29bfe26a7cd75d9efcb (ppc_prep: convert to memory
API) OHW was "Trying to execute code outside RAM or ROM at 0xfff00700".
The BIOS MemoryRegion is created with a fixed size of 1 MiB.
Ensure that the full size can be accessed since the exception
vectors are located at 0xfff00000 and the BIOS may want to use them.
It thereby no longer depends on the actual BIOS binary size.
Signed-off-by: Andreas Färber <address@hidden>
Cc: Avi Kivity <address@hidden>
Cc: Alexander Graf <address@hidden>
---
hw/ppc_prep.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c
index 47dab3f..dec059a 100644
--- a/hw/ppc_prep.c
+++ b/hw/ppc_prep.c
@@ -560,6 +560,8 @@ static void ppc_prep_init (ram_addr_t ram_size,
/* allocate and load BIOS */
memory_region_init_ram(bios, "ppc_prep.bios", BIOS_SIZE);
+ memory_region_set_readonly(bios, true);
+ memory_region_add_subregion(sysmem, (uint32_t)(-BIOS_SIZE), bios);
vmstate_register_ram_global(bios);
if (bios_name == NULL)
bios_name = BIOS_FILENAME;
@@ -573,8 +575,6 @@ static void ppc_prep_init (ram_addr_t ram_size,
target_phys_addr_t bios_addr;
bios_size = (bios_size + 0xfff) & ~0xfff;
bios_addr = (uint32_t)(-bios_size);
- memory_region_set_readonly(bios, true);
- memory_region_add_subregion(sysmem, bios_addr, bios);
bios_size = load_image_targphys(filename, bios_addr, bios_size);
}
if (bios_size < 0 || bios_size > BIOS_SIZE) {
--
1.7.7
- [Qemu-ppc] [PULL] PReP patch queue 2012-01-20, Andreas Färber, 2012/01/19
- [Qemu-ppc] [PATCH 01/10] prep: Fix offset of BIOS MemoryRegion,
Andreas Färber <=
- [Qemu-ppc] [PATCH 02/10] prep: Use ISA m48t59, Andreas Färber, 2012/01/19
- [Qemu-ppc] [PATCH 04/10] prep_pci: Simplify I/O endianness, Andreas Färber, 2012/01/19
- [Qemu-ppc] [PATCH 05/10] prep_pci: Update I/O to MemoryRegion ops, Andreas Färber, 2012/01/19
- [Qemu-ppc] [PATCH 06/10] prep: qdev'ify Raven host bridge (SysBus), Andreas Färber, 2012/01/19
- [Qemu-ppc] [PATCH 07/10] MAINTAINERS: Add PCI host bridge files to PReP machine, Andreas Färber, 2012/01/19
- [Qemu-ppc] [PATCH 03/10] prep: qdev'ify Raven host bridge (PCIDevice), Andreas Färber, 2012/01/19
- [Qemu-ppc] [PATCH 10/10] prep: Use i82378 PCI->ISA bridge for 'prep' machine, Andreas Färber, 2012/01/19
- [Qemu-ppc] [PATCH 09/10] prep: Add i82378 PCI-to-ISA bridge emulation, Andreas Färber, 2012/01/19
- [Qemu-ppc] [PATCH 08/10] prep: Add i82374 DMA emulation, Andreas Färber, 2012/01/19
- Re: [Qemu-ppc] [Qemu-devel] [PULL] PReP patch queue 2012-01-20, Anthony Liguori, 2012/01/23