- 18 1月, 2019 3 次提交
-
-
由 Igor Mammedov 提交于
AcpiSdtTable::header::signature is the only remained field from AcpiTableHeader structure used by tests. Instead of using packed structure to access signature, just read it directly from table blob and remove no longer used AcpiSdtTable::header / union and keep only AcpiSdtTable::aml byte array. Signed-off-by: NIgor Mammedov <imammedo@redhat.com> Acked-by: NThomas Huth <thuth@redhat.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Igor Mammedov 提交于
replace a bunch of ACPI_READ_ARRAY/ACPI_READ_FIELD macro, that read SMBIOS table field by field with one memread() to fetch whole table at once and drop no longer used ACPI_READ_ARRAY/ACPI_READ_FIELD macro. Signed-off-by: NIgor Mammedov <imammedo@redhat.com> Acked-by: NThomas Huth <thuth@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Igor Mammedov 提交于
Move fetch_table() into acpi-utils.c renaming it to acpi_fetch_table() and reuse it in vmgenid-test that reads RSDT and then tables it references, to find and parse VMGNEID SSDT. While at it wrap RSDT referenced tables enumeration into FOREACH macro (similar to what we do with QLIST_FOREACH & co) to reuse it with bios and vmgenid tests. Signed-off-by: NIgor Mammedov <imammedo@redhat.com> Acked-by: NThomas Huth <thuth@redhat.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 15 1月, 2019 1 次提交
-
-
由 Igor Mammedov 提交于
Currently in the 1st case we store table body fetched from QEMU in AcpiSdtTable::aml minus it's header but in the 2nd case when we load reference aml from disk, it holds whole blob including header. More over in the 1st case, we read header in separate AcpiSdtTable::header structure and then jump over hoops to fixup tables and combine both. Treat AcpiSdtTable::aml as whole table blob approach in both cases and when fetching tables from QEMU, first get table length and then fetch whole table into AcpiSdtTable::aml instead if doing it field by field. As result * AcpiSdtTable::aml is used in consistent manner * FADT fixups use offsets from spec instead of being shifted by header length * calculating checksums and dumping blobs becomes simpler Signed-off-by: NIgor Mammedov <imammedo@redhat.com> Acked-by: NThomas Huth <thuth@redhat.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 21 12月, 2018 1 次提交
-
-
由 Samuel Ortiz 提交于
The only remaining AcpiRsdpDescriptor users are the ACPI utils for the BIOS table tests. We remove that dependency and can thus remove the structure itself. Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com> Reviewed-by: NIgor Mammedov <imammedo@redhat.com> Reviewed-by: NAndrew Jones <drjones@redhat.com> Signed-off-by: NIgor Mammedov <imammedo@redhat.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 17 12月, 2018 2 次提交
-
-
由 Igor Mammedov 提交于
Signed-off-by: NIgor Mammedov <imammedo@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> [thuth: Fixed conflicts with additional "qts" parameter] Signed-off-by: NThomas Huth <thuth@redhat.com>
-
由 Eric Blake 提交于
As a general rule, we prefer avoiding implicit global state because it makes code harder to safely copy and paste without thinking about the global state. Adjust the helper code to use explicit state instead, and update all callers. bios-tables-test no longer depends on global_qtest, now that it passes explicit state through the testsuite data; an assert proves this fact (although we will get rid of it later, once global_qtest is gone). Signed-off-by: NEric Blake <eblake@redhat.com> Acked-by: NIgor Mammedov <imammedo@redhat.com> Tested-by: NIgor Mammedov <imammedo@redhat.com> [thuth: adapted patch to current master branch] Signed-off-by: NThomas Huth <thuth@redhat.com>
-
- 16 1月, 2018 1 次提交
-
-
由 Eric Blake 提交于
The point of writing a macro embedded in a 'do { ... } while (0)' loop (particularly if the macro has multiple statements or would otherwise end with an 'if' statement) is so that the macro can be used as a drop-in statement with the caller supplying the trailing ';'. Although our coding style frowns on brace-less 'if': if (cond) statement; else something else; that is the classic case where failure to use do/while(0) wrapping would cause the 'else' to pair with any embedded 'if' in the macro rather than the intended outer 'if'. But conversely, if the macro includes an embedded ';', then the same brace-less coding style would now have two statements, making the 'else' a syntax error rather than pairing with the outer 'if'. Thus, even though our coding style with required braces is not impacted, ending a macro with ';' makes our code harder to port to projects that use brace-less styles. The change should have no semantic impact. I was not able to fully compile-test all of the changes (as some of them are examples of the ugly bit-rotting debug print statements that are completely elided by default, and I didn't want to recompile with the necessary -D witnesses - cleaning those up is left as a bite-sized task for another day); I did, however, audit that for all files touched, all callers of the changed macros DID supply a trailing ';' at the callsite, and did not appear to be used as part of a brace-less conditional. Found mechanically via: $ git grep -B1 'while (0);' | grep -A1 \\\\ Signed-off-by: NEric Blake <eblake@redhat.com> Acked-by: NCornelia Huck <cohuck@redhat.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Acked-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20171201232433.25193-7-eblake@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 17 11月, 2017 1 次提交
-
-
由 Thomas Huth 提交于
The bios-tables-test was writing out files that we pass to iasl in with the wrong endianness in the header when running on a big endian host. So instead of storing mixed endian information in our structures, let's keep everything in little endian and byte-swap it only when we need a value in the code. Reported-by: NDaniel P. Berrange <berrange@redhat.com> Buglink: https://bugs.launchpad.net/qemu/+bug/1724570Suggested-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NThomas Huth <thuth@redhat.com> Tested-by: N"Daniel P. Berrange" <berrange@redhat.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 03 5月, 2017 1 次提交
-
-
由 Phil Dennis-Jordan 提交于
This updates the FADT generated for x86/64 machine types from Revision 1 to 3. (Based on ACPI standard 2.0 instead of 1.0) The intention is to expose the reset register information to guest operating systems which require it, specifically OS X/macOS. Revision 1 FADTs do not contain the fields relating to the reset register. The new layout and contents remains backwards-compatible with operating systems which only support ACPI 1.0, as the existing fields are not modified by this change, as the 64-bit and 32-bit variants are allowed to co-exist according to the ACPI 2.0 standard. No regressions became apparent in tests with a range of Windows (XP-10) and Linux versions. The BIOS tables test suite's FADT checksum test has also been updated to reflect the new FADT layout and content. Signed-off-by: NPhil Dennis-Jordan <phil@philjordan.eu> Message-Id: <1489558827-28971-2-git-send-email-phil@philjordan.eu> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 31 3月, 2017 1 次提交
-
-
由 Michael S. Tsirkin 提交于
There's no reason to pack structures where we don't care about size or padding, this applies to AcpiStdTable in tests/acpi-utils.h. OTOH bios-tables-test happens to be passing the address of a field in this struct to a function that expects a pointer to normally aligned data which results in a SIGBUS on architectures like SPARC that have strict alignment requirements. Fixes: 9e8458c0 ("acpi unit-test: compare DSDT and SSDT tables against expected values") Reported-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Tested-by: NPeter Maydell <peter.maydell@linaro.org>
-
- 02 3月, 2017 1 次提交
-
-
由 Ben Warren 提交于
Also usable by upcoming VM Generation ID tests Signed-off-by: NBen Warren <ben@skyportsystems.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
-