Debian Codegraph @

librtas_src/librtas.h

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
1 /**
2 * @file librtas.h
3 *
4 * Copyright (C) 2005 IBM Corporation
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 *
20 * @author John Rose <[email protected]>
21 */
22
23 #ifndef _LIBRTAS_H_
24 #define _LIBRTAS_H_cxx . . $ `librtas_src/librtas.h:24:9`!
25
26 #include <stdio.h>
27 #include <unistd.h>
28 #include <sys/types.h>
29 #include <stdint.h>
30
31 #define RTAS_KERNEL_INTcxx . . $ `librtas_src/librtas.h:31:9`! -1001 /* No Kernel Interface to Firmware */
32 #define RTAS_KERNEL_IMPcxx . . $ `librtas_src/librtas.h:32:9`! -1002 /* No Kernel Implementation of Function */
33 #define RTAS_PERMcxx . . $ `librtas_src/librtas.h:33:9`! -1003 /* Non-root caller */
34 #define RTAS_NO_MEMcxx . . $ `librtas_src/librtas.h:34:9`! -1004 /* Out of heap memory */
35 #define RTAS_NO_LOWMEMcxx . . $ `librtas_src/librtas.h:35:9`! -1005 /* Kernel out of low memory */
36 #define RTAS_FREE_ERRcxx . . $ `librtas_src/librtas.h:36:9`! -1006 /* Attempt to free nonexistant rmo buffer */
37 #define RTAS_TIMEOUTcxx . . $ `librtas_src/librtas.h:37:9`! -1007 /* RTAS delay exceeded specified timeout */
38 #define RTAS_IO_ASSERTcxx . . $ `librtas_src/librtas.h:38:9`! -1098 /* Unexpected I/O Error */
39 #define RTAS_UNKNOWN_OPcxx . . $ `librtas_src/librtas.h:39:9`! -1099 /* No Firmware Implementation of Function */
40
41 #define RC_BUSYcxx . . $ `librtas_src/librtas.h:41:9`! -2
42 #define EXTENDED_DELAY_MINcxx . . $ `librtas_src/librtas.h:42:9`! 9900
43 #define EXTENDED_DELAY_MAXcxx . . $ `librtas_src/librtas.h:43:9`! 9905
44
45 #define PAGE_SIZEcxx . . $ `librtas_src/librtas.h:45:9`! 4096
46
47 /* Adding a new RTAS call requires the following:
48 * 1) A function prototype in librtas.h (this file) that roughly matches
49 * the RTAS call name.
50 * 2) An implementation of the RTAS function, in syscall_calls.c.
51 */
52
53 #ifdef __cplusplus
54 extern "C" {
55 #endif
56
•57 extern int rtas_activate_firmwarecxx . . $ rtas_activate_firmware(b126dc7c1de90089).(void);
58 extern int rtas_cfg_connectorcxx . . $ rtas_cfg_connector(1ef8e6ec083aabb9).(char *workarea);
59 extern int rtas_delay_timeoutcxx . . $ rtas_delay_timeout(15f694ef3c96d230).(uint64_tcxx . . $ uint64_t# timeout_ms);
60 extern int rtas_display_charcxx . . $ rtas_display_char(784f3405e7e545be).(char c);
61 extern int rtas_display_msgcxx . . $ rtas_display_msg(1ef8e6ec083aabb9).(char *buf);
62 extern int rtas_errinjctcxx . . $ rtas_errinjct(56759362374d8228).(int etoken, int otoken, char *workarea);
63 extern int rtas_errinjct_closecxx . . $ rtas_errinjct_close(7864480464b09eea).(int otoken);
64 extern int rtas_errinjct_opencxx . . $ rtas_errinjct_open(a5f7824ee4986326).(int *otoken);
65 extern int rtas_free_rmo_buffercxx . . $ rtas_free_rmo_buffer(c9796fb14536dffe).(void *buf, uint32_tcxx . . $ uint32_t# phys_addr, size_tcxx . . $ size_t# size);
66 extern int rtas_get_config_addr_info2cxx . . $ rtas_get_config_addr_info2(7aee3dcb9e5b32a8).(uint32_tcxx . . $ uint32_t# cfg_addr, uint64_tcxx . . $ uint64_t# phb_id,
67 uint32_tcxx . . $ uint32_t# func, uint32_tcxx . . $ uint32_t# *info);
68 extern int rtas_get_dynamic_sensorcxx . . $ rtas_get_dynamic_sensor(a22c2d54317da14e).(int sensor, void *loc_code, int *state);
69 extern int rtas_get_indicescxx . . $ rtas_get_indices(c28faa08869e4f72).(int is_sensor, int type, char *workarea,
70 size_tcxx . . $ size_t# size, int start, int *next);
71 extern int rtas_get_power_levelcxx . . $ rtas_get_power_level(ac48f4a6ffa9e770).(int powerdomain, int *level);
72 extern int rtas_get_rmo_buffercxx . . $ rtas_get_rmo_buffer(e1343ecdff5b8592).(size_tcxx . . $ size_t# size, void **buf, uint32_tcxx . . $ uint32_t# *phys_addr);
73 extern int rtas_get_sensorcxx . . $ rtas_get_sensor(a70663c39545b942).(int sensor, int index, int *state);
74 extern int rtas_get_sysparmcxx . . $ rtas_get_sysparm(6e5ef277f6fa70a7).(unsigned int parameter, unsigned int length,
75 char *data);
76 extern int rtas_get_timecxx . . $ rtas_get_time(619f6df23500976e).(uint32_tcxx . . $ uint32_t# *year, uint32_tcxx . . $ uint32_t# *month, uint32_tcxx . . $ uint32_t# *day,
77 uint32_tcxx . . $ uint32_t# *hour, uint32_tcxx . . $ uint32_t# *min, uint32_tcxx . . $ uint32_t# *sec,
78 uint32_tcxx . . $ uint32_t# *nsec);
79 extern int rtas_get_vpdcxx . . $ rtas_get_vpd(72d25d676ef264d8).(char *loc_code, char *workarea, size_tcxx . . $ size_t# size,
80 unsigned int sequence, unsigned int *seq_next,
81 unsigned int *bytes_ret);
82 extern int rtas_lpar_perftoolscxx . . $ rtas_lpar_perftools(7a733572099d8514).(int subfunc, char *workarea,
83 unsigned int length, unsigned int sequence,
84 unsigned int *seq_next);
85 extern int rtas_platform_dumpcxx . . $ rtas_platform_dump(ca532b08f6c4ad1d).(uint64_tcxx . . $ uint64_t# dump_tag, uint64_tcxx . . $ uint64_t# sequence,
86 void *buffer, size_tcxx . . $ size_t# length,
87 uint64_tcxx . . $ uint64_t# *next_seq, uint64_tcxx . . $ uint64_t# *bytes_ret);
88 extern int rtas_read_slot_resetcxx . . $ rtas_read_slot_reset(29760348b805af23).(uint32_tcxx . . $ uint32_t# cfg_addr, uint64_tcxx . . $ uint64_t# phbid, int *state,
89 int *eeh);
90 extern int rtas_scan_log_dumpcxx . . $ rtas_scan_log_dump(c0a5f96701d3f89).(void *buffer, size_tcxx . . $ size_t# length);
91 extern int rtas_set_debugcxx . . $ rtas_set_debug(7864480464b09eea).(int level);
92 extern int rtas_set_dynamic_indicatorcxx . . $ rtas_set_dynamic_indicator(a62691832b3fe527).(int indicator, int new_value,
93 void *loc_code);
94 extern int rtas_set_eeh_optioncxx . . $ rtas_set_eeh_option(31077bcf225e2be0).(uint32_tcxx . . $ uint32_t# cfg_addr, uint64_tcxx . . $ uint64_t# phbid,
95 int function);
96 extern int rtas_set_indicatorcxx . . $ rtas_set_indicator(2326284602b0bb2d).(int indicator, int index, int new_value);
97 extern int rtas_set_power_levelcxx . . $ rtas_set_power_level(a70663c39545b942).(int powerdomain, int level, int *setlevel);
98 extern int rtas_set_poweron_timecxx . . $ rtas_set_poweron_time(3187a5aa78a61243).(uint32_tcxx . . $ uint32_t# year, uint32_tcxx . . $ uint32_t# month, uint32_tcxx . . $ uint32_t# day,
99 uint32_tcxx . . $ uint32_t# hour, uint32_tcxx . . $ uint32_t# min, uint32_tcxx . . $ uint32_t# sec,
100 uint32_tcxx . . $ uint32_t# nsec);
101 extern int rtas_set_sysparmcxx . . $ rtas_set_sysparm(fa84e865f2d62ca9).(unsigned int parameter, char *data);
102 extern int rtas_set_timecxx . . $ rtas_set_time(3187a5aa78a61243).(uint32_tcxx . . $ uint32_t# year, uint32_tcxx . . $ uint32_t# month, uint32_tcxx . . $ uint32_t# day,
103 uint32_tcxx . . $ uint32_t# hour, uint32_tcxx . . $ uint32_t# min, uint32_tcxx . . $ uint32_t# sec,
104 uint32_tcxx . . $ uint32_t# nsec);
105 extern int rtas_suspend_mecxx . . $ rtas_suspend_me(15f694ef3c96d230).(uint64_tcxx . . $ uint64_t# streamid);
106 extern int rtas_update_nodescxx . . $ rtas_update_nodes(8fa947920630fc02).(char *workarea, unsigned int scope);
107 extern int rtas_update_propertiescxx . . $ rtas_update_properties(8fa947920630fc02).(char *workarea, unsigned int scope);
108 extern int rtas_physical_attestationcxx . . $ rtas_physical_attestation(7cd0d83f39f6204).(char *workarea, int seq_num,
109 int *next_seq_num, int *work_area_bytes);
110
111 #ifdef __cplusplus
112 }
113 #endif
114
115 #endif /* _LIBRTAS_H_ */