[Skiboot] [PATCH v2 02/16] core/trace: Put boot_tracebuf in correct location.

Jordan Niethe jniethe5 at gmail.com
Tue Apr 2 10:43:13 AEDT 2019


A position for the boot_tracebuf is allocated in skiboot.lds.S.
However, without a __section attribute the boot trace buffer is not
placed in the correct location, meaning that it also will not be
correctly aligned.  Add the __section attribute to ensure it will be
placed in its allocated position.

Signed-off-by: Jordan Niethe <jniethe5 at gmail.com>
---
 core/trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/trace.c b/core/trace.c
index d4e1b1d0d245..4eb9e363070a 100644
--- a/core/trace.c
+++ b/core/trace.c
@@ -36,7 +36,7 @@
 static struct {
 	struct trace_info trace_info;
 	char buf[BOOT_TBUF_SZ + MAX_SIZE];
-} boot_tracebuf;
+} boot_tracebuf __section(".data.boot_trace");
 
 void init_boot_tracebuf(struct cpu_thread *boot_cpu)
 {
-- 
2.20.1



More information about the Skiboot mailing list