summaryrefslogtreecommitdiff
path: root/big-little/secure_world/secure_resets.c
diff options
context:
space:
mode:
Diffstat (limited to 'big-little/secure_world/secure_resets.c')
-rw-r--r--big-little/secure_world/secure_resets.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/big-little/secure_world/secure_resets.c b/big-little/secure_world/secure_resets.c
index 079c114..a734838 100644
--- a/big-little/secure_world/secure_resets.c
+++ b/big-little/secure_world/secure_resets.c
@@ -72,7 +72,8 @@ static unsigned lock_ib_kfscb;
* KFSCB. It will always be used when the MMU is off.
* Each cluster will anyways use it sequentially
*/
-static bakery_t lock_ob_kfscb __attribute__ ((section("BL_SEC_DV_PAGE"))) = {0};
+static bakery_t lock_ob_kfscb __attribute__ ((section("BL_SEC_DV_PAGE"))) = {
+0};
/*
* Small stacks for after we have turned our caches off.
@@ -80,14 +81,12 @@ static bakery_t lock_ob_kfscb __attribute__ ((section("BL_SEC_DV_PAGE"))) = {0};
static unsigned long long powerdown_stacks[NUM_CPUS][32]
__attribute__ ((section("BL_SEC_DV_PAGE")));
-
unsigned long long *get_powerdown_stack(unsigned cpu_id)
{
return &powerdown_stacks[cpu_id + 1][0];
}
-static void (*get_reset_handler(unsigned cluster_id, unsigned cpu_id)) (void)
-{
+static void (*get_reset_handler(unsigned cluster_id, unsigned cpu_id)) (void) {
#if FM_BETA
return (void (*)(void))ve_reset_type[cpu_id];
#else
@@ -102,17 +101,19 @@ static void (*get_reset_handler(unsigned cluster_id, unsigned cpu_id)) (void)
* new one. Instead of dealing with a function pointer, they manipulate a
* variable.
*/
-void set_reset_handler(unsigned cluster_id, unsigned cpu_id, void (*handler)(void))
+void set_reset_handler(unsigned cluster_id, unsigned cpu_id,
+ void (*handler) (void))
{
- void (*prev_reset_handler)(void) = get_reset_handler(cluster_id, cpu_id);
+ void (*prev_reset_handler) (void) =
+ get_reset_handler(cluster_id, cpu_id);
if (prev_reset_handler != handler) {
#if FM_BETA
ve_reset_type[cpu_id]++;
cln_dcache_mva_poc(&ve_reset_type[cpu_id]);
#else
- write32(KFSCB_BASE + RST_HANDLER0 + ((cpu_id + (cluster_id << 2)) << 3),
- (unsigned) handler);
+ write32(KFSCB_BASE + RST_HANDLER0 +
+ ((cpu_id + (cluster_id << 2)) << 3), (unsigned)handler);
dsb();
#endif
}
@@ -296,7 +297,8 @@ void do_power_op(unsigned cpu_mask, unsigned op_type)
switch (op_type) {
case (OP_TYPE_HP):
get_bakery_spinlock(cpu_id, &lock_ob_kfscb);
- write32(KFSCB_BASE + RST_HOLD0 + (cluster_id << 2), cpu_mask);
+ write32(KFSCB_BASE + RST_HOLD0 + (cluster_id << 2),
+ cpu_mask);
release_bakery_spinlock(cpu_id, &lock_ob_kfscb);
break;
case (OP_TYPE_SWITCH):