|
@@ -525,3 +525,171 @@ typedef struct sal_log_pci_bus_err_info {
|
|
|
requestor_id : 1,
|
|
|
responder_id : 1,
|
|
|
target_id : 1,
|
|
|
+ oem_data : 1,
|
|
|
+ reserved : 54;
|
|
|
+ } valid;
|
|
|
+ u64 err_status;
|
|
|
+ u16 err_type;
|
|
|
+ u16 bus_id;
|
|
|
+ u32 reserved;
|
|
|
+ u64 bus_address;
|
|
|
+ u64 bus_data;
|
|
|
+ u64 bus_cmd;
|
|
|
+ u64 requestor_id;
|
|
|
+ u64 responder_id;
|
|
|
+ u64 target_id;
|
|
|
+ u8 oem_data[1]; /* Variable length data */
|
|
|
+} sal_log_pci_bus_err_info_t;
|
|
|
+
|
|
|
+typedef struct sal_log_smbios_dev_err_info {
|
|
|
+ sal_log_section_hdr_t header;
|
|
|
+ struct {
|
|
|
+ u64 event_type : 1,
|
|
|
+ length : 1,
|
|
|
+ time_stamp : 1,
|
|
|
+ data : 1,
|
|
|
+ reserved1 : 60;
|
|
|
+ } valid;
|
|
|
+ u8 event_type;
|
|
|
+ u8 length;
|
|
|
+ u8 time_stamp[6];
|
|
|
+ u8 data[1]; /* data of variable length, length == slsmb_length */
|
|
|
+} sal_log_smbios_dev_err_info_t;
|
|
|
+
|
|
|
+typedef struct sal_log_pci_comp_err_info {
|
|
|
+ sal_log_section_hdr_t header;
|
|
|
+ struct {
|
|
|
+ u64 err_status : 1,
|
|
|
+ comp_info : 1,
|
|
|
+ num_mem_regs : 1,
|
|
|
+ num_io_regs : 1,
|
|
|
+ reg_data_pairs : 1,
|
|
|
+ oem_data : 1,
|
|
|
+ reserved : 58;
|
|
|
+ } valid;
|
|
|
+ u64 err_status;
|
|
|
+ struct {
|
|
|
+ u16 vendor_id;
|
|
|
+ u16 device_id;
|
|
|
+ u8 class_code[3];
|
|
|
+ u8 func_num;
|
|
|
+ u8 dev_num;
|
|
|
+ u8 bus_num;
|
|
|
+ u8 seg_num;
|
|
|
+ u8 reserved[5];
|
|
|
+ } comp_info;
|
|
|
+ u32 num_mem_regs;
|
|
|
+ u32 num_io_regs;
|
|
|
+ u64 reg_data_pairs[1];
|
|
|
+ /*
|
|
|
+ * array of address/data register pairs is num_mem_regs + num_io_regs elements
|
|
|
+ * long. Each array element consists of a u64 address followed by a u64 data
|
|
|
+ * value. The oem_data array immediately follows the reg_data_pairs array
|
|
|
+ */
|
|
|
+ u8 oem_data[1]; /* Variable length data */
|
|
|
+} sal_log_pci_comp_err_info_t;
|
|
|
+
|
|
|
+typedef struct sal_log_plat_specific_err_info {
|
|
|
+ sal_log_section_hdr_t header;
|
|
|
+ struct {
|
|
|
+ u64 err_status : 1,
|
|
|
+ guid : 1,
|
|
|
+ oem_data : 1,
|
|
|
+ reserved : 61;
|
|
|
+ } valid;
|
|
|
+ u64 err_status;
|
|
|
+ efi_guid_t guid;
|
|
|
+ u8 oem_data[1]; /* platform specific variable length data */
|
|
|
+} sal_log_plat_specific_err_info_t;
|
|
|
+
|
|
|
+typedef struct sal_log_host_ctlr_err_info {
|
|
|
+ sal_log_section_hdr_t header;
|
|
|
+ struct {
|
|
|
+ u64 err_status : 1,
|
|
|
+ requestor_id : 1,
|
|
|
+ responder_id : 1,
|
|
|
+ target_id : 1,
|
|
|
+ bus_spec_data : 1,
|
|
|
+ oem_data : 1,
|
|
|
+ reserved : 58;
|
|
|
+ } valid;
|
|
|
+ u64 err_status;
|
|
|
+ u64 requestor_id;
|
|
|
+ u64 responder_id;
|
|
|
+ u64 target_id;
|
|
|
+ u64 bus_spec_data;
|
|
|
+ u8 oem_data[1]; /* Variable length OEM data */
|
|
|
+} sal_log_host_ctlr_err_info_t;
|
|
|
+
|
|
|
+typedef struct sal_log_plat_bus_err_info {
|
|
|
+ sal_log_section_hdr_t header;
|
|
|
+ struct {
|
|
|
+ u64 err_status : 1,
|
|
|
+ requestor_id : 1,
|
|
|
+ responder_id : 1,
|
|
|
+ target_id : 1,
|
|
|
+ bus_spec_data : 1,
|
|
|
+ oem_data : 1,
|
|
|
+ reserved : 58;
|
|
|
+ } valid;
|
|
|
+ u64 err_status;
|
|
|
+ u64 requestor_id;
|
|
|
+ u64 responder_id;
|
|
|
+ u64 target_id;
|
|
|
+ u64 bus_spec_data;
|
|
|
+ u8 oem_data[1]; /* Variable length OEM data */
|
|
|
+} sal_log_plat_bus_err_info_t;
|
|
|
+
|
|
|
+/* Overall platform error section structure */
|
|
|
+typedef union sal_log_platform_err_info {
|
|
|
+ sal_log_mem_dev_err_info_t mem_dev_err;
|
|
|
+ sal_log_sel_dev_err_info_t sel_dev_err;
|
|
|
+ sal_log_pci_bus_err_info_t pci_bus_err;
|
|
|
+ sal_log_smbios_dev_err_info_t smbios_dev_err;
|
|
|
+ sal_log_pci_comp_err_info_t pci_comp_err;
|
|
|
+ sal_log_plat_specific_err_info_t plat_specific_err;
|
|
|
+ sal_log_host_ctlr_err_info_t host_ctlr_err;
|
|
|
+ sal_log_plat_bus_err_info_t plat_bus_err;
|
|
|
+} sal_log_platform_err_info_t;
|
|
|
+
|
|
|
+/* SAL log over-all, multi-section error record structure (processor+platform) */
|
|
|
+typedef struct err_rec {
|
|
|
+ sal_log_record_header_t sal_elog_header;
|
|
|
+ sal_log_processor_info_t proc_err;
|
|
|
+ sal_log_platform_err_info_t plat_err;
|
|
|
+ u8 oem_data_pad[1024];
|
|
|
+} ia64_err_rec_t;
|
|
|
+
|
|
|
+/*
|
|
|
+ * Now define a couple of inline functions for improved type checking
|
|
|
+ * and convenience.
|
|
|
+ */
|
|
|
+
|
|
|
+extern s64 ia64_sal_cache_flush (u64 cache_type);
|
|
|
+extern void __init check_sal_cache_flush (void);
|
|
|
+
|
|
|
+/* Initialize all the processor and platform level instruction and data caches */
|
|
|
+static inline s64
|
|
|
+ia64_sal_cache_init (void)
|
|
|
+{
|
|
|
+ struct ia64_sal_retval isrv;
|
|
|
+ SAL_CALL(isrv, SAL_CACHE_INIT, 0, 0, 0, 0, 0, 0, 0);
|
|
|
+ return isrv.status;
|
|
|
+}
|
|
|
+
|
|
|
+/*
|
|
|
+ * Clear the processor and platform information logged by SAL with respect to the machine
|
|
|
+ * state at the time of MCA's, INITs, CMCs, or CPEs.
|
|
|
+ */
|
|
|
+static inline s64
|
|
|
+ia64_sal_clear_state_info (u64 sal_info_type)
|
|
|
+{
|
|
|
+ struct ia64_sal_retval isrv;
|
|
|
+ SAL_CALL_REENTRANT(isrv, SAL_CLEAR_STATE_INFO, sal_info_type, 0,
|
|
|
+ 0, 0, 0, 0, 0);
|
|
|
+ return isrv.status;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+/* Get the processor and platform information logged by SAL with respect to the machine
|
|
|
+ * state at the time of the MCAs, INITs, CMCs, or CPEs.
|