Skip to contentSkip to conversation

target-arm queue

GIT PULL Applied Peter Maydell 2 participants 4 messages Nov 28, 2016 – Nov 29, 2016

lore
Share & tools
lore
#0 lore raw

target-arm queue for 2.8 rc2: just two bugfixes.

thanks
-- PMM

The following changes since commit 00227fefd2059464cd2f59aed29944874c630e2f:

Update version for v2.8.0-rc1 release (2016-11-22 22:29:08 +0000)

are available in the git repository at:

git://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20161128

for you to fetch changes up to b77257d7bae26a0fca6a90af88d54ee2c45f5b61:

arm: Create /chosen and /memory devicetree nodes if necessary (2016-11-28 11:32:34 +0000)

----------------------------------------------------------------
target-arm queue:
* hw/arm/boot: fix crash handling device trees with no /chosen or /memory nodes
* generic-loader: only set PC if a CPU is specified

----------------------------------------------------------------
Alistair Francis (1):
generic-loader: file: Only set a PC if a CPU is specified

Guenter Roeck (1):
arm: Create /chosen and /memory devicetree nodes if necessary

 hw/arm/boot.c            | 17 +++++++++++++++++
 hw/core/generic-loader.c |  7 ++++++-
 2 files changed, 23 insertions(+), 1 deletion(-)
#1 lore raw

[Qemu-devel] [PULL 2/2] arm: Create /chosen and /memory devicetree nodes if necessary

From: Guenter Roeck <[email protected]>

While customary, the /chosen and /memory devicetree nodes do not have to exist. Create if necessary. Also create the /memory/device_type property if needed.

Message-id: [email protected]

---
 hw/arm/boot.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
hw/arm/boot.c +17 -0
index 942416d..ff621e4 100644
@@ -9,6 +9,7 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
+#include <libfdt.h>
 #include "hw/hw.h"
 #include "hw/arm/arm.h"
 #include "hw/arm/linux-boot-if.h"
@@ -486,6 +487,17 @@ static int load_dtb(hwaddr addr, const struct arm_boot_info *binfo,
             g_free(nodename);
         }
     } else {
+        Error *err = NULL;
+
+        rc = fdt_path_offset(fdt, "/memory");
+        if (rc < 0) {
+            qemu_fdt_add_subnode(fdt, "/memory");
+        }
+
+        if (!qemu_fdt_getprop(fdt, "/memory", "device_type", NULL, &err)) {
+            qemu_fdt_setprop_string(fdt, "/memory", "device_type", "memory");
+        }
+
         rc = qemu_fdt_setprop_sized_cells(fdt, "/memory", "reg",
                                           acells, binfo->loader_start,
                                           scells, binfo->ram_size);
@@ -495,6 +507,11 @@ static int load_dtb(hwaddr addr, const struct arm_boot_info *binfo,
         }
     }
 
+    rc = fdt_path_offset(fdt, "/chosen");
+    if (rc < 0) {
+        qemu_fdt_add_subnode(fdt, "/chosen");
+    }
+
     if (binfo->kernel_cmdline && *binfo->kernel_cmdline) {
         rc = qemu_fdt_setprop_string(fdt, "/chosen", "bootargs",
                                      binfo->kernel_cmdline);
Signature · 1 line
2.7.4
#2 lore raw

[Qemu-devel] [PULL 1/2] generic-loader: file: Only set a PC if a CPU is specified

In reply to Peter Maydell

From: Alistair Francis <[email protected]>

This patch fixes the generic-loader file loading to only set the program counter if a CPU is specified. This follows what is written in the documentation and was always part of the original intention.

Message-id: 537bf4d08be7acf7a89b590cff69e19db7f0a6cd.1478908712.git.alistair.francis@xilinx.com

---
 hw/core/generic-loader.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
hw/core/generic-loader.c +6 -1
index 79ab6df..208f549 100644
@@ -93,7 +93,12 @@ static void generic_loader_realize(DeviceState *dev, Error **errp)
                        "image");
             return;
         }
-        s->set_pc = true;
+        /* The user specified a file, only set the PC if they also specified
+         * a CPU to use.
+         */
+        if (s->cpu_num != CPU_NONE) {
+            s->set_pc = true;
+        }
     } else if (s->addr) {
         /* User is setting the PC */
         if (s->data || s->data_len || s->data_be) {
Signature · 1 line
2.7.4
#3 lore raw
In reply to Peter Maydell
Quoted 27 lines · Peter Maydell

target-arm queue for 2.8 rc2: just two bugfixes.

thanks
-- PMM

The following changes since commit 00227fefd2059464cd2f59aed29944874c630e2f:

Update version for v2.8.0-rc1 release (2016-11-22 22:29:08 +0000)

are available in the git repository at:

git://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20161128

for you to fetch changes up to b77257d7bae26a0fca6a90af88d54ee2c45f5b61:

arm: Create /chosen and /memory devicetree nodes if necessary (2016-11-28 11:32:34 +0000)

----------------------------------------------------------------
target-arm queue:
* hw/arm/boot: fix crash handling device trees with no /chosen or /memory nodes
* generic-loader: only set PC if a CPU is specified

----------------------------------------------------------------
Alistair Francis (1):
generic-loader: file: Only set a PC if a CPU is specified

Quoted 6 lines

Guenter Roeck (1):
arm: Create /chosen and /memory devicetree nodes if necessary

 hw/arm/boot.c            | 17 +++++++++++++++++
 hw/core/generic-loader.c |  7 ++++++-
 2 files changed, 23 insertions(+), 1 deletion(-)

Thanks, applied to my staging tree:
https://github.com/stefanha/qemu/commits/staging

Stefan