[PATCH 4/4] acpi: method: add check for _GTF and _GTM
Colin Ian King
colin.king at canonical.com
Wed Sep 10 08:19:57 UTC 2014
On 10/09/14 08:56, Alex Hung wrote:
> Signed-off-by: Alex Hung <alex.hung at canonical.com>
> ---
> src/acpi/method/method.c | 24 ++++++++++++++++++++----
> 1 file changed, 20 insertions(+), 4 deletions(-)
>
> diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
> index b2f83c8..c9a5c37 100644
> --- a/src/acpi/method/method.c
> +++ b/src/acpi/method/method.c
> @@ -109,8 +109,8 @@
> * _GPE 5.3.1, 12.11 N
> * _GRT 9.18.3 Y
> * _GSB 6.2.6 Y
> - * _GTF 9.8.1.1 N
> - * _GTM 9.8.2.1.1 N
> + * _GTF 9.8.1.1 Y
> + * _GTM 9.8.2.1.1 Y
> * _GTS 7.3.3 deprecated
> * _GWS 9.18.5 Y
> * _HID 6.1.5 Y
> @@ -3398,6 +3398,22 @@ static int method_test_LID(fwts_framework *fw)
> "_LID", NULL, 0, method_test_LID_return, NULL);
> }
>
> +
> +/*
> + * Section 9.8 ATA Controllers
> + */
> +static int method_test_GTF(fwts_framework *fw)
> +{
> + return method_evaluate_method(fw, METHOD_OPTIONAL,
> + "_GTF", NULL, 0, method_test_buffer_return, NULL);
GTF returns a buffer that is a multiple of 7 bytes long, so it it maybe
also useful to sanity check the size too, e.g.
/* check for incorrect size */
if (obj->Buffer.Length % 7)
fwts_failed(...)
> +}
> +
> +static int method_test_GTM(fwts_framework *fw)
> +{
> + return method_evaluate_method(fw, METHOD_OPTIONAL,
> + "_GTM", NULL, 0, method_test_buffer_return, NULL);
likewise, GTM returns a buffer that is a multiple of 40 bytes
5*sizeof(uint32_t), so it is probably also useful to check that too.
> +}
> +
> /*
> * Section 9.16 User Presence Detection Device
> */
> @@ -5180,8 +5196,8 @@ static fwts_framework_minor_test method_tests[] = {
> { method_test_LID, "Test _LID (Lid Status)." },
>
> /* Section 9.8 ATA Controllers */
> - /* { method_test_GTF, "Test _GTF (Get Task File)." }, */
> - /* { method_test_GTM, "Test _GTM (Get Timing Mode)." }, */
> + { method_test_GTF, "Test _GTF (Get Task File)." },
> + { method_test_GTM, "Test _GTM (Get Timing Mode)." },
> /* { method_test_SDD, "Test _SDD (Set Device Data)." }, */
> /* { method_test_STM, "Test _STM (Set Timing Mode)." }, */
>
>
More information about the fwts-devel
mailing list