Lines Matching +full:entry +full:- +full:method
1 // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
4 * Module Name: nsarguments - Validation of args for ACPI predefined methods
6 * Copyright (C) 2000 - 2023, Intel Corp.
22 * PARAMETERS: info - Method execution information block
41 * Also, ignore typecheck if warnings/errors if this method in acpi_ns_check_argument_types()
42 * has already been evaluated at least once -- in order in acpi_ns_check_argument_types()
45 if (!info->predefined || (info->node->flags & ANOBJ_EVALUATED)) { in acpi_ns_check_argument_types()
49 arg_type_list = info->predefined->info.argument_list; in acpi_ns_check_argument_types()
54 for (i = 0; ((i < arg_count) && (i < info->param_count)); i++) { in acpi_ns_check_argument_types()
56 user_arg_type = info->parameters[i]->common.type; in acpi_ns_check_argument_types()
61 ACPI_WARN_PREDEFINED((AE_INFO, info->full_pathname, in acpi_ns_check_argument_types()
63 "Argument #%u type mismatch - " in acpi_ns_check_argument_types()
70 /* Prevent any additional typechecking for this method */ in acpi_ns_check_argument_types()
72 info->node->flags |= ANOBJ_EVALUATED; in acpi_ns_check_argument_types()
81 * PARAMETERS: pathname - Full pathname to the node (for error msgs)
82 * node - Namespace node for the method/object
83 * predefined - Pointer to entry in predefined name table
101 if (!predefined || (node->flags & ANOBJ_EVALUATED)) { in acpi_ns_check_acpi_compliance()
105 /* Get the ACPI-required arg count from the predefined info table */ in acpi_ns_check_acpi_compliance()
108 METHOD_GET_ARG_COUNT(predefined->info.argument_list); in acpi_ns_check_acpi_compliance()
111 * If this object is not a control method, we can check if the ACPI in acpi_ns_check_acpi_compliance()
112 * spec requires that it be a method. in acpi_ns_check_acpi_compliance()
114 if (node->type != ACPI_TYPE_METHOD) { in acpi_ns_check_acpi_compliance()
117 /* Object requires args, must be implemented as a method */ in acpi_ns_check_acpi_compliance()
121 "Object (%s) must be a control method with %u arguments", in acpi_ns_check_acpi_compliance()
122 acpi_ut_get_type_name(node-> in acpi_ns_check_acpi_compliance()
126 && !predefined->info.expected_btypes) { in acpi_ns_check_acpi_compliance()
128 /* Object requires no args and no return value, must be a method */ in acpi_ns_check_acpi_compliance()
132 "Object (%s) must be a control method " in acpi_ns_check_acpi_compliance()
134 acpi_ut_get_type_name(node-> in acpi_ns_check_acpi_compliance()
142 * This is a control method. in acpi_ns_check_acpi_compliance()
143 * Check that the ASL/AML-defined parameter count for this method in acpi_ns_check_acpi_compliance()
144 * matches the ACPI-required parameter count in acpi_ns_check_acpi_compliance()
151 aml_param_count = node->object->method.param_count; in acpi_ns_check_acpi_compliance()
155 "Insufficient arguments - " in acpi_ns_check_acpi_compliance()
160 && !(predefined->info. in acpi_ns_check_acpi_compliance()
163 "Excess arguments - " in acpi_ns_check_acpi_compliance()
174 * PARAMETERS: pathname - Full pathname to the node (for error msgs)
175 * node - Namespace node for the method/object
176 * user_param_count - Number of args passed in by the caller
177 * predefined - Pointer to entry in predefined name table
195 if (node->flags & ANOBJ_EVALUATED) { in acpi_ns_check_argument_count()
202 * against the count that is specified in the method/object. in acpi_ns_check_argument_count()
204 if (node->type != ACPI_TYPE_METHOD) { in acpi_ns_check_argument_count()
208 "%u arguments were passed to a non-method ACPI object (%s)", in acpi_ns_check_argument_count()
211 (node->type))); in acpi_ns_check_argument_count()
218 * This is a control method. Check the parameter count. in acpi_ns_check_argument_count()
220 * argument count declared for the method in the ASL/AML. in acpi_ns_check_argument_count()
225 * Note: Too many arguments will not cause the method to in acpi_ns_check_argument_count()
226 * fail. However, the method will fail if there are too few in acpi_ns_check_argument_count()
227 * arguments and the method attempts to use one of the missing ones. in acpi_ns_check_argument_count()
229 aml_param_count = node->object->method.param_count; in acpi_ns_check_argument_count()
234 "Insufficient arguments - " in acpi_ns_check_argument_count()
235 "Caller passed %u, method requires %u", in acpi_ns_check_argument_count()
241 "Excess arguments - " in acpi_ns_check_argument_count()
242 "Caller passed %u, method requires %u", in acpi_ns_check_argument_count()
251 * This is a predefined name. Validate the user-supplied parameter in acpi_ns_check_argument_count()
253 * the method itself because what is important here is that the in acpi_ns_check_argument_count()
255 * method was checked against the ACPI spec earlier.) in acpi_ns_check_argument_count()
261 METHOD_GET_ARG_COUNT(predefined->info.argument_list); in acpi_ns_check_argument_count()
265 "Insufficient arguments - " in acpi_ns_check_argument_count()
269 !(predefined->info.argument_list & ARG_COUNT_IS_MINIMUM)) { in acpi_ns_check_argument_count()
271 "Excess arguments - " in acpi_ns_check_argument_count()