aboutsummaryrefslogtreecommitdiff
path: root/include/opal.h
diff options
context:
space:
mode:
authorDeepthi Dharwar <deepthi@linux.vnet.ibm.com>2014-07-24 12:02:42 +0530
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-07-25 14:10:52 +1000
commitfa023052dfec598262b41e277850d78780c42639 (patch)
tree7230a271a0f37d14d7f65a656e02f4dfd96172fd /include/opal.h
parent685fab6439fb46b13d3de383e3c9288607c7d389 (diff)
downloadskiboot-fa023052dfec598262b41e277850d78780c42639.zip
skiboot-fa023052dfec598262b41e277850d78780c42639.tar.gz
skiboot-fa023052dfec598262b41e277850d78780c42639.tar.bz2
elog: Move error log data structres from opal.h to new file errorlog.h
Currently, all the error log data structures needed to commit an error in PEL are declared in opal.h and are exposed to kernel. At present we do not have any infrastrucutre in the kernel to make use of these ABIs. Any changes to these strucutes in the future can potentially cause an ABI breakage. In order to avoid any breakage this patch moves all the error log data structures to a new errorlog.h file and deprecating the OPAL tokens for error-log write functionality calls only. Once the kernel support is added (anytime in future), one needs to move all of this back to opal.h and re-enable the OPAL tokens for the same. Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'include/opal.h')
-rw-r--r--include/opal.h119
1 files changed, 1 insertions, 118 deletions
diff --git a/include/opal.h b/include/opal.h
index 8dcb9f3..5c03057 100644
--- a/include/opal.h
+++ b/include/opal.h
@@ -127,7 +127,7 @@
#define OPAL_GET_PARAM 89
#define OPAL_SET_PARAM 90
#define OPAL_DUMP_RESEND 91
-#define OPAL_ELOG_SEND 92
+#define OPAL_ELOG_SEND 92 /* Deprecated */
#define OPAL_PCI_SET_PHB_CAPI_MODE 93
#define OPAL_DUMP_INFO2 94
#define OPAL_WRITE_OPPANEL_ASYNC 95
@@ -257,94 +257,6 @@ enum OpalPendingState {
OPAL_EVENT_MSG_PENDING = 0x800,
};
-/* Classification of error/events type reported on OPAL */
-/* Platform Events/Errors: Report Machine Check Interrupt */
-#define OPAL_PLATFORM_ERR_EVT 0x01
-/* INPUT_OUTPUT: Report all I/O related events/errors */
-#define OPAL_INPUT_OUTPUT_ERR_EVT 0x02
-/* RESOURCE_DEALLOC: Hotplug events and errors */
-#define OPAL_RESOURCE_DEALLOC_ERR_EVT 0x03
-/* MISC: Miscellanous error */
-#define OPAL_MISC_ERR_EVT 0x04
-
-/* OPAL Subsystem IDs listed for reporting events/errors */
-#define OPAL_PROCESSOR_SUBSYSTEM 0x10
-#define OPAL_MEMORY_SUBSYSTEM 0x20
-#define OPAL_IO_SUBSYSTEM 0x30
-#define OPAL_IO_DEVICES 0x40
-#define OPAL_CEC_HARDWARE 0x50
-#define OPAL_POWER_COOLING 0x60
-#define OPAL_MISC_SUBSYSTEM 0x70
-#define OPAL_SURVEILLANCE_ERR 0x7A
-#define OPAL_PLATFORM_FIRMWARE 0x80
-#define OPAL_SOFTWARE 0x90
-#define OPAL_EXTERNAL_ENV 0xA0
-
-/*
- * During reporting an event/error the following represents
- * how serious the logged event/error is. (Severity)
- */
-#define OPAL_INFO 0x00
-#define OPAL_RECOVERED_ERR_GENERAL 0x10
-
-/* 0x2X series is to denote set of Predictive Error */
-/* 0x20 Generic predictive error */
-#define OPAL_PREDICTIVE_ERR_GENERAL 0x20
-/* 0x21 Predictive error, degraded performance */
-#define OPAL_PREDICTIVE_ERR_DEGRADED_PERF 0x21
-/* 0x22 Predictive error, fault may be corrected after reboot */
-#define OPAL_PREDICTIVE_ERR_FAULT_RECTIFY_REBOOT 0x22
-/*
- * 0x23 Predictive error, fault may be corrected after reboot,
- * degraded performance
- */
-#define OPAL_PREDICTIVE_ERR_FAULT_RECTIFY_BOOT_DEGRADE_PERF 0x23
-/* 0x24 Predictive error, loss of redundancy */
-#define OPAL_PREDICTIVE_ERR_LOSS_OF_REDUNDANCY 0x24
-
-/* 0x4X series for Unrecoverable Error */
-/* 0x40 Generic Unrecoverable error */
-#define OPAL_UNRECOVERABLE_ERR_GENERAL 0x40
-/* 0x41 Unrecoverable error bypassed with degraded performance */
-#define OPAL_UNRECOVERABLE_ERR_DEGRADE_PERF 0x41
-/* 0x44 Unrecoverable error bypassed with loss of redundancy */
-#define OPAL_UNRECOVERABLE_ERR_LOSS_REDUNDANCY 0x44
-/* 0x45 Unrecoverable error bypassed with loss of redundancy and performance */
-#define OPAL_UNRECOVERABLE_ERR_LOSS_REDUNDANCY_PERF 0x45
-/* 0x48 Unrecoverable error bypassed with loss of function */
-#define OPAL_UNRECOVERABLE_ERR_LOSS_OF_FUNCTION 0x48
-/* 0x50 In case of PANIC */
-#define OPAL_ERROR_PANIC 0x50
-
-/*
- * OPAL Event Sub-type
- * This field provides additional information on the non-error
- * event type
- */
-#define OPAL_NA 0x00
-#define OPAL_MISCELLANEOUS_INFO_ONLY 0x01
-#define OPAL_PREV_REPORTED_ERR_RECTIFIED 0x10
-#define OPAL_SYS_RESOURCES_DECONFIG_BY_USER 0x20
-#define OPAL_SYS_RESOURCE_DECONFIG_PRIOR_ERR 0x21
-#define OPAL_RESOURCE_DEALLOC_EVENT_NOTIFY 0x22
-#define OPAL_CONCURRENT_MAINTENANCE_EVENT 0x40
-#define OPAL_CAPACITY_UPGRADE_EVENT 0x60
-#define OPAL_RESOURCE_SPARING_EVENT 0x70
-#define OPAL_DYNAMIC_RECONFIG_EVENT 0x80
-#define OPAL_NORMAL_SYS_PLATFORM_SHUTDOWN 0xD0
-#define OPAL_ABNORMAL_POWER_OFF 0xE0
-
-/* Max user dump size is 14K */
-#define OPAL_LOG_MAX_DUMP 14336
-
-/* Multiple user data sections */
-struct __attribute__((__packed__))opal_user_data_section {
- uint32_t tag;
- uint16_t size;
- uint16_t component_id;
- char data_dump[1];
-};
-
/* Machine check related definitions */
enum OpalMCE_Version {
OpalMCE_V1 = 1,
@@ -863,35 +775,6 @@ struct opal_sg_list {
/****** Internal **********/
#include <skiboot.h>
-
-/*
- * All the information regarding an error/event to be reported
- * needs to populate this structure using pre-defined interfaces
- * only
- */
-struct __attribute__((__packed__)) opal_errorlog {
-
- uint16_t component_id;
- uint8_t error_event_type;
- uint8_t subsystem_id;
-
- uint8_t event_severity;
- uint8_t event_subtype;
- uint8_t user_section_count;
- uint8_t elog_origin;
-
- uint32_t user_section_size;
- uint32_t reason_code;
- uint32_t additional_info[4];
-
- uint32_t plid;
- uint32_t log_size;
- uint64_t elog_timeout;
-
- char user_data_dump[OPAL_LOG_MAX_DUMP];
- struct list_node link;
-};
-
/* An opal table entry */
struct opal_table_entry {
void *func;