aboutsummaryrefslogtreecommitdiff
path: root/core/kernel
diff options
context:
space:
mode:
authorJerome Forissier <jerome.forissier@linaro.org>2017-03-08 08:29:41 +0100
committerJérôme Forissier <jerome.forissier@linaro.org>2017-05-30 09:51:51 +0200
commit236601217f7ecfb4a1511421299e77057cfdbde0 (patch)
tree4bbb7cc9a5890821703026829026413870419491 /core/kernel
parentda033e69c2ce073850c57f5f9ec175e2f40c6f0a (diff)
core: remove __early_bss
Initialize the .bss section early from assembler before entering C code. As a result, the __early_bss qualifier is not needed anymore. Remove it, as well as the related symbols (__early_bss_start and __early_bss_end). This makes the code simpler hence easier to maintain, at the expense of initialization time, since .bss is cleared before CPU caches are turned on (and doing it later would mean some C function have been called already). Here are some performance numbers measured on HiKey. The "memset" column measures the time it takes to clear .bss in C, without this patch. The "assembly" column reports the time taken by the clear_bss loop in this patch. Timings were performed using CNTPCT. Worst case is a ~1 ms overhead in boot time. memset(): | assembly: ms (bytes) | ms (bytes) --------------+-------------- Aarch64 0.30 (72824) | 0.08 (73528) Aarch32 0.27 (65016) | 1.24 (65408) Aarch32/pager 0.03 (11328) | 0.23 (11736) Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (QEMU) Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey 32/64) Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey/pager) Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'core/kernel')
-rw-r--r--core/kernel/console.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/kernel/console.c b/core/kernel/console.c
index ebd13b56..36eb38b3 100644
--- a/core/kernel/console.c
+++ b/core/kernel/console.c
@@ -37,7 +37,7 @@
#include <libfdt.h>
#endif
-static struct serial_chip *serial_console __early_bss;
+static struct serial_chip *serial_console;
void __weak console_putc(int ch)
{