aboutsummaryrefslogtreecommitdiff
path: root/source/compiler/aslprepkg.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2013-04-04 21:18:57 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2013-04-04 21:18:57 +0000
commit0ff2ef6cfe11e98b10c26dc8f1c359e6502538c8 (patch)
tree2d060ed4fedfc9aace2e673176570faa8ae1d376 /source/compiler/aslprepkg.c
parent6bb10c5e2fa82c104e57c7468335930ba9e47d4f (diff)
downloadsrc-0ff2ef6cfe11e98b10c26dc8f1c359e6502538c8.tar.gz
src-0ff2ef6cfe11e98b10c26dc8f1c359e6502538c8.zip
Import ACPICA 20130328.vendor/acpica/20130328
Notes
Notes: svn path=/vendor-sys/acpica/dist/; revision=249109 svn path=/vendor-sys/acpica/20130328/; revision=249110; tag=vendor/acpica/20130328
Diffstat (limited to 'source/compiler/aslprepkg.c')
-rw-r--r--source/compiler/aslprepkg.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/source/compiler/aslprepkg.c b/source/compiler/aslprepkg.c
index e8434d529256..da34947fb0be 100644
--- a/source/compiler/aslprepkg.c
+++ b/source/compiler/aslprepkg.c
@@ -126,15 +126,35 @@ ApCheckPackage (
Count = (UINT32) Op->Asl.Value.Integer;
/*
- * Most packages must have at least one element. The only exception
- * is the variable-length package (ACPI_PTYPE1_VAR).
+ * Many of the variable-length top-level packages are allowed to simply
+ * have zero elements. This allows the BIOS to tell the host that even
+ * though the predefined name/method exists, the feature is not supported.
+ * Other package types require one or more elements. In any case, there
+ * is no need to continue validation.
*/
if (!Count)
{
- if (Package->RetInfo.Type != ACPI_PTYPE1_VAR)
+ switch (Package->RetInfo.Type)
{
+ case ACPI_PTYPE1_FIXED:
+ case ACPI_PTYPE1_OPTION:
+ case ACPI_PTYPE2_PKG_COUNT:
+ case ACPI_PTYPE2_REV_FIXED:
+
ApZeroLengthPackage (Predefined->Info.Name, ParentOp);
+ break;
+
+ case ACPI_PTYPE1_VAR:
+ case ACPI_PTYPE2:
+ case ACPI_PTYPE2_COUNT:
+ case ACPI_PTYPE2_FIXED:
+ case ACPI_PTYPE2_MIN:
+ case ACPI_PTYPE2_FIX_VAR:
+ default:
+
+ break;
}
+
return;
}