aboutsummaryrefslogtreecommitdiff
path: root/asm
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2020-04-27 21:08:04 +1000
committerOliver O'Halloran <oohall@gmail.com>2020-06-11 12:52:55 +1000
commit0deffc80773cc63386846b794b7f1e702212b8f1 (patch)
tree48931e6ca05ff8a6883d356320fedbc195e64bdc /asm
parent2cc897067b87d9983250776739c0a4b2e44578f3 (diff)
downloadskiboot-0deffc80773cc63386846b794b7f1e702212b8f1.zip
skiboot-0deffc80773cc63386846b794b7f1e702212b8f1.tar.gz
skiboot-0deffc80773cc63386846b794b7f1e702212b8f1.tar.bz2
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 <npiggin@gmail.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Diffstat (limited to 'asm')
-rw-r--r--asm/head.S7
-rw-r--r--asm/misc.S10
2 files changed, 10 insertions, 7 deletions
diff --git a/asm/head.S b/asm/head.S
index 3c0ce23..d6514fc 100644
--- a/asm/head.S
+++ b/asm/head.S
@@ -299,13 +299,6 @@ exception_entry_foo:
b .
.= EXCEPTION_VECTORS_END
- /* 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)
/* Stores the offset we were started from. Used later on if we want to
* read any unrelocated code/data such as the built-in kernel image
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 <asm-offsets.h>
#include <processor.h>
#include <stack.h>
+#include <opal-api.h>
#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