Patchwork [2/3] acpi: acpidump: Dump out the new MADT GIC and GICD structures

login
register
mail settings
Submitter Colin King
Date Sept. 18, 2012, 11:22 a.m.
Message ID <1347967380-24722-3-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/184676/
State Accepted
Headers show

Comments

Colin King - Sept. 18, 2012, 11:22 a.m.
From: Colin Ian King <colin.king@canonical.com>

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/acpi/acpidump/acpidump.c |   29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
Alex Hung - Sept. 20, 2012, 6:15 a.m.
On 09/18/2012 07:22 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/acpi/acpidump/acpidump.c |   29 +++++++++++++++++++++++++++++
>   1 file changed, 29 insertions(+)
>
> diff --git a/src/acpi/acpidump/acpidump.c b/src/acpi/acpidump/acpidump.c
> index 9893b7d..31a3417 100644
> --- a/src/acpi/acpidump/acpidump.c
> +++ b/src/acpi/acpidump/acpidump.c
> @@ -920,6 +920,35 @@ static void acpidump_madt(fwts_framework *fw, fwts_acpi_table_info *table)
>   				skip = (sizeof(fwts_acpi_madt_local_x2apic_nmi));
>   			}
>   			break;
> +		case 11: {
> +				static fwts_acpidump_field fields_madt_gic[] = {
> +					FIELD_UINT("  Reserved", 	fwts_acpi_madt_gic, reserved),
> +					FIELD_UINT("  GIC ID", 		fwts_acpi_madt_gic, gic_id),
> +					FIELD_UINT("  Processor UID", 	fwts_acpi_madt_gic, processor_uid),
> +					FIELD_UINT("  Flags", 		fwts_acpi_madt_gic, flags),
> +					FIELD_UINT("  Parking Protocol",fwts_acpi_madt_gic, parking_protocol_version),
> +					FIELD_UINT("  Perf. Int. GSIV",	fwts_acpi_madt_gic, performance_interrupt_gsiv),
> +					FIELD_UINT("  Parked Address",	fwts_acpi_madt_gic, parked_address),
> +					FIELD_UINT("  Phys. Base. Addr",fwts_acpi_madt_gic, physical_base_address),
> +				};
> +				fwts_log_info_verbatum(fw, " GIC:");
> +				__acpi_dump_table_fields(fw, data, fields_madt_gic, offset);
> +				skip = (sizeof(fwts_acpi_madt_gic));
> +			}
> +			break;
> +		case 12: {
> +				static fwts_acpidump_field fields_madt_gicd[] = {
> +					FIELD_UINT("  Reserved", 	fwts_acpi_madt_gicd, reserved),
> +					FIELD_UINT("  GIC ID", 		fwts_acpi_madt_gicd, gic_id),
> +					FIELD_UINT("  Phys. Base. Addr",fwts_acpi_madt_gicd, physical_base_address),
> +					FIELD_UINT("  Sys Vector Base",	fwts_acpi_madt_gicd, system_vector_base),
> +					FIELD_UINT("  Reserved", 	fwts_acpi_madt_gicd, reserved2),
> +				};
> +				fwts_log_info_verbatum(fw, " GIC Distributor:");
> +				__acpi_dump_table_fields(fw, data, fields_madt_gicd, offset);
> +				skip = (sizeof(fwts_acpi_madt_gicd));
> +			}
> +			break;
>   		default:
>   			fwts_log_info_verbatum(fw, " Reserved for OEM use:");
>   			skip = 0;
>
Acked-by: Alex Hung <alex.hung@canonical.com>
Keng-Yu Lin - Sept. 20, 2012, 8:22 a.m.
On Tue, Sep 18, 2012 at 7:22 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/acpi/acpidump/acpidump.c |   29 +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
>
> diff --git a/src/acpi/acpidump/acpidump.c b/src/acpi/acpidump/acpidump.c
> index 9893b7d..31a3417 100644
> --- a/src/acpi/acpidump/acpidump.c
> +++ b/src/acpi/acpidump/acpidump.c
> @@ -920,6 +920,35 @@ static void acpidump_madt(fwts_framework *fw, fwts_acpi_table_info *table)
>                                 skip = (sizeof(fwts_acpi_madt_local_x2apic_nmi));
>                         }
>                         break;
> +               case 11: {
> +                               static fwts_acpidump_field fields_madt_gic[] = {
> +                                       FIELD_UINT("  Reserved",        fwts_acpi_madt_gic, reserved),
> +                                       FIELD_UINT("  GIC ID",          fwts_acpi_madt_gic, gic_id),
> +                                       FIELD_UINT("  Processor UID",   fwts_acpi_madt_gic, processor_uid),
> +                                       FIELD_UINT("  Flags",           fwts_acpi_madt_gic, flags),
> +                                       FIELD_UINT("  Parking Protocol",fwts_acpi_madt_gic, parking_protocol_version),
> +                                       FIELD_UINT("  Perf. Int. GSIV", fwts_acpi_madt_gic, performance_interrupt_gsiv),
> +                                       FIELD_UINT("  Parked Address",  fwts_acpi_madt_gic, parked_address),
> +                                       FIELD_UINT("  Phys. Base. Addr",fwts_acpi_madt_gic, physical_base_address),
> +                               };
> +                               fwts_log_info_verbatum(fw, " GIC:");
> +                               __acpi_dump_table_fields(fw, data, fields_madt_gic, offset);
> +                               skip = (sizeof(fwts_acpi_madt_gic));
> +                       }
> +                       break;
> +               case 12: {
> +                               static fwts_acpidump_field fields_madt_gicd[] = {
> +                                       FIELD_UINT("  Reserved",        fwts_acpi_madt_gicd, reserved),
> +                                       FIELD_UINT("  GIC ID",          fwts_acpi_madt_gicd, gic_id),
> +                                       FIELD_UINT("  Phys. Base. Addr",fwts_acpi_madt_gicd, physical_base_address),
> +                                       FIELD_UINT("  Sys Vector Base", fwts_acpi_madt_gicd, system_vector_base),
> +                                       FIELD_UINT("  Reserved",        fwts_acpi_madt_gicd, reserved2),
> +                               };
> +                               fwts_log_info_verbatum(fw, " GIC Distributor:");
> +                               __acpi_dump_table_fields(fw, data, fields_madt_gicd, offset);
> +                               skip = (sizeof(fwts_acpi_madt_gicd));
> +                       }
> +                       break;
>                 default:
>                         fwts_log_info_verbatum(fw, " Reserved for OEM use:");
>                         skip = 0;
> --
> 1.7.10.4
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>

