spapr: Add rtas_st_buffer utility function
commitce3fa1eca2c60673fede2222defb4bd13a3b5b1e
authorSam bobroff <sam.bobroff@au1.ibm.com>
Wed, 25 Jun 2014 03:54:29 +0000 (25 13:54 +1000)
committerAlexander Graf <agraf@suse.de>
Fri, 27 Jun 2014 11:48:25 +0000 (27 13:48 +0200)
tree281f01a48f0537f149df3f56d68d5b8d5ed8b12f
parent6026db4501f773caaa2895cde7f93022960c7169
spapr: Add rtas_st_buffer utility function

Add a function to write lengh + data into a buffer as required for the
emulation of the RTAS ibm,get-system-parameter call.

If the destination is smaller than the source, the write is truncated
and success is returned. This matches the behaviour of pHyp.

This will be used in following patches.

Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
include/hw/ppc/spapr.h