* [Qemu-devel] [PULL for-1.5 0/3] PReP patch queue 2013-05-05 @ 2013-05-06 0:37 Andreas Färber 2013-05-06 0:37 ` [Qemu-devel] [PULL 1/3] prep: Fix NIP reset value Andreas Färber ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: Andreas Färber @ 2013-05-06 0:37 UTC (permalink / raw) To: qemu-devel; +Cc: Andreas Färber, qemu-ppc Hello, Please pull the PowerPC Reference Platform (PReP) queue into qemu.git master. It includes: * ppc NIP reset workaround for OpenHack'Ware, * ELF -bios support. * port 0092 read fix. The following changes since commit 467b34689d277fa56c09ad07ca0f08d7d7539f6d: Update OpenBIOS images (2013-05-05 09:53:22 +0000) are available in the git repository at: git://repo.or.cz/qemu/afaerber.git prep-up for you to fetch changes up to b6f54b31e7cfb2e88b76fc6cfc5334a26d1b9e53: prep: Make System I/O port 0092 read/write (2013-05-06 02:27:06 +0200) ---------------------------------------------------------------- Andreas Färber (1): prep: Add ELF support for -bios Fabien Chouteau (1): prep: Fix NIP reset value Julio Guerra (1): prep: Make System I/O port 0092 read/write hw/ppc/prep.c | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [PULL 1/3] prep: Fix NIP reset value 2013-05-06 0:37 [Qemu-devel] [PULL for-1.5 0/3] PReP patch queue 2013-05-05 Andreas Färber @ 2013-05-06 0:37 ` Andreas Färber 2013-05-06 0:37 ` [Qemu-devel] [PULL 2/3] prep: Add ELF support for -bios Andreas Färber 2013-05-06 0:37 ` [Qemu-devel] [PULL 3/3] prep: Make System I/O port 0092 read/write Andreas Färber 2 siblings, 0 replies; 4+ messages in thread From: Andreas Färber @ 2013-05-06 0:37 UTC (permalink / raw) To: qemu-devel; +Cc: Andreas Färber, qemu-ppc, Alexander Graf, Fabien Chouteau From: Fabien Chouteau <chouteau@adacore.com> The value was changed by commit 09d9828ace37ead29d510a7e24e63c2f15cd4b1c "PPC: fix hreset_vector for 60x, ...". Change it back for prep machine to unbreak OpenHack'Ware. Signed-off-by: Fabien Chouteau <chouteau@adacore.com> Signed-off-by: Andreas Färber <andreas.faerber@web.de> --- hw/ppc/prep.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index 59c7da3..2ad5b41 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -427,6 +427,9 @@ static void ppc_prep_reset(void *opaque) PowerPCCPU *cpu = opaque; cpu_reset(CPU(cpu)); + + /* Reset address */ + cpu->env.nip = 0xfffffffc; } /* PowerPC PREP hardware initialisation */ -- 1.8.1.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PULL 2/3] prep: Add ELF support for -bios 2013-05-06 0:37 [Qemu-devel] [PULL for-1.5 0/3] PReP patch queue 2013-05-05 Andreas Färber 2013-05-06 0:37 ` [Qemu-devel] [PULL 1/3] prep: Fix NIP reset value Andreas Färber @ 2013-05-06 0:37 ` Andreas Färber 2013-05-06 0:37 ` [Qemu-devel] [PULL 3/3] prep: Make System I/O port 0092 read/write Andreas Färber 2 siblings, 0 replies; 4+ messages in thread From: Andreas Färber @ 2013-05-06 0:37 UTC (permalink / raw) To: qemu-devel; +Cc: Andreas Färber, qemu-ppc, Alexander Graf This prepares for switching from OpenHack'Ware to OpenBIOS. While touching the error handling code, switch from aborting hw_error() to fprintf()+exit() and suppress failing without -bios for qtest. Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Andreas Färber <andreas.faerber@web.de> --- hw/ppc/prep.c | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index 2ad5b41..afa62d7 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -40,7 +40,9 @@ #include "hw/isa/pc87312.h" #include "sysemu/blockdev.h" #include "sysemu/arch_init.h" +#include "sysemu/qtest.h" #include "exec/address-spaces.h" +#include "elf.h" //#define HARD_DEBUG_PPC_IO //#define DEBUG_PPC_IO @@ -505,18 +507,29 @@ static void ppc_prep_init(QEMUMachineInitArgs *args) bios_name = BIOS_FILENAME; filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name); if (filename) { - bios_size = get_image_size(filename); + bios_size = load_elf(filename, NULL, NULL, NULL, + NULL, NULL, 1, ELF_MACHINE, 0); + if (bios_size < 0) { + bios_size = get_image_size(filename); + if (bios_size > 0 && bios_size <= BIOS_SIZE) { + hwaddr bios_addr; + bios_size = (bios_size + 0xfff) & ~0xfff; + bios_addr = (uint32_t)(-bios_size); + bios_size = load_image_targphys(filename, bios_addr, bios_size); + } + if (bios_size > BIOS_SIZE) { + fprintf(stderr, "qemu: PReP bios '%s' is too large (0x%x)\n", + bios_name, bios_size); + exit(1); + } + } } else { bios_size = -1; } - if (bios_size > 0 && bios_size <= BIOS_SIZE) { - hwaddr bios_addr; - bios_size = (bios_size + 0xfff) & ~0xfff; - bios_addr = (uint32_t)(-bios_size); - bios_size = load_image_targphys(filename, bios_addr, bios_size); - } - if (bios_size < 0 || bios_size > BIOS_SIZE) { - hw_error("qemu: could not load PPC PREP bios '%s'\n", bios_name); + if (bios_size < 0 && !qtest_enabled()) { + fprintf(stderr, "qemu: could not load PPC PReP bios '%s'\n", + bios_name); + exit(1); } if (filename) { g_free(filename); -- 1.8.1.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PULL 3/3] prep: Make System I/O port 0092 read/write 2013-05-06 0:37 [Qemu-devel] [PULL for-1.5 0/3] PReP patch queue 2013-05-05 Andreas Färber 2013-05-06 0:37 ` [Qemu-devel] [PULL 1/3] prep: Fix NIP reset value Andreas Färber 2013-05-06 0:37 ` [Qemu-devel] [PULL 2/3] prep: Add ELF support for -bios Andreas Färber @ 2013-05-06 0:37 ` Andreas Färber 2 siblings, 0 replies; 4+ messages in thread From: Andreas Färber @ 2013-05-06 0:37 UTC (permalink / raw) To: qemu-devel; +Cc: Julio Guerra, Andreas Färber, qemu-ppc, Alexander Graf From: Julio Guerra <guerr@julio.in> Port 0x0092 is documented as read/write, so for now return the endianness state instead of hardcoded 0x00. Signed-off-by: Julio Guerra <guerr@julio.in> [AF: Extracted from larger port 0092 patch] Signed-off-by: Andreas Färber <andreas.faerber@web.de> --- hw/ppc/prep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index afa62d7..be8a50e 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -269,7 +269,7 @@ static uint32_t PREP_io_800_readb (void *opaque, uint32_t addr) switch (addr) { case 0x0092: /* Special port 92 */ - retval = 0x00; + retval = sysctrl->endian << 1; break; case 0x0800: /* Motorola CPU configuration register */ -- 1.8.1.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-05-06 0:38 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-05-06 0:37 [Qemu-devel] [PULL for-1.5 0/3] PReP patch queue 2013-05-05 Andreas Färber 2013-05-06 0:37 ` [Qemu-devel] [PULL 1/3] prep: Fix NIP reset value Andreas Färber 2013-05-06 0:37 ` [Qemu-devel] [PULL 2/3] prep: Add ELF support for -bios Andreas Färber 2013-05-06 0:37 ` [Qemu-devel] [PULL 3/3] prep: Make System I/O port 0092 read/write Andreas Färber
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).