diff options
author | Laurent Dufour <ldufour@linux.vnet.ibm.com> | 2014-01-30 16:32:03 +0100 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2014-01-31 14:20:50 +0900 |
commit | 178e393d3a00604143eab2889939ea13be095e03 (patch) | |
tree | 8ac03d7e995f138bf612ac140ec527e06d1dd662 /purgatory | |
parent | c8e6e13056b08b2f0a0514e6b68b766661a551c3 (diff) |
ppc64/kexec/purgatory Fix RTAS calls in Little Endian mode.
RTAS is expecting parameters in Big Endian order so we have to byte swap
them in LE mode.
In the purgatory RTAS calls are only made for debug output.
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'purgatory')
-rw-r--r-- | purgatory/arch/ppc64/console-ppc64.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/purgatory/arch/ppc64/console-ppc64.c b/purgatory/arch/ppc64/console-ppc64.c index 78a233b..b80183c 100644 --- a/purgatory/arch/ppc64/console-ppc64.c +++ b/purgatory/arch/ppc64/console-ppc64.c @@ -21,6 +21,9 @@ #include <purgatory.h> #include "hvCall.h" +#include <byteswap.h> +#include <endian.h> +#include <asm/byteorder.h> extern int debug; @@ -36,6 +39,7 @@ void putchar(int c) putchar('\r'); buff[0] = c; - plpar_hcall_norets(H_PUT_TERM_CHAR, 0, 1, lbuf[0], lbuf[1]); + plpar_hcall_norets(H_PUT_TERM_CHAR, 0, 1, + __cpu_to_be64(lbuf[0]), __cpu_to_be64(lbuf[1])); return; } |