aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchin Gupta <achin.gupta@arm.com>2015-06-02 11:18:18 +0100
committerAchin Gupta <achin.gupta@arm.com>2015-06-02 11:18:18 +0100
commitdbc963e2bf931a407916058edeec235798b6a1e4 (patch)
tree70d36def0736e7fedb4bdecb5ca893599686457c
parent1081e9c800561d8b3c6c2a1b2d453da2d6f3ce50 (diff)
parent19af6fceaf039339f456d96b7a444b5d48217d77 (diff)
downloadarm-trusted-firmware-dbc963e2bf931a407916058edeec235798b6a1e4.tar.gz
Merge pull request #307 from soby-mathew/sm/css_bit_width_fix
CSS: Extract primary cpu id using the correct bit width
-rw-r--r--include/plat/arm/css/common/css_def.h2
-rw-r--r--plat/arm/css/common/aarch64/css_helpers.S2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/plat/arm/css/common/css_def.h b/include/plat/arm/css/common/css_def.h
index 12a0550..056c00d 100644
--- a/include/plat/arm/css/common/css_def.h
+++ b/include/plat/arm/css/common/css_def.h
@@ -69,7 +69,7 @@
/* SCP <=> AP boot configuration */
#define SCP_BOOT_CFG_ADDR 0x04000080
#define PRIMARY_CPU_SHIFT 8
-#define PRIMARY_CPU_MASK 0xf
+#define PRIMARY_CPU_BIT_WIDTH 4
#define CSS_MAP_DEVICE MAP_REGION_FLAT( \
diff --git a/plat/arm/css/common/aarch64/css_helpers.S b/plat/arm/css/common/aarch64/css_helpers.S
index 1eee762..3903278 100644
--- a/plat/arm/css/common/aarch64/css_helpers.S
+++ b/plat/arm/css/common/aarch64/css_helpers.S
@@ -115,7 +115,7 @@ func platform_is_primary_cpu
bl platform_get_core_pos
ldr x1, =SCP_BOOT_CFG_ADDR
ldr x1, [x1]
- ubfx x1, x1, #PRIMARY_CPU_SHIFT, #PRIMARY_CPU_MASK
+ ubfx x1, x1, #PRIMARY_CPU_SHIFT, #PRIMARY_CPU_BIT_WIDTH
cmp x0, x1
cset x0, eq
ret x9