diff options
Diffstat (limited to 'drivers/acpi/acpica/tbprint.c')
| -rw-r--r-- | drivers/acpi/acpica/tbprint.c | 34 | 
1 files changed, 24 insertions, 10 deletions
diff --git a/drivers/acpi/acpica/tbprint.c b/drivers/acpi/acpica/tbprint.c index dc963f823d2..df3bb20ea32 100644 --- a/drivers/acpi/acpica/tbprint.c +++ b/drivers/acpi/acpica/tbprint.c @@ -5,7 +5,7 @@   *****************************************************************************/  /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp.   * All rights reserved.   *   * Redistribution and use in source and binary forms, with or without @@ -128,17 +128,19 @@ acpi_tb_print_table_header(acpi_physical_address address,  	struct acpi_table_header local_header;  	/* -	 * The reason that the Address is cast to a void pointer is so that we -	 * can use %p which will work properly on both 32-bit and 64-bit hosts. +	 * The reason that we use ACPI_PRINTF_UINT and ACPI_FORMAT_TO_UINT is to +	 * support both 32-bit and 64-bit hosts/addresses in a consistent manner. +	 * The %p specifier does not emit uniform output on all hosts. On some, +	 * leading zeros are not supported.  	 */  	if (ACPI_COMPARE_NAME(header->signature, ACPI_SIG_FACS)) {  		/* FACS only has signature and length fields */ -		ACPI_INFO((AE_INFO, "%4.4s %p %05X", -			   header->signature, ACPI_CAST_PTR(void, address), +		ACPI_INFO((AE_INFO, "%-4.4s " ACPI_PRINTF_UINT " %06X", +			   header->signature, ACPI_FORMAT_TO_UINT(address),  			   header->length)); -	} else if (ACPI_COMPARE_NAME(header->signature, ACPI_SIG_RSDP)) { +	} else if (ACPI_VALIDATE_RSDP_SIG(header->signature)) {  		/* RSDP has no common fields */ @@ -147,8 +149,9 @@ acpi_tb_print_table_header(acpi_physical_address address,  					  header)->oem_id, ACPI_OEM_ID_SIZE);  		acpi_tb_fix_string(local_header.oem_id, ACPI_OEM_ID_SIZE); -		ACPI_INFO((AE_INFO, "RSDP %p %05X (v%.2d %6.6s)", -			   ACPI_CAST_PTR(void, address), +		ACPI_INFO((AE_INFO, +			   "RSDP " ACPI_PRINTF_UINT " %06X (v%.2d %-6.6s)", +			   ACPI_FORMAT_TO_UINT(address),  			   (ACPI_CAST_PTR(struct acpi_table_rsdp, header)->  			    revision >  			    0) ? ACPI_CAST_PTR(struct acpi_table_rsdp, @@ -162,8 +165,9 @@ acpi_tb_print_table_header(acpi_physical_address address,  		acpi_tb_cleanup_table_header(&local_header, header);  		ACPI_INFO((AE_INFO, -			   "%4.4s %p %05X (v%.2d %6.6s %8.8s %08X %4.4s %08X)", -			   local_header.signature, ACPI_CAST_PTR(void, address), +			   "%-4.4s " ACPI_PRINTF_UINT +			   " %06X (v%.2d %-6.6s %-8.8s %08X %-4.4s %08X)", +			   local_header.signature, ACPI_FORMAT_TO_UINT(address),  			   local_header.length, local_header.revision,  			   local_header.oem_id, local_header.oem_table_id,  			   local_header.oem_revision, @@ -190,6 +194,16 @@ acpi_status acpi_tb_verify_checksum(struct acpi_table_header *table, u32 length)  {  	u8 checksum; +	/* +	 * FACS/S3PT: +	 * They are the odd tables, have no standard ACPI header and no checksum +	 */ + +	if (ACPI_COMPARE_NAME(table->signature, ACPI_SIG_S3PT) || +	    ACPI_COMPARE_NAME(table->signature, ACPI_SIG_FACS)) { +		return (AE_OK); +	} +  	/* Compute the checksum on the table */  	checksum = acpi_tb_checksum(ACPI_CAST_PTR(u8, table), length);  | 
