00001 00011 #ifndef _H_RE_V6_RTAS_EVENT 00012 #define _H_RE_V6_RTAS_EVENT 00013 00014 #include <inttypes.h> 00015 00024 struct rtas_v6_scn_hdr { 00025 char id[2]; 00026 uint32_t length:16; 00027 uint32_t version:8; 00028 uint32_t subtype:8; 00029 uint32_t creator_comp_id:16; 00030 }; 00031 00032 /* defines for the rtas_event_scn id */ 00033 #define RTAS_DUMP_SCN_ID "DH" 00034 #define RTAS_EPOW_SCN_ID "EP" 00035 #define RTAS_HMC_SCN_ID "HM" 00036 #define RTAS_IO_SCN_ID "IE" 00037 #define RTAS_IP_SCN_ID "LP" 00038 #define RTAS_LRI_SCN_ID "LR" 00039 #define RTAS_MI_SCN_ID "MI" 00040 #define RTAS_MTMS_SCN_ID "MT" 00041 #define RTAS_PSRC_SCN_ID "PS" 00042 #define RTAS_SSRC_SCN_ID "SS" 00043 #define RTAS_SW_SCN_ID "SW" 00044 #define RTAS_UDD_SCN_ID "UD" 00045 00050 struct rtas_v6_main_a_scn { 00051 struct rtas_v6_scn_hdr shdr; 00052 00053 struct rtas_date date; 00054 struct rtas_time time; 00055 #if 0 00056 /* Date of log creation */ 00057 union { 00058 uint32_t _maina_bcddate:32; 00059 struct date { 00060 uint32_t _maina_year:16; 00061 uint32_t _maina_month:8; 00062 uint32_t _maina_day:8; 00063 }_maina_s1; 00064 } _maina_u1; 00065 #define maina_bcddate _maina_u1._maina_bcddate 00066 #define maina_date_year _maina_u1._maina_s1._maina_year 00067 #define maina_date_month _maina_u1._maina_s1._maina_month 00068 #define maina_date_day _maina_u1._maina_s1._maina_day 00069 00070 /* Time of log creation */ 00071 union { 00072 uint32_t _miana_bcdtime:32; 00073 struct time { 00074 uint32_t _miana_hour:8; 00075 uint32_t _miana_minutes:8; 00076 uint32_t _miana_seconds:8; 00077 uint32_t _miana_hundredths:8; 00078 } _miana_s2; 00079 } _miana_u2; 00080 #define maina_bcdtime _miana_u2._miana_bcdtime 00081 #define maina_time_hour _miana_u2._miana_s2._miana_hour 00082 #define maina_time_minutes _miana_u2._miana_s2._miana_minutes 00083 #define maina_time_seconds _miana_u2._miana_s2._miana_seconds 00084 #define maina_time_hundredths _miana_u2._miana_s2._miana_hundredths 00085 00086 #endif 00087 char platform_data[8]; 00088 char creator_id; 00089 #define RTAS_MAINA_CREAT_SERVICE_PROC 'E' 00090 #define RTAS_MAINA_CREAT_HYPERVISOR 'H' 00091 #define RTAS_MAINA_CREAT_POWER_CONTROL 'W' 00092 #define RTAS_MAINA_CREAT_PARTITION_FW 'L' 00093 00094 uint32_t /* reserved */ :16; 00095 uint32_t scn_count:8; 00097 uint32_t /* reserved */ :32; 00098 char platform_data2[8]; 00099 uint32_t plid:32; 00100 char platform_data3[4]; 00101 }; 00102 00107 struct rtas_v6_main_b_scn { 00108 struct rtas_v6_scn_hdr shdr; 00109 00110 uint32_t subsystem_id:8; 00111 char platform_data; 00112 uint32_t event_type:8; 00113 uint32_t event_subtype:8; 00114 #define RTAS_MAINB_SUBTYPE_NA 0x00 00115 #define RTAS_MAINB_SUBTYPE_INFO_ONLY 0x01 00116 #define RTAS_MAINB_SUBTYPE_DUMP_NOTIFICATION 0x08 00117 #define RTAS_MAINB_SUBTYPE_PREVIOUSLY_REPORTED 0x10 00118 #define RTAS_MAINB_SUBTYPE_DECONFIG_USER 0x20 00119 #define RTAS_MAINB_SUBTYPE_DECONFIG_SYSTEM 0x21 00120 #define RTAS_MAINB_SUBTYPE_RETURN_TO_NORMAL 0x30 00121 #define RTAS_MAINB_SUBTYPE_CONCURRENT_MAINT 0x40 00122 #define RTAS_MAINB_SUBTYPE_CAPACITY UPGRADE 0x60 00123 #define RTAS_MAINB_SUBTYPE_RESOURCE_SPARING 0x70 00124 #define RTAS_MAINB_SUBTYPE_DYNAMIC_RECONFIG 0x80 00125 #define RTAS_MAINB_SUBTYPE_NORMAL_SHUTDOWN 0xD0 00126 #define RTAS_MAINB_SUBTYPE_ABNORMAL_SHUTDOWN 0xE0 00127 00128 char platform_data2[4]; 00129 uint32_t /* reserved */ :16; 00130 uint32_t action:16; 00131 #define RTAS_MAINB_ACTION_SERVICE 0x8000 00132 #define RTAS_MAINB_ACTION_HIDDEN 0x4000 00133 #define RTAS_MAINB_ACTION_REPORT_EXTERNALLY 0x2000 00134 #define RTAS_MAINB_ACTION_HMC_ONLY 0x1000 00135 #define RTAS_MAINB_ACTION_CALL_HOME 0x0800 00136 #define RTAS_MAINB_ACTION_ISO_INCOMPLETE 0x0400 00137 00138 uint32_t /* reserved */ :32; 00139 }; 00140 00148 struct rtas_v6_ibm_platform_event { 00149 char pe_ibm[4]; 00150 struct rtas_v6_main_a_scn pe_main_a; 00151 struct rtas_v6_main_b_scn pe_main_b; 00152 }; 00153 00158 struct rtas_v6_dump_scn { 00159 struct rtas_v6_scn_hdr shdr; 00160 /*These defines are for the shdr.subtype field in dump sections */ 00161 #define RTAS_DUMP_SUBTYPE_FSP 0x01 00162 #define RTAS_DUMP_SUBTYPE_PLATFORM 0x02 00163 #define RTAS_DUMP_SUBTYPE_SMA 0x03 00164 #define RTAS_DUMP_SUBTYPE_POWER 0x04 00165 #define RTAS_DUMP_SUBTYPE_LOG 0x05 00166 00167 uint32_t id:32; 00168 uint32_t location:1; 00170 uint32_t fname_type:1; 00172 uint32_t size_valid:1; 00174 uint32_t /* reserved */ :5; 00175 uint32_t /* reserved */ :16; 00176 uint32_t id_len:8; 00178 uint32_t size_hi:32; 00179 uint32_t size_lo:32; 00180 char os_id[40]; 00181 }; 00182 00187 struct rtas_v6_epow_scn { 00188 struct rtas_v6_scn_hdr shdr; 00189 00190 uint32_t sensor_value:4; 00191 uint32_t action_code:4; 00192 #define RTAS_EPOW_ACTION_RESET 0x00 00193 #define RTAS_EPOW_ACTION_WARN_COOLING 0x01 00194 #define RTAS_EPOW_ACTION_WARN_POWER 0x02 00195 #define RTAS_EPOW_ACTION_SYSTEM_SHUTDOWN 0x03 00196 #define RTAS_EPOW_ACTION_SYSTEM_HALT 0x04 00197 #define RTAS_EPOW_ACTION_MAIN_ENCLOSURE 0x05 00198 #define RTAS_EPOW_ACTION_POWER_OFF 0x07 00199 00200 uint32_t event_modifier:8; 00201 #define RTAS_EPOW_MOD_NA 0x00 00202 #define RTAS_EPOW_MOD_NORMAL_SHUTDOWN 0x01 00203 #define RTAS_EPOW_MOD_UTILITY_POWER_LOSS 0x02 00204 #define RTAS_EPOW_MOD_CRIT_FUNC_LOSS 0x03 00205 00206 uint32_t /* reserved */ :16; 00207 char reason_code[8]; 00208 }; 00209 00214 struct rtas_v6_io_scn { 00215 struct rtas_v6_scn_hdr shdr; 00216 00217 uint32_t event_type:8; 00218 #define RTAS_IO_TYPE_DETECTED 0x01 00219 #define RTAS_IO_TYPE_RECOVERED 0x02 00220 #define RTAS_IO_TYPE_EVENT 0x03 00221 #define RTAS_IO_TYPE_RPC_PASS_THRU 0x04 00222 00223 uint32_t rpc_length:8; 00227 uint32_t scope:8; 00228 #define RTAS_IO_SCOPE_NA 0x00 00229 #define RTAS_IO_SCOPE_RIO_HUB 0x36 00230 #define RTAS_IO_SCOPE_RIO_BRIDGE 0x37 00231 #define RTAS_IO_SCOPE_PHB 0x38 00232 #define RTAS_IO_SCOPE_EADS_GLOBAL 0x39 00233 #define RTAS_IO_SCOPE_EADS_SLOT 0x3A 00234 00235 uint32_t subtype:8; 00236 #define RTAS_IO_SUBTYPE_NA 0x00 00237 #define RTAS_IO_SUBTYPE_REBALANCE 0x01 00238 #define RTAS_IO_SUBTYPE_NODE_ONLINE 0x02 00239 #define RTAS_IO_SUBTYPE_NODE_OFFLINE 0x04 00240 00241 uint32_t drc_index:32; 00242 }; 00243 00248 struct rtas_v6_lri_scn { 00249 struct rtas_v6_scn_hdr shdr; 00250 00251 uint32_t resource:8; 00252 #define RTAS_LRI_RES_PROC 0x10 00253 #define RTAS_LRI_RES_SHARED_PROC 0x11 00254 #define RTAS_LRI_RES_MEM_PAGE 0x40 00255 #define RTAS_LRI_RES_MEM_LMB 0x41 00256 00257 uint32_t /* reserved */ :8; 00258 uint32_t capacity:16; 00260 union { 00261 uint32_t _lri_cpu_id:32; 00262 uint32_t _lri_drc_index:32; 00263 uint32_t _lri_mem_addr_lo; 00265 } _lri_u1; 00266 #define lri_cpu_id _lri_u1._lri_cpu_id 00267 #define lri_drc_index _lri_u1._lri_drc_index 00268 #define lri_mem_addr_lo _lri_u1._lri_mem_addr_lo 00269 00270 uint32_t lri_mem_addr_hi:32; 00272 }; 00273 00274 00279 struct rtas_v6_fru_scn { 00280 uint32_t length:8; 00281 uint32_t type:4; 00282 uint32_t subscn_included:1; 00283 uint32_t other_platform_data:1; 00286 uint32_t other_platform_data2:2; 00288 char priority; 00289 #define RTAS_FRU_PRIORITY_HIGH 'H' 00290 #define RTAS_FRU_PRIORITY_MEDIUM 'M' 00291 #define RTAS_FRU_PRIORITY_MEDIUM_A 'A' 00292 #define RTAS_FRU_PRIORITY_MEDIUM_B 'B' 00293 #define RTAS_FRU_PRIORITY_MEDIUM_C 'C' 00294 #define RTAS_FRU_PRIORITY_LOW 'L' 00295 00296 uint32_t loc_code_length:8; 00297 }; 00298 00308 struct rtas_v6_fru_subscn { 00309 char id[2]; 00310 uint32_t length:8; 00311 uint32_t component:4; 00312 #define RTAS_FRU_COMP_HARDWARE 0x01 00313 #define RTAS_FRU_COMP_CODE 0x02 00314 #define RTAS_FRU_COMP_CONFIG_ERROR 0x03 00315 #define RTAS_FRU_COMP_MAINT_REQUIRED 0x04 00316 #define RTAS_FRU_COMP_EXTERNAL 0x09 00317 #define RTAS_FRU_COMP_EXTERNAL_CODE 0x0A 00318 #define RTAS_FRU_COMP_TOOL 0x0B 00319 #define RTAS_FRU_COMP_SYMBOLIC 0x0C 00320 00321 uint32_t part_no:1; 00322 uint32_t ccin:1; 00323 uint32_t maintenance:1; 00324 uint32_t serial_no:1; 00326 union { 00327 char _fru_part_no[8]; 00328 char _fru_procedure_id[8]; 00329 } _fru_u1; 00330 #define fru_part_no _fru_u1._fru_part_no 00331 #define fru_procedure_id _fru_u1._fru_procedure_id 00332 }; 00333 00338 struct rtas_v6_src_scn { 00339 struct rtas_v6_scn_hdr shdr; 00340 00341 uint32_t version:8; 00342 uint32_t /* reserved */ :7; 00343 uint32_t subscns:1; 00344 char platform_data[6]; 00346 uint32_t ext_refcode2:32; 00347 uint32_t ext_refcode3:32; 00348 uint32_t ext_refcode4:32; 00349 uint32_t ext_refcode5:32; 00351 uint32_t ext_refcode6:32; 00352 uint32_t ext_refcode7:32; 00353 uint32_t ext_refcode8:32; 00354 uint32_t ext_refcode9:32; 00356 char primary_refcode[32]; 00357 }; 00358 00363 struct rtas_v6_src_subscn { 00364 uint32_t id:8; 00365 uint32_t platform_data:8; 00366 uint32_t subscn_length:16; 00367 }; 00368 00373 struct rtas_v6_mt_scn { 00374 struct rtas_v6_scn_hdr shdr; 00375 char model[8]; 00376 char serial_no[12]; 00377 }; 00378 00379 #endif 00380
1.5.3