qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/2] arm: highbank: setup custom MPIDR value


From: Rob Herring
Subject: [Qemu-devel] [PATCH 2/2] arm: highbank: setup custom MPIDR value
Date: Mon, 24 Feb 2014 16:14:46 -0600

From: Rob Herring <address@hidden>

Calxeda highbank platform uses a cluster id of 9 which makes MPIDR
register be 0x8000090n where n is the core number. This causes problems
on current kernels expecting the MPIDR to match DT cpu reg property.

Midway is "normal" and has a cluster id of 0, so it does not need this
override.

Signed-off-by: Rob Herring <address@hidden>
---
 hw/arm/highbank.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c
index d76a1d1..e73d86f 100644
--- a/hw/arm/highbank.c
+++ b/hw/arm/highbank.c
@@ -241,6 +241,15 @@ static void calxeda_init(QEMUMachineInitArgs *args, enum 
cxmachines machine)
             error_report("%s", error_get_pretty(err));
             exit(1);
         }
+
+        if (machine == CALXEDA_HIGHBANK) {
+            object_property_set_int(OBJECT(cpu), 0x80000900 | n, "mpidr",
+                                    &err);
+            if (err) {
+                error_report("%s", error_get_pretty(err));
+                exit(1);
+            }
+        }
         object_property_set_bool(OBJECT(cpu), true, "realized", &err);
         if (err) {
             error_report("%s", error_get_pretty(err));
-- 
1.8.3.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]