[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH 108/108] hw/arm/boot: Set PC correctly when loading
From: |
Michael Roth |
Subject: |
[Qemu-stable] [PATCH 108/108] hw/arm/boot: Set PC correctly when loading AArch64 ELF files |
Date: |
Wed, 6 Aug 2014 15:39:58 -0500 |
From: Peter Maydell <address@hidden>
The code in do_cpu_reset() correctly handled AArch64 CPUs
when running Linux kernels, but was missing code in the
branch of the if() that deals with loading ELF files.
Correctly jump to the ELF entry point on reset rather than
leaving the reset PC at zero.
Reported-by: Christopher Covington <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
Tested-by: Christopher Covington <address@hidden>
Cc: address@hidden
(cherry picked from commit a9047ec3f6ab56295cba5b07e0d46cded9e2a7ff)
Signed-off-by: Michael Roth <address@hidden>
---
hw/arm/boot.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index 3d1f4a2..1241761 100644
--- a/hw/arm/boot.c
+++ b/hw/arm/boot.c
@@ -417,8 +417,12 @@ static void do_cpu_reset(void *opaque)
if (info) {
if (!info->is_linux) {
/* Jump to the entry point. */
- env->regs[15] = info->entry & 0xfffffffe;
- env->thumb = info->entry & 1;
+ if (env->aarch64) {
+ env->pc = info->entry;
+ } else {
+ env->regs[15] = info->entry & 0xfffffffe;
+ env->thumb = info->entry & 1;
+ }
} else {
if (CPU(cpu) == first_cpu) {
if (env->aarch64) {
--
1.9.1
- [Qemu-stable] [PATCH 106/108] vmstate_xhci_event: fix unterminated field list, (continued)
- [Qemu-stable] [PATCH 106/108] vmstate_xhci_event: fix unterminated field list, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 099/108] Allow mismatched virtio config-len, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 105/108] kvm-all: Use 'tmpcpu' instead of 'cpu' in sub-looping to avoid 'cpu' be NULL, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 103/108] s390x/kvm: synchronize guest floating point registers, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 102/108] disas/libvixl: prepend the include path of libvixl header files, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 104/108] cadence_uart: check for serial backend before using it., Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 100/108] pci: assign devfn to pci_dev before calling pci_device_iommu_address_space(), Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 081/108] KVM: Fix GSI number space limit, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 101/108] mc146818rtc: register the clock reset notifier on the right clock, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 107/108] hw/misc/imx_ccm.c: Add missing VMState list terminator, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 108/108] hw/arm/boot: Set PC correctly when loading AArch64 ELF files,
Michael Roth <=
- Re: [Qemu-stable] [Qemu-devel] [000/108] Patch Round-up for stable 2.0.1, freeze on 2014-08-12, Eric Blake, 2014/08/06
- Re: [Qemu-stable] [Qemu-devel] [000/108] Patch Round-up for stable 2.0.1, freeze on 2014-08-12, Eric Blake, 2014/08/07