1 #ifndef _ASMPOWERPC_RTAS_H_ 2 #define _ASMPOWERPC_RTAS_H_ 3 /* 4 * Copyright (C) 2016, Red Hat Inc, Andrew Jones <drjones@redhat.com> 5 * 6 * This work is licensed under the terms of the GNU LGPL, version 2. 7 */ 8 9 #ifndef __ASSEMBLY__ 10 11 #include <libcflat.h> 12 13 #define RTAS_UNKNOWN_SERVICE (-1) 14 15 struct rtas_args { 16 u32 token; 17 u32 nargs; 18 u32 nret; 19 u32 args[16]; 20 u32 *rets; 21 }; 22 23 extern void rtas_init(void); 24 extern int rtas_token(const char *service); 25 extern int rtas_call(int token, int nargs, int nret, int *outputs, ...); 26 27 extern void rtas_power_off(void); 28 #endif /* __ASSEMBLY__ */ 29 30 #define RTAS_MSR_MASK 0xfffffffffffffffe 31 32 #endif /* _ASMPOWERPC_RTAS_H_ */ 33