[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] hw/core/generic-loader: Fix PC overwriting
From: |
Julia Suvorova |
Subject: |
[Qemu-devel] [PATCH] hw/core/generic-loader: Fix PC overwriting |
Date: |
Tue, 15 Jan 2019 17:36:50 +0300 |
If the memory is set using a file, and PC is specified on the command
line, it will be overwritten with the value 'entry'. This is not only
illogical, but also incorrect, because the load_ * functions do not take
into account the specifics of the ARM-M PC.
Signed-off-by: Julia Suvorova <address@hidden>
---
hw/core/generic-loader.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/core/generic-loader.c b/hw/core/generic-loader.c
index fbae05fb3b..fc81fd8e14 100644
--- a/hw/core/generic-loader.c
+++ b/hw/core/generic-loader.c
@@ -152,7 +152,7 @@ static void generic_loader_realize(DeviceState *dev, Error
**errp)
if (size < 0 || s->force_raw) {
/* Default to the maximum size being the machine's ram size */
size = load_image_targphys_as(s->file, s->addr, ram_size, as);
- } else {
+ } else if (!s->addr) {
s->addr = entry;
}
--
2.17.1
- [Qemu-devel] [PATCH] hw/core/generic-loader: Fix PC overwriting,
Julia Suvorova <=
- Re: [Qemu-devel] [PATCH] hw/core/generic-loader: Fix PC overwriting, Alistair Francis, 2019/01/15
- Re: [Qemu-devel] [PATCH] hw/core/generic-loader: Fix PC overwriting, Julia Suvorova, 2019/01/16
- Re: [Qemu-devel] [PATCH] hw/core/generic-loader: Fix PC overwriting, Stefan Hajnoczi, 2019/01/17
- Re: [Qemu-devel] [PATCH] hw/core/generic-loader: Fix PC overwriting, Julia Suvorova, 2019/01/17
- Re: [Qemu-devel] [PATCH] hw/core/generic-loader: Fix PC overwriting, Peter Maydell, 2019/01/17
- Re: [Qemu-devel] [PATCH] hw/core/generic-loader: Fix PC overwriting, Peter Maydell, 2019/01/17
- Re: [Qemu-devel] [PATCH] hw/core/generic-loader: Fix PC overwriting, Peter Maydell, 2019/01/21
- Re: [Qemu-devel] [PATCH] hw/core/generic-loader: Fix PC overwriting, Julia Suvorova, 2019/01/22
- Re: [Qemu-devel] [PATCH] hw/core/generic-loader: Fix PC overwriting, Peter Maydell, 2019/01/22
Re: [Qemu-devel] [PATCH] hw/core/generic-loader: Fix PC overwriting, no-reply, 2019/01/20