Patch

diff --git a/src/acpi/acpidump/acpidump.c b/src/acpi/acpidump/acpidump.c
index 9893b7d..31a3417 100644
--- a/src/acpi/acpidump/acpidump.c
+++ b/src/acpi/acpidump/acpidump.c
@@ -920,6 +920,35 @@  static void acpidump_madt(fwts_framework *fw, fwts_acpi_table_info *table)
 				skip = (sizeof(fwts_acpi_madt_local_x2apic_nmi));
 			}
 			break;
+		case 11: {
+				static fwts_acpidump_field fields_madt_gic[] = {
+					FIELD_UINT("  Reserved", 	fwts_acpi_madt_gic, reserved),
+					FIELD_UINT("  GIC ID", 		fwts_acpi_madt_gic, gic_id),
+					FIELD_UINT("  Processor UID", 	fwts_acpi_madt_gic, processor_uid),
+					FIELD_UINT("  Flags", 		fwts_acpi_madt_gic, flags),
+					FIELD_UINT("  Parking Protocol",fwts_acpi_madt_gic, parking_protocol_version),
+					FIELD_UINT("  Perf. Int. GSIV",	fwts_acpi_madt_gic, performance_interrupt_gsiv),
+					FIELD_UINT("  Parked Address",	fwts_acpi_madt_gic, parked_address),
+					FIELD_UINT("  Phys. Base. Addr",fwts_acpi_madt_gic, physical_base_address),
+				};
+				fwts_log_info_verbatum(fw, " GIC:");
+				__acpi_dump_table_fields(fw, data, fields_madt_gic, offset);
+				skip = (sizeof(fwts_acpi_madt_gic));
+			}
+			break;
+		case 12: {
+				static fwts_acpidump_field fields_madt_gicd[] = {
+					FIELD_UINT("  Reserved", 	fwts_acpi_madt_gicd, reserved),
+					FIELD_UINT("  GIC ID", 		fwts_acpi_madt_gicd, gic_id),
+					FIELD_UINT("  Phys. Base. Addr",fwts_acpi_madt_gicd, physical_base_address),
+					FIELD_UINT("  Sys Vector Base",	fwts_acpi_madt_gicd, system_vector_base),
+					FIELD_UINT("  Reserved", 	fwts_acpi_madt_gicd, reserved2),
+				};
+				fwts_log_info_verbatum(fw, " GIC Distributor:");
+				__acpi_dump_table_fields(fw, data, fields_madt_gicd, offset);
+				skip = (sizeof(fwts_acpi_madt_gicd));
+			}
+			break;
 		default:
 			fwts_log_info_verbatum(fw, " Reserved for OEM use:");
 			skip = 0;