2 * QEMU PowerPC pSeries Logical Partition (aka sPAPR) hardware System Emulator
4 * Hypercall based emulated RTAS
6 * Copyright (c) 2010-2011 David Gibson, IBM Corporation.
8 * Permission is hereby granted, free of charge, to any person obtaining a copy
9 * of this software and associated documentation files (the "Software"), to deal
10 * in the Software without restriction, including without limitation the rights
11 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 * copies of the Software, and to permit persons to whom the Software is
13 * furnished to do so, subject to the following conditions:
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28 #include "sysemu/sysemu.h"
29 #include "sysemu/char.h"
31 #include "sysemu/device_tree.h"
32 #include "sysemu/cpus.h"
34 #include "hw/ppc/spapr.h"
35 #include "hw/ppc/spapr_vio.h"
36 #include "qapi-event.h"
39 #include "hw/ppc/spapr_drc.h"
41 /* #define DEBUG_SPAPR */
44 #define DPRINTF(fmt, ...) \
45 do { fprintf(stderr, fmt, ## __VA_ARGS__); } while (0)
47 #define DPRINTF(fmt, ...) \
51 static sPAPRConfigureConnectorState
*spapr_ccs_find(sPAPRMachineState
*spapr
,
54 sPAPRConfigureConnectorState
*ccs
= NULL
;
56 QTAILQ_FOREACH(ccs
, &spapr
->ccs_list
, next
) {
57 if (ccs
->drc_index
== drc_index
) {
65 static void spapr_ccs_add(sPAPRMachineState
*spapr
,
66 sPAPRConfigureConnectorState
*ccs
)
68 g_assert(!spapr_ccs_find(spapr
, ccs
->drc_index
));
69 QTAILQ_INSERT_HEAD(&spapr
->ccs_list
, ccs
, next
);
72 static void spapr_ccs_remove(sPAPRMachineState
*spapr
,
73 sPAPRConfigureConnectorState
*ccs
)
75 QTAILQ_REMOVE(&spapr
->ccs_list
, ccs
, next
);
79 void spapr_ccs_reset_hook(void *opaque
)
81 sPAPRMachineState
*spapr
= opaque
;
82 sPAPRConfigureConnectorState
*ccs
, *ccs_tmp
;
84 QTAILQ_FOREACH_SAFE(ccs
, &spapr
->ccs_list
, next
, ccs_tmp
) {
85 spapr_ccs_remove(spapr
, ccs
);
89 static void rtas_display_character(PowerPCCPU
*cpu
, sPAPRMachineState
*spapr
,
90 uint32_t token
, uint32_t nargs
,
92 uint32_t nret
, target_ulong rets
)
94 uint8_t c
= rtas_ld(args
, 0);
95 VIOsPAPRDevice
*sdev
= vty_lookup(spapr
, 0);
98 rtas_st(rets
, 0, RTAS_OUT_HW_ERROR
);
100 vty_putchars(sdev
, &c
, sizeof(c
));
101 rtas_st(rets
, 0, RTAS_OUT_SUCCESS
);
105 static void rtas_power_off(PowerPCCPU
*cpu
, sPAPRMachineState
*spapr
,
106 uint32_t token
, uint32_t nargs
, target_ulong args
,
107 uint32_t nret
, target_ulong rets
)
109 if (nargs
!= 2 || nret
!= 1) {
110 rtas_st(rets
, 0, RTAS_OUT_PARAM_ERROR
);
113 qemu_system_shutdown_request();
114 rtas_st(rets
, 0, RTAS_OUT_SUCCESS
);
117 static void rtas_system_reboot(PowerPCCPU
*cpu
, sPAPRMachineState
*spapr
,
118 uint32_t token
, uint32_t nargs
,
120 uint32_t nret
, target_ulong rets
)
122 if (nargs
!= 0 || nret
!= 1) {
123 rtas_st(rets
, 0, RTAS_OUT_PARAM_ERROR
);
126 qemu_system_reset_request();
127 rtas_st(rets
, 0, RTAS_OUT_SUCCESS
);
130 static void rtas_query_cpu_stopped_state(PowerPCCPU
*cpu_
,
131 sPAPRMachineState
*spapr
,
132 uint32_t token
, uint32_t nargs
,
134 uint32_t nret
, target_ulong rets
)
139 if (nargs
!= 1 || nret
!= 2) {
140 rtas_st(rets
, 0, RTAS_OUT_PARAM_ERROR
);
144 id
= rtas_ld(args
, 0);
145 cpu
= ppc_get_vcpu_by_dt_id(id
);
147 if (CPU(cpu
)->halted
) {
153 rtas_st(rets
, 0, RTAS_OUT_SUCCESS
);
157 /* Didn't find a matching cpu */
158 rtas_st(rets
, 0, RTAS_OUT_PARAM_ERROR
);
161 static void rtas_start_cpu(PowerPCCPU
*cpu_
, sPAPRMachineState
*spapr
,
162 uint32_t token
, uint32_t nargs
,
164 uint32_t nret
, target_ulong rets
)
166 target_ulong id
, start
, r3
;
169 if (nargs
!= 3 || nret
!= 1) {
170 rtas_st(rets
, 0, RTAS_OUT_PARAM_ERROR
);
174 id
= rtas_ld(args
, 0);
175 start
= rtas_ld(args
, 1);
176 r3
= rtas_ld(args
, 2);
178 cpu
= ppc_get_vcpu_by_dt_id(id
);
180 CPUState
*cs
= CPU(cpu
);
181 CPUPPCState
*env
= &cpu
->env
;
184 rtas_st(rets
, 0, RTAS_OUT_HW_ERROR
);
188 /* This will make sure qemu state is up to date with kvm, and
189 * mark it dirty so our changes get flushed back before the
191 kvm_cpu_synchronize_state(cs
);
193 env
->msr
= (1ULL << MSR_SF
) | (1ULL << MSR_ME
);
200 rtas_st(rets
, 0, RTAS_OUT_SUCCESS
);
204 /* Didn't find a matching cpu */
205 rtas_st(rets
, 0, RTAS_OUT_PARAM_ERROR
);
208 static void rtas_stop_self(PowerPCCPU
*cpu
, sPAPRMachineState
*spapr
,
209 uint32_t token
, uint32_t nargs
,
211 uint32_t nret
, target_ulong rets
)
213 CPUState
*cs
= CPU(cpu
);
214 CPUPPCState
*env
= &cpu
->env
;
219 * While stopping a CPU, the guest calls H_CPPR which
220 * effectively disables interrupts on XICS level.
221 * However decrementer interrupts in TCG can still
222 * wake the CPU up so here we disable interrupts in MSR
224 * As rtas_start_cpu() resets the whole MSR anyway, there is
225 * no need to bother with specific bits, we just clear it.
230 static void rtas_ibm_get_system_parameter(PowerPCCPU
*cpu
,
231 sPAPRMachineState
*spapr
,
232 uint32_t token
, uint32_t nargs
,
234 uint32_t nret
, target_ulong rets
)
236 target_ulong parameter
= rtas_ld(args
, 0);
237 target_ulong buffer
= rtas_ld(args
, 1);
238 target_ulong length
= rtas_ld(args
, 2);
239 target_ulong ret
= RTAS_OUT_SUCCESS
;
242 case RTAS_SYSPARM_SPLPAR_CHARACTERISTICS
: {
243 char *param_val
= g_strdup_printf("MaxEntCap=%d,MaxPlatProcs=%d",
245 rtas_st_buffer(buffer
, length
, (uint8_t *)param_val
, strlen(param_val
));
249 case RTAS_SYSPARM_DIAGNOSTICS_RUN_MODE
: {
250 uint8_t param_val
= DIAGNOSTICS_RUN_MODE_DISABLED
;
252 rtas_st_buffer(buffer
, length
, ¶m_val
, sizeof(param_val
));
255 case RTAS_SYSPARM_UUID
:
256 rtas_st_buffer(buffer
, length
, qemu_uuid
, (qemu_uuid_set
? 16 : 0));
259 ret
= RTAS_OUT_NOT_SUPPORTED
;
262 rtas_st(rets
, 0, ret
);
265 static void rtas_ibm_set_system_parameter(PowerPCCPU
*cpu
,
266 sPAPRMachineState
*spapr
,
267 uint32_t token
, uint32_t nargs
,
269 uint32_t nret
, target_ulong rets
)
271 target_ulong parameter
= rtas_ld(args
, 0);
272 target_ulong ret
= RTAS_OUT_NOT_SUPPORTED
;
275 case RTAS_SYSPARM_SPLPAR_CHARACTERISTICS
:
276 case RTAS_SYSPARM_DIAGNOSTICS_RUN_MODE
:
277 case RTAS_SYSPARM_UUID
:
278 ret
= RTAS_OUT_NOT_AUTHORIZED
;
282 rtas_st(rets
, 0, ret
);
285 static void rtas_ibm_os_term(PowerPCCPU
*cpu
,
286 sPAPRMachineState
*spapr
,
287 uint32_t token
, uint32_t nargs
,
289 uint32_t nret
, target_ulong rets
)
291 target_ulong ret
= 0;
293 qapi_event_send_guest_panicked(GUEST_PANIC_ACTION_PAUSE
, &error_abort
);
295 rtas_st(rets
, 0, ret
);
298 static void rtas_set_power_level(PowerPCCPU
*cpu
, sPAPRMachineState
*spapr
,
299 uint32_t token
, uint32_t nargs
,
300 target_ulong args
, uint32_t nret
,
303 int32_t power_domain
;
305 if (nargs
!= 2 || nret
!= 2) {
306 rtas_st(rets
, 0, RTAS_OUT_PARAM_ERROR
);
310 /* we currently only use a single, "live insert" powerdomain for
311 * hotplugged/dlpar'd resources, so the power is always live/full (100)
313 power_domain
= rtas_ld(args
, 0);
314 if (power_domain
!= -1) {
315 rtas_st(rets
, 0, RTAS_OUT_NOT_SUPPORTED
);
319 rtas_st(rets
, 0, RTAS_OUT_SUCCESS
);
320 rtas_st(rets
, 1, 100);
323 static void rtas_get_power_level(PowerPCCPU
*cpu
, sPAPRMachineState
*spapr
,
324 uint32_t token
, uint32_t nargs
,
325 target_ulong args
, uint32_t nret
,
328 int32_t power_domain
;
330 if (nargs
!= 1 || nret
!= 2) {
331 rtas_st(rets
, 0, RTAS_OUT_PARAM_ERROR
);
335 /* we currently only use a single, "live insert" powerdomain for
336 * hotplugged/dlpar'd resources, so the power is always live/full (100)
338 power_domain
= rtas_ld(args
, 0);
339 if (power_domain
!= -1) {
340 rtas_st(rets
, 0, RTAS_OUT_NOT_SUPPORTED
);
344 rtas_st(rets
, 0, RTAS_OUT_SUCCESS
);
345 rtas_st(rets
, 1, 100);
348 static bool sensor_type_is_dr(uint32_t sensor_type
)
350 switch (sensor_type
) {
351 case RTAS_SENSOR_TYPE_ISOLATION_STATE
:
352 case RTAS_SENSOR_TYPE_DR
:
353 case RTAS_SENSOR_TYPE_ALLOCATION_STATE
:
360 static void rtas_set_indicator(PowerPCCPU
*cpu
, sPAPRMachineState
*spapr
,
361 uint32_t token
, uint32_t nargs
,
362 target_ulong args
, uint32_t nret
,
365 uint32_t sensor_type
;
366 uint32_t sensor_index
;
367 uint32_t sensor_state
;
368 sPAPRDRConnector
*drc
;
369 sPAPRDRConnectorClass
*drck
;
371 if (nargs
!= 3 || nret
!= 1) {
372 rtas_st(rets
, 0, RTAS_OUT_PARAM_ERROR
);
376 sensor_type
= rtas_ld(args
, 0);
377 sensor_index
= rtas_ld(args
, 1);
378 sensor_state
= rtas_ld(args
, 2);
380 if (!sensor_type_is_dr(sensor_type
)) {
381 goto out_unimplemented
;
384 /* if this is a DR sensor we can assume sensor_index == drc_index */
385 drc
= spapr_dr_connector_by_index(sensor_index
);
387 DPRINTF("rtas_set_indicator: invalid sensor/DRC index: %xh\n",
389 rtas_st(rets
, 0, RTAS_OUT_PARAM_ERROR
);
392 drck
= SPAPR_DR_CONNECTOR_GET_CLASS(drc
);
394 switch (sensor_type
) {
395 case RTAS_SENSOR_TYPE_ISOLATION_STATE
:
396 /* if the guest is configuring a device attached to this
397 * DRC, we should reset the configuration state at this
398 * point since it may no longer be reliable (guest released
399 * device and needs to start over, or unplug occurred so
400 * the FDT is no longer valid)
402 if (sensor_state
== SPAPR_DR_ISOLATION_STATE_ISOLATED
) {
403 sPAPRConfigureConnectorState
*ccs
= spapr_ccs_find(spapr
,
406 spapr_ccs_remove(spapr
, ccs
);
409 drck
->set_isolation_state(drc
, sensor_state
);
411 case RTAS_SENSOR_TYPE_DR
:
412 drck
->set_indicator_state(drc
, sensor_state
);
414 case RTAS_SENSOR_TYPE_ALLOCATION_STATE
:
415 drck
->set_allocation_state(drc
, sensor_state
);
418 goto out_unimplemented
;
421 rtas_st(rets
, 0, RTAS_OUT_SUCCESS
);
425 /* currently only DR-related sensors are implemented */
426 DPRINTF("rtas_set_indicator: sensor/indicator not implemented: %d\n",
428 rtas_st(rets
, 0, RTAS_OUT_NOT_SUPPORTED
);
431 static void rtas_get_sensor_state(PowerPCCPU
*cpu
, sPAPRMachineState
*spapr
,
432 uint32_t token
, uint32_t nargs
,
433 target_ulong args
, uint32_t nret
,
436 uint32_t sensor_type
;
437 uint32_t sensor_index
;
438 sPAPRDRConnector
*drc
;
439 sPAPRDRConnectorClass
*drck
;
440 uint32_t entity_sense
;
442 if (nargs
!= 2 || nret
!= 2) {
443 rtas_st(rets
, 0, RTAS_OUT_PARAM_ERROR
);
447 sensor_type
= rtas_ld(args
, 0);
448 sensor_index
= rtas_ld(args
, 1);
450 if (sensor_type
!= RTAS_SENSOR_TYPE_ENTITY_SENSE
) {
451 /* currently only DR-related sensors are implemented */
452 DPRINTF("rtas_get_sensor_state: sensor/indicator not implemented: %d\n",
454 rtas_st(rets
, 0, RTAS_OUT_NOT_SUPPORTED
);
458 drc
= spapr_dr_connector_by_index(sensor_index
);
460 DPRINTF("rtas_get_sensor_state: invalid sensor/DRC index: %xh\n",
462 rtas_st(rets
, 0, RTAS_OUT_PARAM_ERROR
);
465 drck
= SPAPR_DR_CONNECTOR_GET_CLASS(drc
);
466 entity_sense
= drck
->entity_sense(drc
);
468 rtas_st(rets
, 0, RTAS_OUT_SUCCESS
);
469 rtas_st(rets
, 1, entity_sense
);
472 /* configure-connector work area offsets, int32_t units for field
473 * indexes, bytes for field offset/len values.
475 * as documented by PAPR+ v2.7, 13.5.3.5
477 #define CC_IDX_NODE_NAME_OFFSET 2
478 #define CC_IDX_PROP_NAME_OFFSET 2
479 #define CC_IDX_PROP_LEN 3
480 #define CC_IDX_PROP_DATA_OFFSET 4
481 #define CC_VAL_DATA_OFFSET ((CC_IDX_PROP_DATA_OFFSET + 1) * 4)
482 #define CC_WA_LEN 4096
484 static void rtas_ibm_configure_connector(PowerPCCPU
*cpu
,
485 sPAPRMachineState
*spapr
,
486 uint32_t token
, uint32_t nargs
,
487 target_ulong args
, uint32_t nret
,
493 sPAPRDRConnector
*drc
;
494 sPAPRDRConnectorClass
*drck
;
495 sPAPRConfigureConnectorState
*ccs
;
496 sPAPRDRCCResponse resp
= SPAPR_DR_CC_RESPONSE_CONTINUE
;
500 if (nargs
!= 2 || nret
!= 1) {
501 rtas_st(rets
, 0, RTAS_OUT_PARAM_ERROR
);
505 wa_addr
= ((uint64_t)rtas_ld(args
, 1) << 32) | rtas_ld(args
, 0);
507 drc_index
= rtas_ld(wa_addr
, 0);
508 drc
= spapr_dr_connector_by_index(drc_index
);
510 DPRINTF("rtas_ibm_configure_connector: invalid DRC index: %xh\n",
512 rc
= RTAS_OUT_PARAM_ERROR
;
516 drck
= SPAPR_DR_CONNECTOR_GET_CLASS(drc
);
517 fdt
= drck
->get_fdt(drc
, NULL
);
519 ccs
= spapr_ccs_find(spapr
, drc_index
);
521 ccs
= g_new0(sPAPRConfigureConnectorState
, 1);
522 (void)drck
->get_fdt(drc
, &ccs
->fdt_offset
);
523 ccs
->drc_index
= drc_index
;
524 spapr_ccs_add(spapr
, ccs
);
530 const struct fdt_property
*prop
;
531 int fdt_offset_next
, prop_len
;
533 tag
= fdt_next_tag(fdt
, ccs
->fdt_offset
, &fdt_offset_next
);
538 name
= fdt_get_name(fdt
, ccs
->fdt_offset
, NULL
);
540 /* provide the name of the next OF node */
541 wa_offset
= CC_VAL_DATA_OFFSET
;
542 rtas_st(wa_addr
, CC_IDX_NODE_NAME_OFFSET
, wa_offset
);
543 rtas_st_buffer_direct(wa_addr
+ wa_offset
, CC_WA_LEN
- wa_offset
,
544 (uint8_t *)name
, strlen(name
) + 1);
545 resp
= SPAPR_DR_CC_RESPONSE_NEXT_CHILD
;
549 if (ccs
->fdt_depth
== 0) {
550 /* done sending the device tree, don't need to track
553 drck
->set_configured(drc
);
554 spapr_ccs_remove(spapr
, ccs
);
556 resp
= SPAPR_DR_CC_RESPONSE_SUCCESS
;
558 resp
= SPAPR_DR_CC_RESPONSE_PREV_PARENT
;
562 prop
= fdt_get_property_by_offset(fdt
, ccs
->fdt_offset
,
564 name
= fdt_string(fdt
, fdt32_to_cpu(prop
->nameoff
));
566 /* provide the name of the next OF property */
567 wa_offset
= CC_VAL_DATA_OFFSET
;
568 rtas_st(wa_addr
, CC_IDX_PROP_NAME_OFFSET
, wa_offset
);
569 rtas_st_buffer_direct(wa_addr
+ wa_offset
, CC_WA_LEN
- wa_offset
,
570 (uint8_t *)name
, strlen(name
) + 1);
572 /* provide the length and value of the OF property. data gets
573 * placed immediately after NULL terminator of the OF property's
576 wa_offset
+= strlen(name
) + 1,
577 rtas_st(wa_addr
, CC_IDX_PROP_LEN
, prop_len
);
578 rtas_st(wa_addr
, CC_IDX_PROP_DATA_OFFSET
, wa_offset
);
579 rtas_st_buffer_direct(wa_addr
+ wa_offset
, CC_WA_LEN
- wa_offset
,
580 (uint8_t *)((struct fdt_property
*)prop
)->data
,
582 resp
= SPAPR_DR_CC_RESPONSE_NEXT_PROPERTY
;
585 resp
= SPAPR_DR_CC_RESPONSE_ERROR
;
587 /* keep seeking for an actionable tag */
591 ccs
->fdt_offset
= fdt_offset_next
;
593 } while (resp
== SPAPR_DR_CC_RESPONSE_CONTINUE
);
597 rtas_st(rets
, 0, rc
);
600 static struct rtas_call
{
603 } rtas_table
[RTAS_TOKEN_MAX
- RTAS_TOKEN_BASE
];
605 target_ulong
spapr_rtas_call(PowerPCCPU
*cpu
, sPAPRMachineState
*spapr
,
606 uint32_t token
, uint32_t nargs
, target_ulong args
,
607 uint32_t nret
, target_ulong rets
)
609 if ((token
>= RTAS_TOKEN_BASE
) && (token
< RTAS_TOKEN_MAX
)) {
610 struct rtas_call
*call
= rtas_table
+ (token
- RTAS_TOKEN_BASE
);
613 call
->fn(cpu
, spapr
, token
, nargs
, args
, nret
, rets
);
618 /* HACK: Some Linux early debug code uses RTAS display-character,
619 * but assumes the token value is 0xa (which it is on some real
620 * machines) without looking it up in the device tree. This
621 * special case makes this work */
623 rtas_display_character(cpu
, spapr
, 0xa, nargs
, args
, nret
, rets
);
627 hcall_dprintf("Unknown RTAS token 0x%x\n", token
);
628 rtas_st(rets
, 0, RTAS_OUT_PARAM_ERROR
);
632 void spapr_rtas_register(int token
, const char *name
, spapr_rtas_fn fn
)
634 if (!((token
>= RTAS_TOKEN_BASE
) && (token
< RTAS_TOKEN_MAX
))) {
635 fprintf(stderr
, "RTAS invalid token 0x%x\n", token
);
639 token
-= RTAS_TOKEN_BASE
;
640 if (rtas_table
[token
].name
) {
641 fprintf(stderr
, "RTAS call \"%s\" is registered already as 0x%x\n",
642 rtas_table
[token
].name
, token
);
646 rtas_table
[token
].name
= name
;
647 rtas_table
[token
].fn
= fn
;
650 int spapr_rtas_device_tree_setup(void *fdt
, hwaddr rtas_addr
,
655 uint32_t lrdr_capacity
[5];
656 MachineState
*machine
= MACHINE(qdev_get_machine());
658 ret
= fdt_add_mem_rsv(fdt
, rtas_addr
, rtas_size
);
660 fprintf(stderr
, "Couldn't add RTAS reserve entry: %s\n",
665 ret
= qemu_fdt_setprop_cell(fdt
, "/rtas", "linux,rtas-base",
668 fprintf(stderr
, "Couldn't add linux,rtas-base property: %s\n",
673 ret
= qemu_fdt_setprop_cell(fdt
, "/rtas", "linux,rtas-entry",
676 fprintf(stderr
, "Couldn't add linux,rtas-entry property: %s\n",
681 ret
= qemu_fdt_setprop_cell(fdt
, "/rtas", "rtas-size",
684 fprintf(stderr
, "Couldn't add rtas-size property: %s\n",
689 for (i
= 0; i
< RTAS_TOKEN_MAX
- RTAS_TOKEN_BASE
; i
++) {
690 struct rtas_call
*call
= &rtas_table
[i
];
696 ret
= qemu_fdt_setprop_cell(fdt
, "/rtas", call
->name
,
697 i
+ RTAS_TOKEN_BASE
);
699 fprintf(stderr
, "Couldn't add rtas token for %s: %s\n",
700 call
->name
, fdt_strerror(ret
));
706 lrdr_capacity
[0] = cpu_to_be32(((uint64_t)machine
->maxram_size
) >> 32);
707 lrdr_capacity
[1] = cpu_to_be32(machine
->maxram_size
& 0xffffffff);
708 lrdr_capacity
[2] = 0;
709 lrdr_capacity
[3] = cpu_to_be32(SPAPR_MEMORY_BLOCK_SIZE
);
710 lrdr_capacity
[4] = cpu_to_be32(max_cpus
/smp_threads
);
711 ret
= qemu_fdt_setprop(fdt
, "/rtas", "ibm,lrdr-capacity", lrdr_capacity
,
712 sizeof(lrdr_capacity
));
714 fprintf(stderr
, "Couldn't add ibm,lrdr-capacity rtas property\n");
721 static void core_rtas_register_types(void)
723 spapr_rtas_register(RTAS_DISPLAY_CHARACTER
, "display-character",
724 rtas_display_character
);
725 spapr_rtas_register(RTAS_POWER_OFF
, "power-off", rtas_power_off
);
726 spapr_rtas_register(RTAS_SYSTEM_REBOOT
, "system-reboot",
728 spapr_rtas_register(RTAS_QUERY_CPU_STOPPED_STATE
, "query-cpu-stopped-state",
729 rtas_query_cpu_stopped_state
);
730 spapr_rtas_register(RTAS_START_CPU
, "start-cpu", rtas_start_cpu
);
731 spapr_rtas_register(RTAS_STOP_SELF
, "stop-self", rtas_stop_self
);
732 spapr_rtas_register(RTAS_IBM_GET_SYSTEM_PARAMETER
,
733 "ibm,get-system-parameter",
734 rtas_ibm_get_system_parameter
);
735 spapr_rtas_register(RTAS_IBM_SET_SYSTEM_PARAMETER
,
736 "ibm,set-system-parameter",
737 rtas_ibm_set_system_parameter
);
738 spapr_rtas_register(RTAS_IBM_OS_TERM
, "ibm,os-term",
740 spapr_rtas_register(RTAS_SET_POWER_LEVEL
, "set-power-level",
741 rtas_set_power_level
);
742 spapr_rtas_register(RTAS_GET_POWER_LEVEL
, "get-power-level",
743 rtas_get_power_level
);
744 spapr_rtas_register(RTAS_SET_INDICATOR
, "set-indicator",
746 spapr_rtas_register(RTAS_GET_SENSOR_STATE
, "get-sensor-state",
747 rtas_get_sensor_state
);
748 spapr_rtas_register(RTAS_IBM_CONFIGURE_CONNECTOR
, "ibm,configure-connector",
749 rtas_ibm_configure_connector
);
752 type_init(core_rtas_register_types
)