librtas_src/librtas.h File Reference

#include <stdint.h>

Go to the source code of this file.

Defines

#define RTAS_KERNEL_INT   -1001
#define RTAS_KERNEL_IMP   -1002
#define RTAS_PERM   -1003
#define RTAS_NO_MEM   -1004
#define RTAS_NO_LOWMEM   -1005
#define RTAS_FREE_ERR   -1006
#define RTAS_TIMEOUT   -1007
#define RTAS_IO_ASSERT   -1098
#define RTAS_UNKNOWN_OP   -1099

Functions

int rtas_activate_firmware ()
 Interface for ibm,activate-firmware rtas call.
int rtas_cfg_connector (char *workarea)
 Interface for ibm,configure-connector rtas call.
int rtas_delay_timeout (uint64_t timeout_ms)
 Interface to retrieve the rtas timeout delay.
int rtas_display_char (char c)
 Interface for display-character rtas call.
int rtas_display_msg (char *buf)
 Interface for ibm,display-message rtas call.
int rtas_errinjct (int etoken, int otoken, char *workarea)
 Interface to the ibm,errinjct rtas call.
int rtas_errinjct_close (int otoken)
 Inerface to close the ibm,errinjct facility.
int rtas_errinjct_open (int *otoken)
 Interface to open the ibm,errinjct facility.
int rtas_free_rmo_buffer (void *buf, uint32_t phys_addr, size_t size)
 free the rmo buffer used by librtas
int rtas_get_dynamic_sensor (int sensor, void *loc_code, int *state)
 Interface to ibm,get-dynamic-sensor-state rtas call.
int rtas_get_indices (int is_sensor, int type, char *workarea, size_t size, int start, int *next)
 Interface to the ibm,get-indices rtas call.
int rtas_get_power_level (int powerdomain, int *level)
 Interface to the get-power-level rtas call.
int rtas_get_rmo_buffer (size_t size, void **buf, uint32_t *phys_addr)
 Retrive the RMO buffer used by librtas.
int rtas_get_sensor (int sensor, int index, int *state)
 Interface to the get-sensor-state rtas call.
int rtas_get_sysparm (unsigned int parameter, unsigned int length, char *data)
 Interface to the ibm,get-system-parameter rtas call.
int rtas_get_time (uint32_t *year, uint32_t *month, uint32_t *day, uint32_t *hour, uint32_t *min, uint32_t *sec, uint32_t *nsec)
 Interface to get-time-of-day rtas call.
int rtas_get_vpd (char *loc_code, char *workarea, size_t size, unsigned int sequence, unsigned int *seq_next, unsigned int *bytes_ret)
 Interface to the ibm,get-vpd rtas call.
int rtas_lpar_perftools (int subfunc, char *workarea, unsigned int length, unsigned int sequence, unsigned int *seq_next)
 Interface to the ibm,lpa-perftools rtas call.
int rtas_platform_dump (uint64_t dump_tag, uint64_t sequence, void *buffer, size_t length, uint64_t *next_seq, uint64_t *bytes_ret)
int rtas_read_slot_reset (uint32_t cfg_addr, uint64_t phbid, int *state, int *eeh)
 Interface to the ibm,read-slot-reset-state rtas call.
int rtas_scan_log_dump (void *buffer, size_t length)
 Interface to the ibm,scan-log-dump rtas call.
int rtas_set_debug (int level)
 Interface to set librtas debug level.
int rtas_set_dynamic_indicator (int indicator, int new_value, void *loc_code)
 Interface to the ibm,set-dynamic-indicator rtas call.
int rtas_set_eeh_option (uint32_t cfg_addr, uint64_t phbid, int function)
 Inerface to the ibm,set-eeh-option rtas call.
int rtas_set_indicator (int indicator, int index, int new_value)
 Interface to the set-indicator rtas call.
int rtas_set_power_level (int powerdomain, int level, int *setlevel)
 Interface to the set-power-level rtas call.
int rtas_set_poweron_time (uint32_t year, uint32_t month, uint32_t day, uint32_t hour, uint32_t min, uint32_t sec, uint32_t nsec)
 interface to the set-time-for-power-on rtas call
int rtas_set_sysparm (unsigned int parameter, char *data)
 Interface to the ibm,set-system-parameter rtas call.
int rtas_set_time (uint32_t year, uint32_t month, uint32_t day, uint32_t hour, uint32_t min, uint32_t sec, uint32_t nsec)
 Interface to the set-time-of-day rtas call.


