Lines Matching +full:64 +full:- +full:bit
1 // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
4 * Module Name: tbfadt - FADT table utilities
6 * Copyright (C) 2000 - 2023, Intel Corp.
143 * PARAMETERS: generic_address - GAS struct to be initialized
144 * space_id - ACPI Space ID for this register
145 * byte_width - Width of this register
146 * address - Address of the register
147 * register_name - ASCII name of the ACPI register
166 * Bit width field in the GAS is only one byte long, 255 max. in acpi_tb_init_generic_address()
178 "%s - 32-bit FADT register is too long (%u bytes, %u bits) " in acpi_tb_init_generic_address()
179 "to convert to GAS struct - 255 bits max, truncating", in acpi_tb_init_generic_address()
188 * The 64-bit Address field is non-aligned in the byte packed in acpi_tb_init_generic_address()
191 ACPI_MOVE_64_TO_64(&generic_address->address, &address); in acpi_tb_init_generic_address()
193 /* All other fields are byte-wide */ in acpi_tb_init_generic_address()
195 generic_address->space_id = space_id; in acpi_tb_init_generic_address()
196 generic_address->bit_width = bit_width; in acpi_tb_init_generic_address()
197 generic_address->bit_offset = 0; in acpi_tb_init_generic_address()
198 generic_address->access_width = 0; /* Access width ANY */ in acpi_tb_init_generic_address()
205 * PARAMETERS: register_name - ASCII name of the ACPI register
206 * address32 - 32-bit address of the register
207 * address64 - 64-bit address of the register
209 * RETURN: The resolved 64-bit address
211 * DESCRIPTION: Select between 32-bit and 64-bit versions of addresses within
217 * the 32-bit and 64-bit address fields (FIRMWARE_CTRL/X_FIRMWARE_CTRL and
222 * By default, as per the ACPICA specification, a valid 64-bit address is
223 * used regardless of the value of the 32-bit address. However, this
234 /* 64-bit address is zero, use 32-bit address */ in acpi_tb_select_address()
241 /* Address mismatch between 32-bit and 64-bit versions */ in acpi_tb_select_address()
244 "32/64X %s address mismatch in FADT: " in acpi_tb_select_address()
245 "0x%8.8X/0x%8.8X%8.8X, using %u-bit address", in acpi_tb_select_address()
249 64)); in acpi_tb_select_address()
251 /* 32-bit address override */ in acpi_tb_select_address()
258 /* Default is to use the 64-bit address */ in acpi_tb_select_address()
295 length = fadt_desc->length; in acpi_tb_parse_fadt()
338 * PARAMETERS: table - Pointer to BIOS FADT
339 * length - Length of the table
361 table->revision, ACPI_FADT_CONFORMANCE, in acpi_tb_create_local_fadt()
395 * PARAMETERS: none - acpi_gbl_FADT is used.
400 * Expand 32-bit addresses to 64-bit as necessary. Also validate
404 * contain a copy of the actual BIOS-provided FADT.
406 * Notes on 64-bit register addresses:
408 * After this FADT conversion, later ACPICA code will only use the 64-bit "X"
411 * The 64-bit X fields are optional extensions to the original 32-bit FADT
414 * 32-bit V1.0 fields to the 64-bit X fields if the 64-bit X field is originally
417 * For ACPI 1.0 FADTs (that contain no 64-bit addresses), all 32-bit address
418 * fields are expanded to the corresponding 64-bit X fields in the internal
421 * For ACPI 2.0+ FADTs, all valid (non-zero) 32-bit address fields are expanded
422 * to the corresponding 64-bit X fields, if the 64-bit field is originally
423 * zero. Adhering to the ACPI specification, we completely ignore the 32-bit
424 * field if the 64-bit field is valid, regardless of whether the host OS is
425 * 32-bit or 64-bit.
470 * Expand the 32-bit DSDT addresses to 64-bit as necessary. in acpi_tb_convert_fadt()
471 * Later ACPICA code will always use the X 64-bit field. in acpi_tb_convert_fadt()
483 /* Examine all of the 64-bit extended address fields (X fields) */ in acpi_tb_convert_fadt()
487 * Get the 32-bit and 64-bit addresses, as well as the register in acpi_tb_convert_fadt()
506 * Expand the ACPI 1.0 32-bit addresses to the ACPI 2.0 64-bit "X" in acpi_tb_convert_fadt()
508 * the 64-bit address structures. in acpi_tb_convert_fadt()
511 * Now always use the 64-bit address if it is valid (non-zero), in in acpi_tb_convert_fadt()
512 * accordance with the ACPI specification which states that a 64-bit in acpi_tb_convert_fadt()
513 * address supersedes the 32-bit version. This behavior can be in acpi_tb_convert_fadt()
516 * During 64-bit address construction and verification, in acpi_tb_convert_fadt()
519 * Address32 zero, Address64 [don't care] - Use Address64 in acpi_tb_convert_fadt()
522 * Address32 non-zero, Address64 zero - Copy/use Address32 in acpi_tb_convert_fadt()
523 * Address32 non-zero == Address64 non-zero - Use Address64 in acpi_tb_convert_fadt()
524 * Address32 non-zero != Address64 non-zero - Warning, use Address64 in acpi_tb_convert_fadt()
527 * Address32 non-zero, Address64 zero - Copy/use Address32 in acpi_tb_convert_fadt()
528 * Address32 non-zero == Address64 non-zero - Copy/use Address32 in acpi_tb_convert_fadt()
529 * Address32 non-zero != Address64 non-zero - Warning, copy/use Address32 in acpi_tb_convert_fadt()
531 * Note: space_id is always I/O for 32-bit legacy address fields in acpi_tb_convert_fadt()
534 if (address64->address) { in acpi_tb_convert_fadt()
535 if (address64->address != (u64)address32) { in acpi_tb_convert_fadt()
540 "32/64X address mismatch in FADT/%s: " in acpi_tb_convert_fadt()
541 "0x%8.8X/0x%8.8X%8.8X, using %u-bit address", in acpi_tb_convert_fadt()
544 (address64->address), in acpi_tb_convert_fadt()
546 ? 32 : 64)); in acpi_tb_convert_fadt()
552 * 64-bit X length field. in acpi_tb_convert_fadt()
555 * 64-bit GAS structure can accommodate, 0xFF bits). in acpi_tb_convert_fadt()
558 (address64->bit_width != in acpi_tb_convert_fadt()
561 "32/64X length mismatch in FADT/%s: %u/%u", in acpi_tb_convert_fadt()
564 address64-> in acpi_tb_convert_fadt()
570 * Hardware register access code always uses the 64-bit fields. in acpi_tb_convert_fadt()
571 * So if the 64-bit field is zero or is to be overridden, in acpi_tb_convert_fadt()
572 * initialize it with the 32-bit fields. in acpi_tb_convert_fadt()
573 * Note that when the 32-bit address favor is specified, the in acpi_tb_convert_fadt()
574 * 64-bit fields are always re-initialized so that in acpi_tb_convert_fadt()
576 * configured to the values to trigger a 32-bit compatible in acpi_tb_convert_fadt()
579 if (!address64->address in acpi_tb_convert_fadt()
592 * Both the address and length must be non-zero. in acpi_tb_convert_fadt()
594 if (!address64->address || !length) { in acpi_tb_convert_fadt()
599 ACPI_FORMAT_UINT64(address64-> in acpi_tb_convert_fadt()
609 if ((address64->address && !length) || in acpi_tb_convert_fadt()
610 (!address64->address && length)) { in acpi_tb_convert_fadt()
619 (address64->address), in acpi_tb_convert_fadt()
661 if ((target64->address) && in acpi_tb_setup_fadt_registers()
664 target64->bit_width)) { in acpi_tb_setup_fadt_registers()
668 target64->bit_width, in acpi_tb_setup_fadt_registers()
674 target64->bit_width = in acpi_tb_setup_fadt_registers()
691 * is useful to pre-calculate them from the PM1 Event Block definitions. in acpi_tb_setup_fadt_registers()
707 if (source64->address) { in acpi_tb_setup_fadt_registers()
709 target, source64->space_id, in acpi_tb_setup_fadt_registers()
711 source64->address + in acpi_tb_setup_fadt_registers()