mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-23 19:49:43 +00:00
spapr: use specific endian ld/st_phys
Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
04bc74edec
commit
06c46bbab0
@ -280,12 +280,12 @@ target_ulong spapr_hypercall(CPUState *env, target_ulong opcode,
|
||||
|
||||
static inline uint32_t rtas_ld(target_ulong phys, int n)
|
||||
{
|
||||
return ldl_phys(phys + 4*n);
|
||||
return ldl_be_phys(phys + 4*n);
|
||||
}
|
||||
|
||||
static inline void rtas_st(target_ulong phys, int n, uint32_t val)
|
||||
{
|
||||
stl_phys(phys + 4*n, val);
|
||||
stl_be_phys(phys + 4*n, val);
|
||||
}
|
||||
|
||||
typedef void (*spapr_rtas_fn)(sPAPREnvironment *spapr, uint32_t token,
|
||||
|
@ -278,7 +278,7 @@ static target_ulong register_vpa(CPUState *env, target_ulong vpa)
|
||||
}
|
||||
/* FIXME: bounds check the address */
|
||||
|
||||
size = lduw_phys(vpa + 0x4);
|
||||
size = lduw_be_phys(vpa + 0x4);
|
||||
|
||||
if (size < VPA_MIN_SIZE) {
|
||||
return H_PARAMETER;
|
||||
@ -321,7 +321,7 @@ static target_ulong register_slb_shadow(CPUState *env, target_ulong addr)
|
||||
return H_HARDWARE;
|
||||
}
|
||||
|
||||
size = ldl_phys(addr + 0x4);
|
||||
size = ldl_be_phys(addr + 0x4);
|
||||
if (size < 0x8) {
|
||||
return H_PARAMETER;
|
||||
}
|
||||
@ -354,7 +354,7 @@ static target_ulong register_dtl(CPUState *env, target_ulong addr)
|
||||
return H_HARDWARE;
|
||||
}
|
||||
|
||||
size = ldl_phys(addr + 0x4);
|
||||
size = ldl_be_phys(addr + 0x4);
|
||||
|
||||
if (size < 48) {
|
||||
return H_PARAMETER;
|
||||
@ -441,9 +441,9 @@ static target_ulong h_rtas(CPUState *env, sPAPREnvironment *spapr,
|
||||
target_ulong opcode, target_ulong *args)
|
||||
{
|
||||
target_ulong rtas_r3 = args[0];
|
||||
uint32_t token = ldl_phys(rtas_r3);
|
||||
uint32_t nargs = ldl_phys(rtas_r3 + 4);
|
||||
uint32_t nret = ldl_phys(rtas_r3 + 8);
|
||||
uint32_t token = ldl_be_phys(rtas_r3);
|
||||
uint32_t nargs = ldl_be_phys(rtas_r3 + 4);
|
||||
uint32_t nret = ldl_be_phys(rtas_r3 + 8);
|
||||
|
||||
return spapr_rtas_call(spapr, token, nargs, rtas_r3 + 12,
|
||||
nret, rtas_r3 + 12 + 4*nargs);
|
||||
|
Loading…
Reference in New Issue
Block a user