Home | History | Annotate | Download | only in namespace

Lines Matching defs:Package

3  * Module Name: nsprepkg - Validation of package objects for predefined names
167 const ACPI_PREDEFINED_INFO *Package,
198 * DESCRIPTION: Check a returned package object for the correct count and
209 const ACPI_PREDEFINED_INFO *Package;
220 /* The package info for this name is in the next table entry */
222 Package = Info->Predefined + 1;
225 "%s Validating return Package of Type %X, Count %X\n",
226 Info->FullPathname, Package->RetInfo.Type,
227 ReturnObject->Package.Count));
231 * and trailing NULL package elements
233 AcpiNsRemoveNullElements (Info, Package->RetInfo.Type, ReturnObject);
235 /* Extract package count and elements array */
237 Elements = ReturnObject->Package.Elements;
238 Count = ReturnObject->Package.Count;
242 * is the variable-length package (ACPI_PTYPE1_VAR).
246 if (Package->RetInfo.Type == ACPI_PTYPE1_VAR)
252 "Return Package has no elements (empty)"));
258 * Decode the type of the expected package contents
263 switch (Package->RetInfo.Type)
272 * The package count is fixed and there are no subpackages
274 * If package is too small, exit.
275 * If package is larger than expected, issue warning but continue
277 ExpectedCount = Package->RetInfo.Count1 + Package->RetInfo.Count2;
285 "%s: Return Package is larger than needed - "
290 /* Validate all elements of the returned package */
293 Package->RetInfo.ObjectType1, Package->RetInfo.Count1,
294 Package->RetInfo.ObjectType2, Package->RetInfo.Count2, 0);
299 * The package count is variable, there are no subpackages, and all
305 Package->RetInfo.ObjectType1, i);
317 * The package count is variable, there are no subpackages. There are
321 * Check if package is at least as large as the minimum required
323 ExpectedCount = Package->RetInfo3.Count;
333 if (i < Package->RetInfo3.Count)
335 /* These are the required package elements (0, 1, or 2) */
338 Package->RetInfo3.ObjectType[i], i);
346 /* These are the optional package elements */
349 Package->RetInfo3.TailObjectType, i);
376 Status = AcpiNsCheckPackageList (Info, Package, Elements, Count);
391 * Count cannot be larger than the parent package length, but allow it
405 Status = AcpiNsCheckPackageList (Info, Package, Elements, Count);
414 * These types all return a single Package that consists of a
419 * package instead of a Package of Packages (a common error if
421 Package with a new outer Package.
425 /* Create the new outer package and populate it */
434 /* Update locals to point to the new package (of 1 element) */
437 Elements = ReturnObject->Package.Elements;
443 Status = AcpiNsCheckPackageList (Info, Package, Elements, Count);
455 /* The package must contain pairs of (UUID + type) */
466 Package->RetInfo.ObjectType1, 0);
482 Package->RetInfo.ObjectType2, 0);
499 Package->RetInfo.Type));
509 /* Error exit for the case with an incorrect package count */
512 "Return Package is too small - found %u elements, expected %u",
524 * Package - Pointer to package-specific info for method
525 * Elements - Element list of parent package. All elements
526 * of this list should be of type Package.
538 const ACPI_PREDEFINED_INFO *Package,
551 * Validate each subpackage in the parent Package
560 SubElements = SubPackage->Package.Elements;
563 /* Each sub-object must be of type Package */
575 switch (Package->RetInfo.Type)
583 ExpectedCount = Package->RetInfo.Count1 + Package->RetInfo.Count2;
584 if (SubPackage->Package.Count < ExpectedCount)
590 Package->RetInfo.ObjectType1,
591 Package->RetInfo.Count1,
592 Package->RetInfo.ObjectType2,
593 Package->RetInfo.Count2, 0);
605 ExpectedCount = Package->RetInfo.Count1 + Package->RetInfo.Count2;
606 if (SubPackage->Package.Count < ExpectedCount)
612 Package->RetInfo.ObjectType1,
613 Package->RetInfo.Count1,
614 Package->RetInfo.ObjectType2,
615 SubPackage->Package.Count - Package->RetInfo.Count1, 0);
632 ExpectedCount = Package->RetInfo2.Count;
633 if (SubPackage->Package.Count < ExpectedCount)
643 Package->RetInfo2.ObjectType[j], j);
655 ExpectedCount = Package->RetInfo.Count1;
656 if (SubPackage->Package.Count < ExpectedCount)
664 Package->RetInfo.ObjectType1,
665 SubPackage->Package.Count, 0, 0, 0);
685 * Make sure package is large enough for the Count and is
689 if (SubPackage->Package.Count < ExpectedCount)
694 if (SubPackage->Package.Count < Package->RetInfo.Count1)
696 ExpectedCount = Package->RetInfo.Count1;
708 ExpectedCount = SubPackage->Package.Count;
715 Package->RetInfo.ObjectType1,
725 ACPI_ERROR ((AE_INFO, "Invalid Package type: %X",
726 Package->RetInfo.Type));
742 i, SubPackage->Package.Count, ExpectedCount));
753 * Elements - Pointer to the package elements array
754 * Count - Element count for the package
758 * DESCRIPTION: Check a returned package object for the correct count and
785 "Return Package has invalid object type for version number"));
800 "Return Package is too small - found %u elements, expected %u",
807 "%s: Return Package is larger than needed - "
812 /* Validate all elements of the returned package */
839 * Elements - Pointer to the package elements array
848 * DESCRIPTION: Check that all elements of a package are of the correct object
871 * Up to two groups of package elements are supported by the data