ACK: [PATCH 19/30] lib: fwts_acpi_tables: fully pad out fixed up ACPI OEM IDs
Alex Hung
alex.hung at canonical.com
Tue Jun 23 05:56:30 UTC 2015
On 06/18/2015 04:49 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> It is good practice to ensure the fixed up (faked) ACPI OEM
> IDs are fully padded out with text. This patch also adjusts the
> fwts-tests that get affected by this change (since loading tables
> from file requires some fix up).
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> fwts-test/arg-table-path-0001/acpidump-0001.log | 6 +++---
> fwts-test/checksum-0001/checksum-0001.log | 2 +-
> fwts-test/checksum-0001/checksum-0003.log | 2 +-
> fwts-test/checksum-0001/checksum-0004.log | 2 +-
> src/lib/src/fwts_acpi_tables.c | 8 ++++----
> 5 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/fwts-test/arg-table-path-0001/acpidump-0001.log b/fwts-test/arg-table-path-0001/acpidump-0001.log
> index 6b5a9aa..2f4f2af 100644
> --- a/fwts-test/arg-table-path-0001/acpidump-0001.log
> +++ b/fwts-test/arg-table-path-0001/acpidump-0001.log
> @@ -44,24 +44,24 @@ acpidump [0x008 0008 4] H/W Signature: 0x000
> acpidump [0x009 0009 1] Checksum: 0x0a
> acpidump [0x009 0009 1] Checksum: 0x11
> acpidump [0x009 0009 1] Checksum: 0x13
> -acpidump [0x009 0009 1] Checksum: 0x30
> acpidump [0x009 0009 1] Checksum: 0x32
> acpidump [0x009 0009 1] Checksum: 0x52
> acpidump [0x009 0009 1] Checksum: 0x59
> acpidump [0x009 0009 1] Checksum: 0x6d
> acpidump [0x009 0009 1] Checksum: 0x8f
> +acpidump [0x009 0009 1] Checksum: 0x98
> acpidump [0x009 0009 1] Checksum: 0x99
> acpidump [0x009 0009 1] Checksum: 0xa5
> acpidump [0x009 0009 1] Checksum: 0xc8
> acpidump [0x009 0009 1] Checksum: 0xcc
> acpidump [0x009 0009 1] Checksum: 0xdf
> -acpidump [0x009 0009 1] Checksum: 0xe5
> +acpidump [0x009 0009 1] Checksum: 0xe3
> acpidump [0x009 0009 1] Checksum: 0xeb
> acpidump [0x009 0009 1] Checksum: 0xed
> acpidump [0x009 0009 6] OEM ID: LENOVO
> acpidump [0x00a 0010 1] Start Bus Num: 0x00
> acpidump [0x00a 0010 6] OEM ID: BrtRef
> -acpidump [0x00a 0010 6] OEM ID: FWTS
> +acpidump [0x00a 0010 6] OEM ID: FWTSID
> acpidump [0x00a 0010 6] OEM ID: Intel
> acpidump [0x00a 0010 6] OEM ID: INTEL
> acpidump [0x00a 0010 6] OEM ID: LENOVO
> diff --git a/fwts-test/checksum-0001/checksum-0001.log b/fwts-test/checksum-0001/checksum-0001.log
> index 8ce3148..81cdab4 100644
> --- a/fwts-test/checksum-0001/checksum-0001.log
> +++ b/fwts-test/checksum-0001/checksum-0001.log
> @@ -17,7 +17,7 @@ checksum PASSED: Test 1, Table SSDT has correct checksum 0xc8
> checksum PASSED: Test 1, Table SSDT has correct checksum 0x6d
> checksum PASSED: Test 1, Table SSDT has correct checksum 0xdf
> checksum PASSED: Test 1, Table XSDT has correct checksum 0xc2
> -checksum PASSED: Test 1, Table RSDT has correct checksum 0x0d
> +checksum PASSED: Test 1, Table RSDT has correct checksum 0xc0
> checksum
> checksum ==================================================================================================
> checksum 19 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0 info only.
> diff --git a/fwts-test/checksum-0001/checksum-0003.log b/fwts-test/checksum-0001/checksum-0003.log
> index 4f2bf19..6425f06 100644
> --- a/fwts-test/checksum-0001/checksum-0003.log
> +++ b/fwts-test/checksum-0001/checksum-0003.log
> @@ -23,7 +23,7 @@ checksum PASSED: Test 1, Table SSDT has correct checksum 0xc8
> checksum PASSED: Test 1, Table SSDT has correct checksum 0x6d
> checksum PASSED: Test 1, Table SSDT has correct checksum 0xdf
> checksum PASSED: Test 1, Table XSDT has correct checksum 0xc2
> -checksum PASSED: Test 1, Table RSDT has correct checksum 0x0d
> +checksum PASSED: Test 1, Table RSDT has correct checksum 0xc0
> checksum
> checksum ==================================================================================================
> checksum 18 passed, 1 failed, 0 warning, 0 aborted, 0 skipped, 0 info only.
> diff --git a/fwts-test/checksum-0001/checksum-0004.log b/fwts-test/checksum-0001/checksum-0004.log
> index cfc576d..eea7abc 100644
> --- a/fwts-test/checksum-0001/checksum-0004.log
> +++ b/fwts-test/checksum-0001/checksum-0004.log
> @@ -107,7 +107,7 @@ checksum ADVICE: The kernel will warn that this table has an invalid chec
> checksum still load it. This is not a critical issue, but should be fixed if possible to avoid the warning
> checksum messages.
> checksum
> -checksum PASSED: Test 1, Table RSDT has correct checksum 0x0d
> +checksum PASSED: Test 1, Table RSDT has correct checksum 0xc0
> checksum
> checksum ==================================================================================================
> checksum 4 passed, 15 failed, 0 warning, 0 aborted, 0 skipped, 0 info only.
> diff --git a/src/lib/src/fwts_acpi_tables.c b/src/lib/src/fwts_acpi_tables.c
> index 9ee3193..6bb69fd 100644
> --- a/src/lib/src/fwts_acpi_tables.c
> +++ b/src/lib/src/fwts_acpi_tables.c
> @@ -834,7 +834,7 @@ static bool fwts_acpi_table_fixable(fwts_acpi_table_info *table)
> static int fwts_acpi_load_tables_fixup(fwts_framework *fw)
> {
> int i, j, count;
> - char *oem_tbl_id = "FWTS ";
> + char *oem_tbl_id = "FWTSIDXX";
> fwts_acpi_table_info *table;
> fwts_acpi_table_rsdp *rsdp = NULL;
> fwts_acpi_table_rsdt *rsdt = NULL;
> @@ -923,7 +923,7 @@ static int fwts_acpi_load_tables_fixup(fwts_framework *fw)
> strncpy(rsdt->header.signature, "RSDT", 4);
> rsdt->header.length = size;
> rsdt->header.revision = 1;
> - strncpy(rsdt->header.oem_id, "FWTS ", 6);
> + strncpy(rsdt->header.oem_id, "FWTSID", 6);
> strncpy(rsdt->header.oem_tbl_id, oem_tbl_id, 8);
> rsdt->header.oem_revision = 1;
> strncpy(rsdt->header.creator_id, "FWTS", 4);
> @@ -959,7 +959,7 @@ static int fwts_acpi_load_tables_fixup(fwts_framework *fw)
> strncpy(xsdt->header.signature, "XSDT", 4);
> xsdt->header.length = size;
> xsdt->header.revision = 2;
> - strncpy(xsdt->header.oem_id, "FWTS ", 6);
> + strncpy(xsdt->header.oem_id, "FWTSID", 6);
> strncpy(xsdt->header.oem_tbl_id, oem_tbl_id, 8);
> xsdt->header.oem_revision = 1;
> strncpy(xsdt->header.creator_id, "FWTS", 4);
> @@ -985,7 +985,7 @@ static int fwts_acpi_load_tables_fixup(fwts_framework *fw)
> }
>
> strncpy(rsdp->signature, "RSD PTR ", 8);
> - strncpy(rsdp->oem_id, "FWTS ", 6);
> + strncpy(rsdp->oem_id, "FWTSID", 6);
> rsdp->revision = 2;
> rsdp->length = sizeof(fwts_acpi_table_rsdp);
> rsdp->reserved[0] = 0;
>
Acked-by: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list