[PATCH] acpi: acpidump + acpi headers: Add basic dump of RASF
IvanHu
ivan.hu at canonical.com
Tue Jul 24 08:16:48 UTC 2012
On 07/21/2012 02:09 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> ACPI 5.0 has introduced the RASF, so add some simple acpidump
> support for the RASF. This will be expanded once we're sure
> of the RASF PCC sub channel identifier records (and we have
> some real world examples to check this works).
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/acpi/acpidump/acpidump.c | 23 +++++++++++++++++++++++
> src/lib/include/fwts_acpi.h | 5 +++++
> 2 files changed, 28 insertions(+)
>
> diff --git a/src/acpi/acpidump/acpidump.c b/src/acpi/acpidump/acpidump.c
> index ef7c79d..9b65703 100644
> --- a/src/acpi/acpidump/acpidump.c
> +++ b/src/acpi/acpidump/acpidump.c
> @@ -1571,6 +1571,28 @@ static void acpidump_fpdt(fwts_framework *fw, fwts_acpi_table_info *table)
> }
> }
>
> +/*
> + * acpidump_rasf()
> + * dump RASF, see 5.2.20 ACPI RAS FeatureTable (RASF)
> + * of version 5.0 ACPI spec.
> + */
> +static void acpidump_rasf(fwts_framework *fw, fwts_acpi_table_info *table)
> +{
> + uint8_t *data = (uint8_t *)table->data;
> + size_t length = table->length;
> +
> + static fwts_acpidump_field rasf_fields[] = {
> + FIELD_UINTS("Comm. Channel ID", fwts_acpi_table_rasf, platform_cc_id),
> + FIELD_END
> + };
> +
> + acpi_dump_table_fields(fw, data, rasf_fields, length, length);
> +
> + /* No idea how to dump rest of table, spec is a rather poor */
> + acpi_dump_raw_table(fw, table);Acked-by: Ivan Hu <ivan.hu at canonical.com>
> +}
> +
> +
> typedef struct {
> char *name;
> void (*func)(fwts_framework *fw, fwts_acpi_table_info *table);
> @@ -1603,6 +1625,7 @@ static acpidump_table_vec table_vec[] = {
> { "MCFG", acpidump_mcfg, 1 },
> { "MSCT", acpidump_msct, 1 },
> { "PSDT", acpidump_amlcode, 1 },
> + { "RASF", acpidump_rasf, 1 },
> { "RSDT", acpidump_rsdt, 1 },
> { "RSD PTR ", acpidump_rsdp, 0 },
> { "SBST", acpidump_sbst, 1 },
> diff --git a/src/lib/include/fwts_acpi.h b/src/lib/include/fwts_acpi.h
> index 5e9a24a..ec085aa 100644
> --- a/src/lib/include/fwts_acpi.h
> +++ b/src/lib/include/fwts_acpi.h
> @@ -638,6 +638,11 @@ typedef struct {
> uint32_t non_secure_PL2_timer_flags;
> } __attribute__ ((packed)) fwts_acpi_table_gtdt;
>
> +/* 5.2.20 ACPI RAS FeatureTable (RASF) */
> +typedef struct {
> + uint8_t platform_cc_id[12];
> +} __attribute__ ((packed)) fwts_acpi_table_rasf;
> +
> void fwts_acpi_table_get_header(fwts_acpi_table_header *hdr, uint8_t *data);
>
> #endif
>
Acked-by: Ivan Hu <ivan.hu at canonical.com>
More information about the fwts-devel
mailing list