spapr: Fix RTAS sysparm DIAGNOSTICS_RUN_MODE
commit3052d9519000739ec25224ed1ca7498b7ff66d77
authorSam bobroff <sam.bobroff@au1.ibm.com>
Wed, 25 Jun 2014 03:54:30 +0000 (25 13:54 +1000)
committerAlexander Graf <agraf@suse.de>
Fri, 27 Jun 2014 11:48:25 +0000 (27 13:48 +0200)
tree2a3078c89a60e446a34e7183f6e51a739b35472c
parentce3fa1eca2c60673fede2222defb4bd13a3b5b1e
spapr: Fix RTAS sysparm DIAGNOSTICS_RUN_MODE

This allows the ibm,get-system-parameter RTAS call to succeed for the
DIAGNOSTICS_RUN_MODE system parameter.

The problem can be seen with "ppc64_cpu --run-mode" from the
powerpc-utils package which fails before this patch with "Machine does
not support diagnostic run mode".

This is corrected by using the rtas_st_buffer() function to write to
the buffer.

The RTAS constants are also moved out into a header file, some new
constants added and the surrounding code slightly simplified.

Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
[agraf: remove some commentary]
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/ppc/spapr_rtas.c
include/hw/ppc/spapr.h