Detailed Description

Copyright (C) 2005 IBM Corporation Common Public License Version 1.0 (see COPYRIGHT)

Author:
John Rose <johnrose@us.ibm.com>

Define Documentation

#define RTAS_FREE_ERR   -1006

#define RTAS_IO_ASSERT   -1098

#define RTAS_KERNEL_IMP   -1002

#define RTAS_KERNEL_INT   -1001

#define RTAS_NO_LOWMEM   -1005

#define RTAS_NO_MEM   -1004

#define RTAS_PERM   -1003

#define RTAS_TIMEOUT   -1007

#define RTAS_UNKNOWN_OP   -1099


Function Documentation

int rtas_activate_firmware (  ) 

rtas_activate_firmware

Returns:
0 on success, !0 on failure

int rtas_cfg_connector ( char *  workarea  ) 

rtas_cfg_connector

Parameters:
workarea buffer containg args to ibm,configure-connector
Returns:
0 on success, !0 on failure

int rtas_delay_timeout ( uint64_t  timeout_ms  ) 

rtas_delay_timeout

Parameters:
timeout_ms timeout in milli-seconds
Returns:
delay time

int rtas_display_char ( char  c  ) 

rtas_diaply_char

Parameters:
c character to display
Returns:
0 on success, !0 otherwise

int rtas_display_msg ( char *  buf  ) 

rtas_diaplay_msg

Parameters:
buf message to display
Returns:
0 on success, !0 otherwise

int rtas_errinjct ( int  etoken,
int  otoken,
char *  workarea 
)

rtas_errinjct

Parameters:
etoken errinjct token
otoken errinjct open token
workarea additional args to ibm,errinjct
Returns:
0 on success, !0 otherwise

int rtas_errinjct_close ( int  otoken  ) 

rtas_errinjct_close

Parameters:
otoken errinjct open token
Returns:
0 on success, !0 otherwise

int rtas_errinjct_open ( int *  otoken  ) 

rtas_errinjct_open

This call will set the value refrenced by otoken to the open token for the ibm,errinjct facility

Parameters:
otoken pointer to open token
Returns:
0 on success, !0 otherwise

int rtas_free_rmo_buffer ( void *  buf,
uint32_t  phys_addr,
size_t  size 
)

rtas_free_rmp_buffer

Parameters:
buf rmo buffer to free
phys_addr physical address of the buffer
size buf size
Returns:
0 on success, !0 otherwise

int rtas_get_dynamic_sensor ( int  sensor,
void *  loc_code,
int *  state 
)

rtas_get_dynamic_sensor

On success the variable referenced by the state parameter will contain the state of the sensor

Parameters:
sensor sensor to retrieve
loc_code location code of the sensor
state reference to state variable
Returns:
0 on success, !0 otherwise

int rtas_get_indices ( int  is_sensor,
int  type,
char *  workarea,
size_t  size,
int  start,
int *  next 
)

rtas_get_indices

Parameters:
is_sensor is this index a sensor?
type 
workarea additional args to the rtas call
size 
start 
next 
Returns:
0 on success, !0 otherwise

int rtas_get_power_level ( int  powerdomain,
int *  level 
)

rtas_get_power_level

On success this routine will set the variable referenced by the level parameter to the power level

Parameters:
powerdomain 
level reference to the power level variable
Returns:
0 on success, !0 otherwise

int rtas_get_rmo_buffer ( size_t  size,
void **  buf,
uint32_t *  phys_addr 
)

rtas_get_rmo_buffer

On successful completion the buf parameter will reference an allocated area of RMO memory and the phys_addr parameter will refernce the physical address of the RMO buffer.

Parameters:
size buffer size to retrieve
buf reference to buffer pointer
phys_addr reference to the phys_addr variable
Returns:
0 on success, !0 otherwise

int rtas_get_sensor ( int  sensor,
int  index,
int *  state 
)

rtas_get_sensor

On successful completion the state parameter will reference the current state of the sensor

Parameters:
sensor 
index sensor index
state reference to state variable
Returns:
0 on success, !0 otherwise

int rtas_get_sysparm ( unsigned int  parameter,
unsigned int  length,
char *  data 
)

rtas_get_sysparm

On successful completion the data parameter will contain the system parameter results

Parameters:
parameter system parameter to retrieve
length data buffer length
data reference to buffer to return parameter in
Returns:
0 on success, !0 otherwise

