fwts icon indicating copy to clipboard operation
fwts copied to clipboard

method: \_SB_.NVDR.N000._NIH should return a buffer of 64 bytes, but instead returned 4 bytes.

Open liupeng17 opened this issue 3 years ago • 1 comments

On a platform with NVDIMM deivices, fwts reports the errors ``method: _SB_.NVDR.N000._NIH should return a buffer of 64 bytes, but instead returned 4 bytes.'' But according to ACPI spec definition of _NIH, the length of _NIH output buffer is 4 bytes instead of 64 bytes.

Seems fwts/src/lib/src/fwts_acpi_object_eval.c should be changed:

diff --git a/src/lib/src/fwts_acpi_object_eval.c b/src/lib/src/fwts_acpi_object_eval.c
index 94956896..81c12013 100644
--- a/src/lib/src/fwts_acpi_object_eval.c
+++ b/src/lib/src/fwts_acpi_object_eval.c
@@ -2602,7 +2602,7 @@ void fwts_method_test_NIH_return(
        if (fwts_method_check_type(fw, name, buf, ACPI_TYPE_BUFFER) != FWTS_OK)
                return;

-       if (fwts_method_buffer_size(fw, name, obj, 64) != FWTS_OK)
+       if (fwts_method_buffer_size(fw, name, obj, 4) != FWTS_OK)
                passed = false;

        ret = (nih_return_t *) obj->Buffer.Pointer;

liupeng17 avatar Jul 06 '22 07:07 liupeng17

This is not the official github repository, please re-do the issue report against https://github.com/fwts/

ColinIanKing avatar Dec 08 '23 10:12 ColinIanKing