summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDietmar Eggemann <dietmar.eggemann@arm.com>2012-05-03 12:44:59 +0100
committerDietmar Eggemann <dietmar.eggemann@arm.com>2012-05-23 12:44:34 +0100
commit4f48994f7037b257b7f48bd9574db09d119e7cc4 (patch)
treebdb81eac4d5db10b3013a5dd288bdf81164bd746
parent7dd470a6165adbec91a7536c0c4d2e303d45af24 (diff)
downloadswitcher-4f48994f7037b257b7f48bd9574db09d119e7cc4.tar.gz
Introduce BOOT_CLUSTER to the switcher.
Although BOOT_CLUSTER is already known to bootwrapper, it was not accessible from the switcher so far. Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
-rw-r--r--big-little/Makefile2
-rw-r--r--big-little/common/hyp_setup.c1
-rw-r--r--big-little/include/misc.h5
-rw-r--r--bootwrapper/Makefile1
4 files changed, 9 insertions, 0 deletions
diff --git a/big-little/Makefile b/big-little/Makefile
index c8fa9e8..58d8d04 100644
--- a/big-little/Makefile
+++ b/big-little/Makefile
@@ -46,6 +46,7 @@ SWITCHER ?= TRUE
ASYNC ?= FALSE
HYP_TIMERS ?= TRUE
RAND_ASYNC ?= FALSE
+BOOT_CLUSTER ?= 0
HOST_CLUSTER ?= 1
FLUSH_OB_L2 ?= TRUE
FLUSH_L2_FIX ?= FALSE
@@ -86,6 +87,7 @@ SWITCHER_ASFLAGS += --pd "ASYNC_SWITCH SETL {$(ASYNC)}" \
SWITCHER_CFLAGS += -DASYNC_SWITCH=$(ASYNC) \
-DRAND_ASYNC=$(RAND_ASYNC) \
+ -DBOOT_CLUSTER=$(BOOT_CLUSTER) \
-DHOST_CLUSTER=$(HOST_CLUSTER) \
-DUSE_HYP_TIMERS=$(HYP_TIMERS) \
-DFLUSH_OB_L2=$(FLUSH_OB_L2) \
diff --git a/big-little/common/hyp_setup.c b/big-little/common/hyp_setup.c
index 833b2ec..ac7425a 100644
--- a/big-little/common/hyp_setup.c
+++ b/big-little/common/hyp_setup.c
@@ -37,6 +37,7 @@ extern void SetupVGIC(unsigned);
extern void enable_trigger(unsigned);
unsigned host_cluster = HOST_CLUSTER;
+unsigned boot_cluster = BOOT_CLUSTER;
unsigned switcher = SWITCHER;
vm_state guestos_state[MAX_CPUIFS];
unsigned guestos_state_size = sizeof(vm_state);
diff --git a/big-little/include/misc.h b/big-little/include/misc.h
index bd15787..e1957aa 100644
--- a/big-little/include/misc.h
+++ b/big-little/include/misc.h
@@ -383,6 +383,10 @@
#define ID_ISAR4 0x4
#define ID_ISAR5 0x5
+#define IS_BOOT_CLUSTER (read_clusterid() == boot_cluster)
+#define IS_HOST_CLUSTER (read_clusterid() == host_cluster)
+#define IS_TGT_CLUSTER (!IS_HOST_CLUSTER)
+
extern void enable_cci_snoops(unsigned);
extern void disable_cci_snoops(unsigned);
extern void switch_cluster(unsigned);
@@ -399,6 +403,7 @@ extern unsigned get_cpuif_mask(unsigned);
extern unsigned get_cpu_mask(unsigned);
extern unsigned BL_DV_PAGE$$Base;
extern unsigned BL_SEC_DV_PAGE$$Base;
+extern unsigned boot_cluster;
extern unsigned host_cluster;
extern unsigned switcher;
extern unsigned switchable_cpus_mask;
diff --git a/bootwrapper/Makefile b/bootwrapper/Makefile
index 3af7c5d..bb59aec 100644
--- a/bootwrapper/Makefile
+++ b/bootwrapper/Makefile
@@ -45,6 +45,7 @@ VECTBASE?=$(LOBASE)
HIBASE?=0x8FF
FSADDR?=0x8e400000
DEBUG=TRUE
+# BOOT_CLUSTER is also defined in big-little/Makefile!
BOOT_CLUSTER?=0
# SWITCHER is also defined in big-little/Makefile!
SWITCHER?=TRUE