int rtas_get_time ( uint32_t *  year,
uint32_t *  month,
uint32_t *  day,
uint32_t *  hour,
uint32_t *  min,
uint32_t *  sec,
uint32_t *  nsec 
)

rtas_get_time

On successful completion all of the parameters will be filled with their respective values for the current time of day.

Parameters:
year 
month 
day 
hour 
min 
sec 
nsec 
Returns:
0 on success, !0 otherwise

int rtas_get_vpd ( char *  loc_code,
char *  workarea,
size_t  size,
unsigned int  sequence,
unsigned int *  seq_next,
unsigned int *  bytes_ret 
)

rtas_get_vpd

Parameters:
loc_code location code
workarea additional args to rtas call
size 
sequence 
seq_next 
bytes_ret 
Returns:
0 on success, !0 otherwise

int rtas_lpar_perftools ( int  subfunc,
char *  workarea,
unsigned int  length,
unsigned int  sequence,
unsigned int *  seq_next 
)

rtas_lpar_perftools

Parameters:
subfunc 
workarea additional args to the rtas call
length 
sequence 
seq_next 
Returns:
0 on success, !0 otherwise

int rtas_platform_dump ( uint64_t  dump_tag,
uint64_t  sequence,
void *  buffer,
size_t  length,
uint64_t *  next_seq,
uint64_t *  bytes_ret 
)

rtas_platform_dump Interface to the ibm,platform-dump rtas call

Parameters:
dump_tag 
sequence 
buffer buffer to write dump to
length buffer length
next_seq 
bytes_ret 
Returns:
0 on success, !0 othwerwise

int rtas_read_slot_reset ( uint32_t  cfg_addr,
uint64_t  phbid,
int *  state,
int *  eeh 
)

rtas_read_slot_reset

Parameters:
cfg_addr configuration address of slot to read
phbid PHB ID of the slot to read
state reference to variable to return slot state in
eeh 
Returns:
0 on success, !0 otherwise

int rtas_scan_log_dump ( void *  buffer,
size_t  length 
)

rtas_scan_log_dump

Parameters:
buffer buffer to return scan log dump in
length size of buffer
Returns:
0 on success, !0 otherwise

int rtas_set_debug ( int  level  ) 

rtas_set_debug

Parameters:
level debug level to set to
Returns:
0 on success, !0 otherwise

int rtas_set_dynamic_indicator ( int  indicator,
int  new_value,
void *  loc_code 
)

rtas_set_dynamic_indicator

Parameters:
indicator indicator to set
new_value value to set the indicator to
loc_code 
Returns:
0 on success, !0 otherwise

int rtas_set_eeh_option ( uint32_t  cfg_addr,
uint64_t  phbid,
int  function 
)

rtas_set_eeh_option

Parameters:
cfg_addr configuration address for slot to set eeh option on
phbid PHB ID for slot to set option on
function 
Returns:
0 on success, !0 otherwise

int rtas_set_indicator ( int  indicator,
int  index,
int  new_value 
)

rtas_set_indicator

Parameters:
indicator indicator to set
index indicator index
new_value value to set the indicator to
Returns:
0 on success, !0 otherwise

int rtas_set_power_level ( int  powerdomain,
int  level,
int *  setlevel 
)

rtas_set_power_level

Parameters:
powerdomain 
level power level to set to
setlevel 
Returns:
0 on success, !0 otherwise

int rtas_set_poweron_time ( uint32_t  year,
uint32_t  month,
uint32_t  day,
uint32_t  hour,
uint32_t  min,
uint32_t  sec,
uint32_t  nsec 
)

rtas_set_poweron_time

Parameters:
year year to power on
month month to power on
day day to power on
hour hour to power on
min minute to power on
sec second to power on
nsec nano-second top power on
Returns:
0 on success, !0 otherwise

int rtas_set_sysparm ( unsigned int  parameter,
char *  data 
)

rtas_set_sysparm

Parameters:
parameter 
data 
Returns:
0 on success, !0 otherwise

int rtas_set_time ( uint32_t  year,
uint32_t  month,
uint32_t  day,
uint32_t  hour,
uint32_t  min,
uint32_t  sec,
uint32_t  nsec 
)

rtas_set_time

Parameters:
year year to set time to
month month to set time to
day day to set time to
hour hour to set time to
min minute to set time to
sec second to set time to
nsec nan-second to set time to
Returns:
0 on success, !0 otherwise


Generated on Sat Sep 22 08:52:51 2007 for librtas by  doxygen 1.5.3