aboutsummaryrefslogtreecommitdiff
path: root/documentation
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 /documentation
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 'documentation')
-rw-r--r--documentation/porting_guidelines.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/documentation/porting_guidelines.md b/documentation/porting_guidelines.md
index 3ec197ee..978c48a0 100644
--- a/documentation/porting_guidelines.md
+++ b/documentation/porting_guidelines.md
@@ -158,7 +158,7 @@ const struct thread_handlers *generic_boot_get_handlers(void)
*/
register_phys_mem(MEM_AREA_IO_NSEC, CONSOLE_UART_BASE, SERIAL8250_UART_REG_SIZE);
-static struct serial8250_uart_data console_data __early_bss;
+static struct serial8250_uart_data console_data;
void console_init(void)
{