ACK: [PATCH 03/30] acpi: re-orgainise HPET tests #2

Alex Hung alex.hung at canonical.com
Tue Jun 23 05:40:26 UTC 2015


On 06/18/2015 04:49 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
> 
> Update makefile, add in HPET code from acpitables HPET test
> and rename the test.
> 
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  src/Makefile.am      |  2 +-
>  src/acpi/hpet/hpet.c | 18 ++++++++++++++++--
>  2 files changed, 17 insertions(+), 3 deletions(-)
> 
> diff --git a/src/Makefile.am b/src/Makefile.am
> index d81c3e8..2a3e373 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -47,6 +47,7 @@ fwts_SOURCES = main.c 				\
>  	acpi/fan/fan.c 				\
>  	acpi/gpedump/gpedump.c			\
>  	acpi/hest/hest.c			\
> +	acpi/hpet/hpet.c 			\
>  	acpi/lid/lid.c 				\
>  	acpi/mcfg/mcfg.c 			\
>  	acpi/method/method.c 			\
> @@ -89,7 +90,6 @@ fwts_SOURCES = main.c 				\
>  	cpu/microcode/microcode.c 		\
>  	dmi/dmicheck/dmicheck.c 		\
>  	hotkey/hotkey/hotkey.c 			\
> -	hpet/hpet_check/hpet_check.c 		\
>  	kernel/klog/klog.c 			\
>  	kernel/oops/oops.c 			\
>  	kernel/version/version.c 		\
> diff --git a/src/acpi/hpet/hpet.c b/src/acpi/hpet/hpet.c
> index 6ccd3b0..aa1fa9a 100644
> --- a/src/acpi/hpet/hpet.c
> +++ b/src/acpi/hpet/hpet.c
> @@ -28,6 +28,7 @@
>  
>  static fwts_list *klog;
>  
> +
>  #define HPET_REG_SIZE  (0x400)
>  #define MAX_CLK_PERIOD (100000000)
>  
> @@ -293,6 +294,19 @@ static int hpet_check_test2(fwts_framework *fw)
>  		passed = false;
>  	}
>  
> +	if (((hpet->event_timer_block_id >> 16) & 0xffff) == 0) {
> +		fwts_failed(fw, LOG_LEVEL_MEDIUM, "HPETVendorIdZero",
> +			"HPET PCI Vendor ID is 0x0000, which is invalid.");
> +		fwts_advice(fw,
> +			"The HPET specification (http://www.intel.com/hardwaredesign/hpetspec_1.pdf) "
> +			"describes the HPET table in section 3.2.4 'The ACPI "
> +			"2.0 HPET Description Table (HPET)'. The top 16 bits "
> +			"of the Event Timer Block ID specify the Vendor ID "
> +			"and this should not be zero.  This won't affect the "
> +			"kernel behaviour, but should be fixed as it is an "
> +			"undefined ID value.");
> +	}
> +
>  	/*
>  	 * We don't need to check for GAS address space widths etc
>  	 * since the kernel does not care and the spec doesn't
> @@ -431,13 +445,13 @@ static fwts_framework_minor_test hpet_check_tests[] = {
>  };
>  
>  static fwts_framework_ops hpet_check_ops = {
> -	.description = "HPET configuration tests.",
> +	.description = "HPET IA-PC High Precision Event Timer Tanble tests.",
>  	.init        = hpet_check_init,
>  	.deinit      = hpet_check_deinit,
>  	.minor_tests = hpet_check_tests
>  };
>  
> -FWTS_REGISTER("hpet_check", &hpet_check_ops, FWTS_TEST_ANYTIME,
> +FWTS_REGISTER("hpet", &hpet_check_ops, FWTS_TEST_ANYTIME,
>  	FWTS_FLAG_BATCH | FWTS_FLAG_ROOT_PRIV | FWTS_FLAG_TEST_ACPI)
>  
>  #endif
> 

Acked-by: Alex Hung <alex.hung at canonical.com>



More information about the fwts-devel mailing list