diff options
author | Bob Moore <robert.moore@intel.com> | 2008-04-10 11:06:43 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-04-22 14:29:31 -0400 |
commit | 3fa347770a8a9cb3568600380ce4b5c041b3ac0b (patch) | |
tree | 184d5b7f3cf94e43241e2ae137f501bf48941ea5 | |
parent | 7823665eccdc7e230d0a904c6ec01d5c70ee099b (diff) |
ACPICA: Disassembler support for new ACPI tables
Implemented full disassembler support for the following new ACPI
tables: BERT, EINJ, and ERST. Partial disassembler support for
the complicated HEST table. These tables support the Windows
Hardware Error Architecture (WHEA).
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r-- | include/acpi/acdisasm.h | 26 | ||||
-rw-r--r-- | include/acpi/actbl1.h | 233 |
2 files changed, 249 insertions, 10 deletions
diff --git a/include/acpi/acdisasm.h b/include/acpi/acdisasm.h index 07d5241ea7a2..73d86ebaeed6 100644 --- a/include/acpi/acdisasm.h +++ b/include/acpi/acdisasm.h | |||
@@ -99,10 +99,13 @@ typedef const struct acpi_dmtable_info { | |||
99 | #define ACPI_DMT_GAS 22 | 99 | #define ACPI_DMT_GAS 22 |
100 | #define ACPI_DMT_ASF 23 | 100 | #define ACPI_DMT_ASF 23 |
101 | #define ACPI_DMT_DMAR 24 | 101 | #define ACPI_DMT_DMAR 24 |
102 | #define ACPI_DMT_MADT 25 | 102 | #define ACPI_DMT_HEST 25 |
103 | #define ACPI_DMT_SRAT 26 | 103 | #define ACPI_DMT_HESTNTFY 26 |
104 | #define ACPI_DMT_EXIT 27 | 104 | #define ACPI_DMT_HESTNTYP 27 |
105 | #define ACPI_DMT_SIG 28 | 105 | #define ACPI_DMT_MADT 28 |
106 | #define ACPI_DMT_SRAT 29 | ||
107 | #define ACPI_DMT_EXIT 30 | ||
108 | #define ACPI_DMT_SIG 31 | ||
106 | 109 | ||
107 | typedef | 110 | typedef |
108 | void (*acpi_dmtable_handler) (struct acpi_table_header * table); | 111 | void (*acpi_dmtable_handler) (struct acpi_table_header * table); |
@@ -150,6 +153,7 @@ extern struct acpi_dmtable_info acpi_dm_table_info_asf3[]; | |||
150 | extern struct acpi_dmtable_info acpi_dm_table_info_asf4[]; | 153 | extern struct acpi_dmtable_info acpi_dm_table_info_asf4[]; |
151 | extern struct acpi_dmtable_info acpi_dm_table_info_asf_hdr[]; | 154 | extern struct acpi_dmtable_info acpi_dm_table_info_asf_hdr[]; |
152 | extern struct acpi_dmtable_info acpi_dm_table_info_boot[]; | 155 | extern struct acpi_dmtable_info acpi_dm_table_info_boot[]; |
156 | extern struct acpi_dmtable_info acpi_dm_table_info_bert[]; | ||
153 | extern struct acpi_dmtable_info acpi_dm_table_info_cpep[]; | 157 | extern struct acpi_dmtable_info acpi_dm_table_info_cpep[]; |
154 | extern struct acpi_dmtable_info acpi_dm_table_info_cpep0[]; | 158 | extern struct acpi_dmtable_info acpi_dm_table_info_cpep0[]; |
155 | extern struct acpi_dmtable_info acpi_dm_table_info_dbgp[]; | 159 | extern struct acpi_dmtable_info acpi_dm_table_info_dbgp[]; |
@@ -159,11 +163,17 @@ extern struct acpi_dmtable_info acpi_dm_table_info_dmar_scope[]; | |||
159 | extern struct acpi_dmtable_info acpi_dm_table_info_dmar0[]; | 163 | extern struct acpi_dmtable_info acpi_dm_table_info_dmar0[]; |
160 | extern struct acpi_dmtable_info acpi_dm_table_info_dmar1[]; | 164 | extern struct acpi_dmtable_info acpi_dm_table_info_dmar1[]; |
161 | extern struct acpi_dmtable_info acpi_dm_table_info_ecdt[]; | 165 | extern struct acpi_dmtable_info acpi_dm_table_info_ecdt[]; |
166 | extern struct acpi_dmtable_info acpi_dm_table_info_einj[]; | ||
167 | extern struct acpi_dmtable_info acpi_dm_table_info_einj0[]; | ||
168 | extern struct acpi_dmtable_info acpi_dm_table_info_erst[]; | ||
162 | extern struct acpi_dmtable_info acpi_dm_table_info_facs[]; | 169 | extern struct acpi_dmtable_info acpi_dm_table_info_facs[]; |
163 | extern struct acpi_dmtable_info acpi_dm_table_info_fadt1[]; | 170 | extern struct acpi_dmtable_info acpi_dm_table_info_fadt1[]; |
164 | extern struct acpi_dmtable_info acpi_dm_table_info_fadt2[]; | 171 | extern struct acpi_dmtable_info acpi_dm_table_info_fadt2[]; |
165 | extern struct acpi_dmtable_info acpi_dm_table_info_gas[]; | 172 | extern struct acpi_dmtable_info acpi_dm_table_info_gas[]; |
166 | extern struct acpi_dmtable_info acpi_dm_table_info_header[]; | 173 | extern struct acpi_dmtable_info acpi_dm_table_info_header[]; |
174 | extern struct acpi_dmtable_info acpi_dm_table_info_hest[]; | ||
175 | extern struct acpi_dmtable_info acpi_dm_table_info_hest9[]; | ||
176 | extern struct acpi_dmtable_info acpi_dm_table_info_hest_notify[]; | ||
167 | extern struct acpi_dmtable_info acpi_dm_table_info_hpet[]; | 177 | extern struct acpi_dmtable_info acpi_dm_table_info_hpet[]; |
168 | extern struct acpi_dmtable_info acpi_dm_table_info_madt[]; | 178 | extern struct acpi_dmtable_info acpi_dm_table_info_madt[]; |
169 | extern struct acpi_dmtable_info acpi_dm_table_info_madt0[]; | 179 | extern struct acpi_dmtable_info acpi_dm_table_info_madt0[]; |
@@ -215,9 +225,13 @@ void acpi_dm_dump_cpep(struct acpi_table_header *table); | |||
215 | 225 | ||
216 | void acpi_dm_dump_dmar(struct acpi_table_header *table); | 226 | void acpi_dm_dump_dmar(struct acpi_table_header *table); |
217 | 227 | ||
228 | void acpi_dm_dump_einj(struct acpi_table_header *table); | ||
229 | |||
230 | void acpi_dm_dump_erst(struct acpi_table_header *table); | ||
231 | |||
218 | void acpi_dm_dump_fadt(struct acpi_table_header *table); | 232 | void acpi_dm_dump_fadt(struct acpi_table_header *table); |
219 | 233 | ||
220 | void acpi_dm_dump_srat(struct acpi_table_header *table); | 234 | void acpi_dm_dump_hest(struct acpi_table_header *table); |
221 | 235 | ||
222 | void acpi_dm_dump_mcfg(struct acpi_table_header *table); | 236 | void acpi_dm_dump_mcfg(struct acpi_table_header *table); |
223 | 237 | ||
@@ -229,6 +243,8 @@ void acpi_dm_dump_rsdt(struct acpi_table_header *table); | |||
229 | 243 | ||
230 | void acpi_dm_dump_slit(struct acpi_table_header *table); | 244 | void acpi_dm_dump_slit(struct acpi_table_header *table); |
231 | 245 | ||
246 | void acpi_dm_dump_srat(struct acpi_table_header *table); | ||
247 | |||
232 | void acpi_dm_dump_xsdt(struct acpi_table_header *table); | 248 | void acpi_dm_dump_xsdt(struct acpi_table_header *table); |
233 | 249 | ||
234 | /* | 250 | /* |
diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h index 5d39992314a9..604dfb311660 100644 --- a/include/acpi/actbl1.h +++ b/include/acpi/actbl1.h | |||
@@ -109,8 +109,8 @@ struct acpi_whea_header { | |||
109 | u8 flags; | 109 | u8 flags; |
110 | u8 reserved; | 110 | u8 reserved; |
111 | struct acpi_generic_address register_region; | 111 | struct acpi_generic_address register_region; |
112 | u32 value; /* Value used with Read/Write register */ | 112 | u64 value; /* Value used with Read/Write register */ |
113 | u32 mask; /* Bitmask required for this register instruction */ | 113 | u64 mask; /* Bitmask required for this register instruction */ |
114 | }; | 114 | }; |
115 | 115 | ||
116 | /******************************************************************************* | 116 | /******************************************************************************* |
@@ -234,13 +234,14 @@ struct acpi_table_bert { | |||
234 | u64 address; /* Physical addresss of the error region */ | 234 | u64 address; /* Physical addresss of the error region */ |
235 | }; | 235 | }; |
236 | 236 | ||
237 | /* Boot Error Region */ | ||
238 | |||
237 | struct acpi_bert_region { | 239 | struct acpi_bert_region { |
238 | u32 block_status; | 240 | u32 block_status; |
239 | u32 raw_data_offset; | 241 | u32 raw_data_offset; |
240 | u32 raw_data_length; | 242 | u32 raw_data_length; |
241 | u32 data_length; | 243 | u32 data_length; |
242 | u32 error_severity; | 244 | u32 error_severity; |
243 | u8 error_data[1]; | ||
244 | }; | 245 | }; |
245 | 246 | ||
246 | /* block_status Flags */ | 247 | /* block_status Flags */ |
@@ -441,6 +442,15 @@ enum acpi_einj_instructions { | |||
441 | ACPI_EINJ_INSTRUCTION_RESERVED = 5 /* 5 and greater are reserved */ | 442 | ACPI_EINJ_INSTRUCTION_RESERVED = 5 /* 5 and greater are reserved */ |
442 | }; | 443 | }; |
443 | 444 | ||
445 | /* EINJ Trigger Error Action Table */ | ||
446 | |||
447 | struct acpi_einj_trigger { | ||
448 | u32 header_size; | ||
449 | u32 revision; | ||
450 | u32 table_size; | ||
451 | u32 entry_count; | ||
452 | }; | ||
453 | |||
444 | /******************************************************************************* | 454 | /******************************************************************************* |
445 | * | 455 | * |
446 | * ERST - Error Record Serialization Table | 456 | * ERST - Error Record Serialization Table |
@@ -518,7 +528,220 @@ struct acpi_table_hest { | |||
518 | u32 error_source_count; | 528 | u32 error_source_count; |
519 | }; | 529 | }; |
520 | 530 | ||
521 | /* TBD: Need Error Source Descriptor layout */ | 531 | /* HEST subtable header */ |
532 | |||
533 | struct acpi_hest_header { | ||
534 | u16 type; | ||
535 | }; | ||
536 | |||
537 | /* Values for Type field above for subtables */ | ||
538 | |||
539 | enum acpi_hest_types { | ||
540 | ACPI_HEST_TYPE_XPF_MACHINE_CHECK = 0, | ||
541 | ACPI_HEST_TYPE_XPF_CORRECTED_MACHINE_CHECK = 1, | ||
542 | ACPI_HEST_TYPE_XPF_UNUSED = 2, | ||
543 | ACPI_HEST_TYPE_XPF_NON_MASKABLE_INTERRUPT = 3, | ||
544 | ACPI_HEST_TYPE_IPF_CORRECTED_MACHINE_CHECK = 4, | ||
545 | ACPI_HEST_TYPE_IPF_CORRECTED_PLATFORM_ERROR = 5, | ||
546 | ACPI_HEST_TYPE_AER_ROOT_PORT = 6, | ||
547 | ACPI_HEST_TYPE_AER_ENDPOINT = 7, | ||
548 | ACPI_HEST_TYPE_AER_BRIDGE = 8, | ||
549 | ACPI_HEST_TYPE_GENERIC_HARDWARE_ERROR_SOURCE = 9, | ||
550 | ACPI_HEST_TYPE_RESERVED = 10 /* 10 and greater are reserved */ | ||
551 | }; | ||
552 | |||
553 | /* | ||
554 | * HEST Sub-subtables | ||
555 | */ | ||
556 | |||
557 | /* XPF Machine Check Error Bank */ | ||
558 | |||
559 | struct acpi_hest_xpf_error_bank { | ||
560 | u8 bank_number; | ||
561 | u8 clear_status_on_init; | ||
562 | u8 status_format; | ||
563 | u8 config_write_enable; | ||
564 | u32 control_register; | ||
565 | u64 control_init_data; | ||
566 | u32 status_register; | ||
567 | u32 address_register; | ||
568 | u32 misc_register; | ||
569 | }; | ||
570 | |||
571 | /* Generic Error Status */ | ||
572 | |||
573 | struct acpi_hest_generic_status { | ||
574 | u32 block_status; | ||
575 | u32 raw_data_offset; | ||
576 | u32 raw_data_length; | ||
577 | u32 data_length; | ||
578 | u32 error_severity; | ||
579 | }; | ||
580 | |||
581 | /* Generic Error Data */ | ||
582 | |||
583 | struct acpi_hest_generic_data { | ||
584 | u8 section_type[16]; | ||
585 | u32 error_severity; | ||
586 | u16 revision; | ||
587 | u8 validation_bits; | ||
588 | u8 flags; | ||
589 | u32 error_data_length; | ||
590 | u8 fru_id[16]; | ||
591 | u8 fru_text[20]; | ||
592 | }; | ||
593 | |||
594 | /* Common HEST structure for PCI/AER types below (6,7,8) */ | ||
595 | |||
596 | struct acpi_hest_aer_common { | ||
597 | u16 source_id; | ||
598 | u16 config_write_enable; | ||
599 | u8 flags; | ||
600 | u8 enabled; | ||
601 | u32 records_to_pre_allocate; | ||
602 | u32 max_sections_per_record; | ||
603 | u32 bus; | ||
604 | u16 device; | ||
605 | u16 function; | ||
606 | u16 device_control; | ||
607 | u16 reserved; | ||
608 | u32 uncorrectable_error_mask; | ||
609 | u32 uncorrectable_error_severity; | ||
610 | u32 correctable_error_mask; | ||
611 | u32 advanced_error_cababilities; | ||
612 | }; | ||
613 | |||
614 | /* Hardware Error Notification */ | ||
615 | |||
616 | struct acpi_hest_notify { | ||
617 | u8 type; | ||
618 | u8 length; | ||
619 | u16 config_write_enable; | ||
620 | u32 poll_interval; | ||
621 | u32 vector; | ||
622 | u32 polling_threshold_value; | ||
623 | u32 polling_threshold_window; | ||
624 | u32 error_threshold_value; | ||
625 | u32 error_threshold_window; | ||
626 | }; | ||
627 | |||
628 | /* Values for Notify Type field above */ | ||
629 | |||
630 | enum acpi_hest_notify_types { | ||
631 | ACPI_HEST_NOTIFY_POLLED = 0, | ||
632 | ACPI_HEST_NOTIFY_EXTERNAL = 1, | ||
633 | ACPI_HEST_NOTIFY_LOCAL = 2, | ||
634 | ACPI_HEST_NOTIFY_SCI = 3, | ||
635 | ACPI_HEST_NOTIFY_NMI = 4, | ||
636 | ACPI_HEST_NOTIFY_RESERVED = 5 /* 5 and greater are reserved */ | ||
637 | }; | ||
638 | |||
639 | /* | ||
640 | * HEST subtables | ||
641 | * | ||
642 | * From WHEA Design Document, 16 May 2007. | ||
643 | * Note: There is no subtable type 2 in this version of the document, | ||
644 | * and there are two different subtable type 3s. | ||
645 | */ | ||
646 | |||
647 | /* 0: XPF Machine Check Exception */ | ||
648 | |||
649 | struct acpi_hest_xpf_machine_check { | ||
650 | struct acpi_hest_header header; | ||
651 | u16 source_id; | ||
652 | u16 config_write_enable; | ||
653 | u8 flags; | ||
654 | u8 reserved1; | ||
655 | u32 records_to_pre_allocate; | ||
656 | u32 max_sections_per_record; | ||
657 | u64 global_capability_data; | ||
658 | u64 global_control_data; | ||
659 | u8 num_hardware_banks; | ||
660 | u8 reserved2[7]; | ||
661 | }; | ||
662 | |||
663 | /* 1: XPF Corrected Machine Check */ | ||
664 | |||
665 | struct acpi_table_hest_xpf_corrected { | ||
666 | struct acpi_hest_header header; | ||
667 | u16 source_id; | ||
668 | u16 config_write_enable; | ||
669 | u8 flags; | ||
670 | u8 enabled; | ||
671 | u32 records_to_pre_allocate; | ||
672 | u32 max_sections_per_record; | ||
673 | struct acpi_hest_notify notify; | ||
674 | u8 num_hardware_banks; | ||
675 | u8 reserved[3]; | ||
676 | }; | ||
677 | |||
678 | /* 3: XPF Non-Maskable Interrupt */ | ||
679 | |||
680 | struct acpi_hest_xpf_nmi { | ||
681 | struct acpi_hest_header header; | ||
682 | u16 source_id; | ||
683 | u32 reserved; | ||
684 | u32 records_to_pre_allocate; | ||
685 | u32 max_sections_per_record; | ||
686 | u32 max_raw_data_length; | ||
687 | }; | ||
688 | |||
689 | /* 4: IPF Corrected Machine Check */ | ||
690 | |||
691 | struct acpi_hest_ipf_corrected { | ||
692 | struct acpi_hest_header header; | ||
693 | u8 enabled; | ||
694 | u8 reserved; | ||
695 | }; | ||
696 | |||
697 | /* 5: IPF Corrected Platform Error */ | ||
698 | |||
699 | struct acpi_hest_ipf_corrected_platform { | ||
700 | struct acpi_hest_header header; | ||
701 | u8 enabled; | ||
702 | u8 reserved; | ||
703 | }; | ||
704 | |||
705 | /* 6: PCI Express Root Port AER */ | ||
706 | |||
707 | struct acpi_hest_aer_root { | ||
708 | struct acpi_hest_header header; | ||
709 | struct acpi_hest_aer_common aer; | ||
710 | u32 root_error_command; | ||
711 | }; | ||
712 | |||
713 | /* 7: PCI Express AER (AER Endpoint) */ | ||
714 | |||
715 | struct acpi_hest_aer { | ||
716 | struct acpi_hest_header header; | ||
717 | struct acpi_hest_aer_common aer; | ||
718 | }; | ||
719 | |||
720 | /* 8: PCI Express/PCI-X Bridge AER */ | ||
721 | |||
722 | struct acpi_hest_aer_bridge { | ||
723 | struct acpi_hest_header header; | ||
724 | struct acpi_hest_aer_common aer; | ||
725 | u32 secondary_uncorrectable_error_mask; | ||
726 | u32 secondary_uncorrectable_error_severity; | ||
727 | u32 secondary_advanced_capabilities; | ||
728 | }; | ||
729 | |||
730 | /* 9: Generic Hardware Error Source */ | ||
731 | |||
732 | struct acpi_hest_generic { | ||
733 | struct acpi_hest_header header; | ||
734 | u16 source_id; | ||
735 | u16 related_source_id; | ||
736 | u8 config_write_enable; | ||
737 | u8 enabled; | ||
738 | u32 records_to_pre_allocate; | ||
739 | u32 max_sections_per_record; | ||
740 | u32 max_raw_data_length; | ||
741 | struct acpi_generic_address error_status_address; | ||
742 | struct acpi_hest_notify notify; | ||
743 | u32 error_status_block_length; | ||
744 | }; | ||
522 | 745 | ||
523 | /******************************************************************************* | 746 | /******************************************************************************* |
524 | * | 747 | * |
@@ -545,7 +768,7 @@ struct acpi_table_hpet { | |||
545 | 768 | ||
546 | /******************************************************************************* | 769 | /******************************************************************************* |
547 | * | 770 | * |
548 | * IBFT - i_sCSI Boot Firmware Table | 771 | * IBFT - Boot Firmware Table |
549 | * | 772 | * |
550 | ******************************************************************************/ | 773 | ******************************************************************************/ |
551 | 774 | ||