Message ID | 1386860225-1666-2-git-send-email-colin.king@canonical.com |
---|---|
State | Accepted |
Headers | show |
On 12/12/2013 10:57 PM, Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > Add support for the Debug Port Table > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > src/acpi/acpidump/acpidump.c | 16 ++++++++++++++++ > src/lib/include/fwts_acpi.h | 7 +++++++ > 2 files changed, 23 insertions(+) > > diff --git a/src/acpi/acpidump/acpidump.c b/src/acpi/acpidump/acpidump.c > index 2114134..9163a1b 100644 > --- a/src/acpi/acpidump/acpidump.c > +++ b/src/acpi/acpidump/acpidump.c > @@ -1712,6 +1712,21 @@ static void acpidump_spcr(fwts_framework *fw, const fwts_acpi_table_info *table) > acpi_dump_table_fields(fw, table->data, spcr_fields, 0, table->length); > } > > +/* > + * acpidump_dbgp() > + * dump dbgp, debug port table > + */ > +static void acpidump_dbgp(fwts_framework *fw, const fwts_acpi_table_info *table) > +{ > + static const fwts_acpidump_field dbgp_fields[] = { > + FIELD_UINT("Interface Type", fwts_acpi_table_dbgp, interface_type), > + FIELD_UINT("Reserved", fwts_acpi_table_dbgp, reserved1), > + FIELD_GAS ("Base Address", fwts_acpi_table_dbgp, base_address), > + FIELD_END > + }; > + > + acpi_dump_table_fields(fw, table->data, dbgp_fields, 0, table->length); > +} > > typedef struct { > const char *name; > @@ -1732,6 +1747,7 @@ static const acpidump_table_vec table_vec[] = { > { "BGRT", acpidump_bgrt, 1 }, > { "BOOT", acpidump_boot, 1 }, > { "CPEP", acpidump_cpep, 1 }, > + { "DBGP", acpidump_dbgp, 1 }, > { "DSDT", acpidump_amlcode, 1 }, > { "DMAR", acpidump_dmar, 1 }, > { "ECDT", acpidump_ecdt, 1 }, > diff --git a/src/lib/include/fwts_acpi.h b/src/lib/include/fwts_acpi.h > index 171bdc4..009e5ac 100644 > --- a/src/lib/include/fwts_acpi.h > +++ b/src/lib/include/fwts_acpi.h > @@ -705,6 +705,13 @@ typedef struct { > uint32_t reserved3; > } __attribute__ ((packed)) fwts_acpi_table_spcr; > > +typedef struct { > + fwts_acpi_table_header header; > + uint8_t interface_type; > + uint8_t reserved1[3]; > + fwts_acpi_gas base_address; > +} __attribute__ ((packed)) fwts_acpi_table_dbgp; > + > void fwts_acpi_table_get_header(fwts_acpi_table_header *hdr, uint8_t *data); > > #endif > Acked-by: Ivan Hu <ivan.hu@canonical.com>
On 12/12/2013 10:57 PM, Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > Add support for the Debug Port Table > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > src/acpi/acpidump/acpidump.c | 16 ++++++++++++++++ > src/lib/include/fwts_acpi.h | 7 +++++++ > 2 files changed, 23 insertions(+) > > diff --git a/src/acpi/acpidump/acpidump.c b/src/acpi/acpidump/acpidump.c > index 2114134..9163a1b 100644 > --- a/src/acpi/acpidump/acpidump.c > +++ b/src/acpi/acpidump/acpidump.c > @@ -1712,6 +1712,21 @@ static void acpidump_spcr(fwts_framework *fw, const fwts_acpi_table_info *table) > acpi_dump_table_fields(fw, table->data, spcr_fields, 0, table->length); > } > > +/* > + * acpidump_dbgp() > + * dump dbgp, debug port table > + */ > +static void acpidump_dbgp(fwts_framework *fw, const fwts_acpi_table_info *table) > +{ > + static const fwts_acpidump_field dbgp_fields[] = { > + FIELD_UINT("Interface Type", fwts_acpi_table_dbgp, interface_type), > + FIELD_UINT("Reserved", fwts_acpi_table_dbgp, reserved1), > + FIELD_GAS ("Base Address", fwts_acpi_table_dbgp, base_address), > + FIELD_END > + }; > + > + acpi_dump_table_fields(fw, table->data, dbgp_fields, 0, table->length); > +} > > typedef struct { > const char *name; > @@ -1732,6 +1747,7 @@ static const acpidump_table_vec table_vec[] = { > { "BGRT", acpidump_bgrt, 1 }, > { "BOOT", acpidump_boot, 1 }, > { "CPEP", acpidump_cpep, 1 }, > + { "DBGP", acpidump_dbgp, 1 }, > { "DSDT", acpidump_amlcode, 1 }, > { "DMAR", acpidump_dmar, 1 }, > { "ECDT", acpidump_ecdt, 1 }, > diff --git a/src/lib/include/fwts_acpi.h b/src/lib/include/fwts_acpi.h > index 171bdc4..009e5ac 100644 > --- a/src/lib/include/fwts_acpi.h > +++ b/src/lib/include/fwts_acpi.h > @@ -705,6 +705,13 @@ typedef struct { > uint32_t reserved3; > } __attribute__ ((packed)) fwts_acpi_table_spcr; > > +typedef struct { > + fwts_acpi_table_header header; > + uint8_t interface_type; > + uint8_t reserved1[3]; > + fwts_acpi_gas base_address; > +} __attribute__ ((packed)) fwts_acpi_table_dbgp; > + > void fwts_acpi_table_get_header(fwts_acpi_table_header *hdr, uint8_t *data); > > #endif > Acked-by: Alex Hung <alex.hung@canonical.com>
diff --git a/src/acpi/acpidump/acpidump.c b/src/acpi/acpidump/acpidump.c index 2114134..9163a1b 100644 --- a/src/acpi/acpidump/acpidump.c +++ b/src/acpi/acpidump/acpidump.c @@ -1712,6 +1712,21 @@ static void acpidump_spcr(fwts_framework *fw, const fwts_acpi_table_info *table) acpi_dump_table_fields(fw, table->data, spcr_fields, 0, table->length); } +/* + * acpidump_dbgp() + * dump dbgp, debug port table + */ +static void acpidump_dbgp(fwts_framework *fw, const fwts_acpi_table_info *table) +{ + static const fwts_acpidump_field dbgp_fields[] = { + FIELD_UINT("Interface Type", fwts_acpi_table_dbgp, interface_type), + FIELD_UINT("Reserved", fwts_acpi_table_dbgp, reserved1), + FIELD_GAS ("Base Address", fwts_acpi_table_dbgp, base_address), + FIELD_END + }; + + acpi_dump_table_fields(fw, table->data, dbgp_fields, 0, table->length); +} typedef struct { const char *name; @@ -1732,6 +1747,7 @@ static const acpidump_table_vec table_vec[] = { { "BGRT", acpidump_bgrt, 1 }, { "BOOT", acpidump_boot, 1 }, { "CPEP", acpidump_cpep, 1 }, + { "DBGP", acpidump_dbgp, 1 }, { "DSDT", acpidump_amlcode, 1 }, { "DMAR", acpidump_dmar, 1 }, { "ECDT", acpidump_ecdt, 1 }, diff --git a/src/lib/include/fwts_acpi.h b/src/lib/include/fwts_acpi.h index 171bdc4..009e5ac 100644 --- a/src/lib/include/fwts_acpi.h +++ b/src/lib/include/fwts_acpi.h @@ -705,6 +705,13 @@ typedef struct { uint32_t reserved3; } __attribute__ ((packed)) fwts_acpi_table_spcr; +typedef struct { + fwts_acpi_table_header header; + uint8_t interface_type; + uint8_t reserved1[3]; + fwts_acpi_gas base_address; +} __attribute__ ((packed)) fwts_acpi_table_dbgp; + void fwts_acpi_table_get_header(fwts_acpi_table_header *hdr, uint8_t *data); #endif