From 0deffc80773cc63386846b794b7f1e702212b8f1 Mon Sep 17 00:00:00 2001 From: Nicholas Piggin Date: Mon, 27 Apr 2020 21:08:04 +1000 Subject: move opal_branch_table, opal_num_args to .rodata section .head is for code and data which must reside at a fixed low address, mainly entry points. These are moved into .rodata. Despite being modified at runtime, this facilitates these tables being write-protected in a later patch. Signed-off-by: Nicholas Piggin Signed-off-by: Oliver O'Halloran --- asm/misc.S | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'asm/misc.S') diff --git a/asm/misc.S b/asm/misc.S index e2b1989..0334489 100644 --- a/asm/misc.S +++ b/asm/misc.S @@ -9,9 +9,19 @@ #include #include #include +#include #define OLD_BINUTILS 1 + .section ".rodata" + /* This is the OPAL branch table. It's populated at boot time + * with function pointers to the various OPAL functions from + * the content of the .opal_table section, indexed by Token. + */ +.global opal_branch_table +opal_branch_table: + .space 8 * (OPAL_LAST + 1) + .section ".text","ax" .balign 0x10 -- cgit v1.1