diff options
author | Bob Moore <robert.moore@intel.com> | 2013-05-30 10:00:01 +0800 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-06-01 21:54:30 +0200 |
commit | 29a241cc02110b8b2259fd72719b8cadc03909be (patch) | |
tree | a96c10dd22a35479dc2e1ef140f7d90a442f9c03 /drivers/acpi/acpica/acstruct.h | |
parent | e1405ca5ebf1068a0d62afd2fec8f0354038147a (diff) | |
download | blackbird-obmc-linux-29a241cc02110b8b2259fd72719b8cadc03909be.tar.gz blackbird-obmc-linux-29a241cc02110b8b2259fd72719b8cadc03909be.zip |
ACPICA: Add argument typechecking for all predefined ACPI names
Fully implements typechecking on all incoming arguments for all
predefined names. This ensures that ACPI-related drivers are
passing the correct number of arguments, each of the correct
object type.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Acked-by: Len Brown <len.brown@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/acstruct.h')
-rw-r--r-- | drivers/acpi/acpica/acstruct.h | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/drivers/acpi/acpica/acstruct.h b/drivers/acpi/acpica/acstruct.h index 7896d85876ca..fc83c0a5ca70 100644 --- a/drivers/acpi/acpica/acstruct.h +++ b/drivers/acpi/acpica/acstruct.h @@ -178,25 +178,41 @@ union acpi_aml_operands { }; /* - * Structure used to pass object evaluation parameters. + * Structure used to pass object evaluation information and parameters. * Purpose is to reduce CPU stack use. */ struct acpi_evaluate_info { - struct acpi_namespace_node *prefix_node; - char *pathname; - union acpi_operand_object *obj_desc; - union acpi_operand_object **parameters; - struct acpi_namespace_node *resolved_node; - union acpi_operand_object *return_object; - u8 param_count; - u8 pass_number; - u8 return_object_type; - u8 flags; + /* The first 3 elements are passed by the caller to acpi_ns_evaluate */ + + struct acpi_namespace_node *prefix_node; /* Input: starting node */ + char *relative_pathname; /* Input: path relative to prefix_node */ + union acpi_operand_object **parameters; /* Input: argument list */ + + struct acpi_namespace_node *node; /* Resolved node (prefix_node:relative_pathname) */ + union acpi_operand_object *obj_desc; /* Object attached to the resolved node */ + char *full_pathname; /* Full pathname of the resolved node */ + + const union acpi_predefined_info *predefined; /* Used if Node is a predefined name */ + union acpi_operand_object *return_object; /* Object returned from the evaluation */ + union acpi_operand_object *parent_package; /* Used if return object is a Package */ + + u32 return_flags; /* Used for return value analysis */ + u32 return_btype; /* Bitmapped type of the returned object */ + u16 param_count; /* Count of the input argument list */ + u8 pass_number; /* Parser pass number */ + u8 return_object_type; /* Object type of the returned object */ + u8 node_flags; /* Same as Node->Flags */ + u8 flags; /* General flags */ }; /* Values for Flags above */ -#define ACPI_IGNORE_RETURN_VALUE 1 +#define ACPI_IGNORE_RETURN_VALUE 1 + +/* Defines for return_flags field above */ + +#define ACPI_OBJECT_REPAIRED 1 +#define ACPI_OBJECT_WRAPPED 2 /* Info used by acpi_ns_initialize_devices */ |