aboutsummaryrefslogtreecommitdiff
path: root/core/opal.c
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2017-01-05 19:35:47 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-02-06 18:40:48 +1100
commit4ebde139333659b6de4516830a2785b8a89c08a4 (patch)
treea04a547f3971f98a2bff5f777884daf19e5bf863 /core/opal.c
parent420d62d8f545204ff615b3062b01babb8b98e11c (diff)
downloadskiboot-4ebde139333659b6de4516830a2785b8a89c08a4.zip
skiboot-4ebde139333659b6de4516830a2785b8a89c08a4.tar.gz
skiboot-4ebde139333659b6de4516830a2785b8a89c08a4.tar.bz2
Initial support for the ELFv2 ABI
Provide an experimental option to compile using ELFv2 ABI even on big endian builds. ELFv2 + BE is not officially supported by the toolchain, but it works quite well. It may be useful as a small step toward a little-endian build. This saves about 200kB of text/data. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/opal.c')
-rw-r--r--core/opal.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/core/opal.c b/core/opal.c
index 1d15abe..6087e65 100644
--- a/core/opal.c
+++ b/core/opal.c
@@ -29,6 +29,7 @@
#include <affinity.h>
#include <opal-msg.h>
#include <timer.h>
+#include <elf-abi.h>
/* Pending events to signal via opal_poll_events */
uint64_t opal_pending_events;
@@ -58,8 +59,7 @@ void opal_table_init(void)
printf("OPAL table: %p .. %p, branch table: %p\n",
s, e, opal_branch_table);
while(s < e) {
- uint64_t *func = s->func;
- opal_branch_table[s->token] = *func;
+ opal_branch_table[s->token] = function_entry_address(s->func);
opal_num_args[s->token] = s->nargs;
s++;
}
@@ -113,11 +113,9 @@ void opal_trace_entry(struct stack_frame *eframe)
void __opal_register(uint64_t token, void *func, unsigned int nargs)
{
- uint64_t *opd = func;
-
assert(token <= OPAL_LAST);
- opal_branch_table[token] = *opd;
+ opal_branch_table[token] = function_entry_address(func);
opal_num_args[token] = nargs;
}