Lines Matching +full:string +full:- +full:support

1 // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
4 * Module Name: utstrtoul64 - String-to-integer conversion support for both
5 * 64-bit and 32-bit integers
17 * This module contains the top-level string to 64/32-bit unsigned integer
20 * 1) A standard strtoul() function that supports 64-bit integers, base
21 * 8/10/16, with integer overflow support. This is used mainly by the
23 * constants than the runtime (interpreter) integer-to-string conversions.
29 * iASL - Preprocessor (constants and math expressions)
30 * iASL - Main parser, conversion of constants to integers
31 * iASL - Data Table Compiler parser (constants and math expressions)
32 * interpreter - Implicit and explicit conversions, GPE method names
33 * interpreter - Repair code for return values from predefined names
34 * debugger - Command line input string conversion
35 * acpi_dump - ACPI table physical addresses
36 * acpi_exec - Support for namespace overrides
45 * but error checking is performed later to flag cases where a 64-bit constant
46 * is wrongly defined in a 32-bit DSDT/SSDT.
51 * support (explicit/implicit) for octal string conversions.
58 * PARAMETERS: string - Null terminated input string,
60 * return_value - Where the converted integer is
64 * 64-bit numeric overflow
66 * DESCRIPTION: Convert a string into an unsigned integer. Always performs a
67 * full 64-bit conversion, regardless of the current global
72 * iASL - Preprocessor (constants and math expressions)
73 * iASL - Main ASL parser, conversion of ASL constants to integers
74 * iASL - Data Table Compiler parser (constants and math expressions)
75 * interpreter - Repair code for return values from predefined names
76 * acpi_dump - ACPI table physical addresses
77 * acpi_exec - Support for namespace overrides
80 acpi_status acpi_ut_strtoul64(char *string, u64 *return_value) in acpi_ut_strtoul64() argument
86 ACPI_FUNCTION_TRACE_STR(ut_strtoul64, string); in acpi_ut_strtoul64()
90 /* A NULL return string returns a value of zero */ in acpi_ut_strtoul64()
92 if (*string == 0) { in acpi_ut_strtoul64()
96 if (!acpi_ut_remove_whitespace(&string)) { in acpi_ut_strtoul64()
103 if (acpi_ut_detect_hex_prefix(&string)) { in acpi_ut_strtoul64()
109 * followed by sequence of octal digits (0-7) in acpi_ut_strtoul64()
111 else if (acpi_ut_detect_octal_prefix(&string)) { in acpi_ut_strtoul64()
115 if (!acpi_ut_remove_leading_zeros(&string)) { in acpi_ut_strtoul64()
120 * Force a full 64-bit conversion. The caller (usually iASL) must in acpi_ut_strtoul64()
121 * check for a 32-bit overflow later as necessary (If current mode in acpi_ut_strtoul64()
122 * is 32-bit, meaning a 32-bit DSDT). in acpi_ut_strtoul64()
128 * Perform the base 8, 10, or 16 conversion. A 64-bit numeric overflow in acpi_ut_strtoul64()
133 status = acpi_ut_convert_octal_string(string, return_value); in acpi_ut_strtoul64()
137 status = acpi_ut_convert_decimal_string(string, return_value); in acpi_ut_strtoul64()
142 status = acpi_ut_convert_hex_string(string, return_value); in acpi_ut_strtoul64()
146 /* Only possible exception from above is a 64-bit overflow */ in acpi_ut_strtoul64()
156 * PARAMETERS: string - Null terminated input string,
161 * DESCRIPTION: Perform a 64-bit conversion with restrictions placed upon
163 * many ASL operators that require an integer operand, and support
164 * an automatic (implicit) conversion from a string operand
168 * -----------------------------------------------------------------------------
180 * The ASCII string is always interpreted as a hexadecimal constant.
189 * 3) The first non-hex character terminates the conversion and returns
192 * 4) Conversion of a null (zero-length) string to an integer is
201 * interpreter - All runtime implicit conversions, as per ACPI specification
202 * iASL - Data Table Compiler parser (constants and math expressions)
206 u64 acpi_ut_implicit_strtoul64(char *string) in acpi_ut_implicit_strtoul64() argument
210 ACPI_FUNCTION_TRACE_STR(ut_implicit_strtoul64, string); in acpi_ut_implicit_strtoul64()
212 if (!acpi_ut_remove_whitespace(&string)) { in acpi_ut_implicit_strtoul64()
221 acpi_ut_remove_hex_prefix(&string); in acpi_ut_implicit_strtoul64()
223 if (!acpi_ut_remove_leading_zeros(&string)) { in acpi_ut_implicit_strtoul64()
230 * On overflow, the input string is simply truncated. in acpi_ut_implicit_strtoul64()
232 acpi_ut_convert_hex_string(string, &converted_integer); in acpi_ut_implicit_strtoul64()
240 * PARAMETERS: string - Null terminated input string,
245 * DESCRIPTION: Perform a 64-bit conversion with the restrictions placed upon
249 * -----------------------------------------------------------------------------
260 * 1) The input string is either a decimal or hexadecimal numeric string.
268 * 3) Behavior on the first non-hex character is not defined by the ACPI
274 * 4) Conversion of a null (zero-length) string to an integer is
283 * interpreter - Runtime ASL to_integer operator, as per the ACPI specification
287 u64 acpi_ut_explicit_strtoul64(char *string) in acpi_ut_explicit_strtoul64() argument
292 ACPI_FUNCTION_TRACE_STR(ut_explicit_strtoul64, string); in acpi_ut_explicit_strtoul64()
294 if (!acpi_ut_remove_whitespace(&string)) { in acpi_ut_explicit_strtoul64()
302 if (acpi_ut_detect_hex_prefix(&string)) { in acpi_ut_explicit_strtoul64()
306 if (!acpi_ut_remove_leading_zeros(&string)) { in acpi_ut_explicit_strtoul64()
313 * On overflow, the input string is simply truncated. in acpi_ut_explicit_strtoul64()
318 acpi_ut_convert_decimal_string(string, &converted_integer); in acpi_ut_explicit_strtoul64()
322 acpi_ut_convert_hex_string(string, &converted_integer); in acpi_ut_explicit_strtoul64()