diff options
author | Etienne Carriere <etienne.carriere@linaro.org> | 2017-09-01 10:22:20 +0200 |
---|---|---|
committer | Etienne Carriere <etienne.carriere@linaro.org> | 2017-09-01 10:22:20 +0200 |
commit | 86606eb51e81b4189579e2b429f1c8f26f5c804c (patch) | |
tree | ac4535b711a6744398802de913fc43a678090b95 /lib/el3_runtime | |
parent | 096b7af7c93953673c0500156f482ad8c6da525e (diff) | |
download | trusted-firmware-a-86606eb51e81b4189579e2b429f1c8f26f5c804c.tar.gz |
cpu log buffer size depends on cache line size
Platform may use specific cache line sizes. Since CACHE_WRITEBACK_GRANULE
defines the platform specific cache line size, it is used to define the
size of the cpu data structure CPU_DATA_SIZE aligned on cache line size.
Introduce assembly macro 'mov_imm' for AArch32 to simplify implementation
of function '_cpu_data_by_index'.
Change-Id: Ic2d49ffe0c3e51649425fd9c8c99559c582ac5a1
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Diffstat (limited to 'lib/el3_runtime')
-rw-r--r-- | lib/el3_runtime/aarch32/cpu_data.S | 4 | ||||
-rw-r--r-- | lib/el3_runtime/aarch64/cpu_data.S | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/el3_runtime/aarch32/cpu_data.S b/lib/el3_runtime/aarch32/cpu_data.S index 3d6b806997..68d64151fc 100644 --- a/lib/el3_runtime/aarch32/cpu_data.S +++ b/lib/el3_runtime/aarch32/cpu_data.S @@ -34,7 +34,9 @@ endfunc _cpu_data * ----------------------------------------------------------------- */ func _cpu_data_by_index + mov_imm r1, CPU_DATA_SIZE + mul r0, r0, r1 ldr r1, =percpu_data - add r0, r1, r0, LSL #CPU_DATA_LOG2SIZE + add r0, r0, r1 bx lr endfunc _cpu_data_by_index diff --git a/lib/el3_runtime/aarch64/cpu_data.S b/lib/el3_runtime/aarch64/cpu_data.S index de488160b6..96be0813cf 100644 --- a/lib/el3_runtime/aarch64/cpu_data.S +++ b/lib/el3_runtime/aarch64/cpu_data.S @@ -39,7 +39,9 @@ endfunc init_cpu_data_ptr * ----------------------------------------------------------------- */ func _cpu_data_by_index + mov_imm x1, CPU_DATA_SIZE + mul x0, x0, x1 adr x1, percpu_data - add x0, x1, x0, LSL #CPU_DATA_LOG2SIZE + add x0, x0, x1 ret endfunc _cpu_data_by_index |