mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
sPAPR: Introduce rtas_ldq()
This introduces rtas_ldq() to load 64-bits parameter from continuous two 4-bytes memory chunk of RTAS parameter buffer, to simplify the code. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
e6fc9568c8
commit
a14aa92b20
2 changed files with 15 additions and 10 deletions
|
@ -489,6 +489,11 @@ static inline uint32_t rtas_ld(target_ulong phys, int n)
|
|||
return ldl_be_phys(&address_space_memory, ppc64_phys_to_real(phys + 4*n));
|
||||
}
|
||||
|
||||
static inline uint64_t rtas_ldq(target_ulong phys, int n)
|
||||
{
|
||||
return (uint64_t)rtas_ld(phys, n) << 32 | rtas_ld(phys, n + 1);
|
||||
}
|
||||
|
||||
static inline void rtas_st(target_ulong phys, int n, uint32_t val)
|
||||
{
|
||||
stl_be_phys(&address_space_memory, ppc64_phys_to_real(phys + 4*n), val);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue