]> xenbits.xensource.com Git - osstest/qemu.git/commitdiff
arm: Implement uniprocessor with MP config
authorPeter Crosthwaite <peter.crosthwaite@xilinx.com>
Mon, 15 Jun 2015 17:06:10 +0000 (18:06 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 15 Jun 2015 17:06:10 +0000 (18:06 +0100)
Add a boolean for indicating uniprocessors with MP extensions. This
drives the U bit in MPIDR. Prepares support for Cortex-R5.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: a70a80583df265e0174f01fa1fc92b33ea6d1db5.1434066412.git.peter.crosthwaite@xilinx.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target-arm/cpu-qom.h
target-arm/helper.c

index 24a4cfb1ae5ca37aa9496030243f6c75bf5b01db..57b4a12069034e0d2388d4ced1507c057c49b6e7 100644 (file)
@@ -116,6 +116,9 @@ typedef struct ARMCPU {
     /* KVM init features for this CPU */
     uint32_t kvm_init_features[7];
 
+    /* Uniprocessor system with MP extensions */
+    bool mp_is_up;
+
     /* The instance init functions for implementation-specific subclasses
      * set these fields to specify the implementation-dependent values of
      * various constant registers and reset values of non-constant
index f51dece2fe7023c8a77d447c212673b89d53e83f..f038a03a6cab7505dcf88e3930e4914d51f66648 100644 (file)
@@ -2075,9 +2075,11 @@ static uint64_t mpidr_read(CPUARMState *env, const ARMCPRegInfo *ri)
         mpidr |= (1U << 31);
         /* Cores which are uniprocessor (non-coherent)
          * but still implement the MP extensions set
-         * bit 30. (For instance, A9UP.) However we do
-         * not currently model any of those cores.
+         * bit 30. (For instance, Cortex-R5).
          */
+        if (cpu->mp_is_up) {
+            mpidr |= (1u << 30);
+        }
     }
     return mpidr;
 }