diff options
author | Igor Mammedov <imammedo@redhat.com> | 2015-02-18 19:14:33 +0000 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2015-02-26 13:04:14 +0100 |
commit | 19fff2d405d3bcc88fd7b860ec47797b3f7af977 (patch) | |
tree | 2bf7e7c4a984cad9d8588e8a674cc81f0d5d57f2 /include | |
parent | 52fa397c58667080979e8aa64177c0f69b1851b7 (diff) |
acpi: include PkgLength size only when requested
Named/Reserved{Field} definition uses PkgLength [1] encoding to specify
field length, however it doesn't include size of PkgLength field itself,
while other block objects that have explicit length of its body account
for PkgLength size while encoding it [2].
This special casing isn't mentioned in ACPI spec, but that's what 'iasl'
compiles NamedField to so add extra argument to build_prepend_pkg_length()
to allow it handle the case.
--
1. ACPI Spec 5.0, 20.2.5.2 Named Objects Encoding, page 822
2. ACPI Spec 5.0, 5.4 Definition Block Encoding
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/acpi/aml-build.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h index 298e2ef3b1..b7f491ef02 100644 --- a/include/hw/acpi/aml-build.h +++ b/include/hw/acpi/aml-build.h @@ -99,7 +99,8 @@ void build_append_array(GArray *array, GArray *val); void GCC_FMT_ATTR(2, 3) build_append_namestring(GArray *array, const char *format, ...); -void build_prepend_package_length(GArray *package); +void +build_prepend_package_length(GArray *package, unsigned length, bool incl_self); void build_package(GArray *package, uint8_t op); void build_append_int(GArray *table, uint64_t value); void build_extop_package(GArray *package, uint8_t op); |