drivers/acpi/acpica/utmisc.c
Source file repositories/reference/linux-study-clean/drivers/acpi/acpica/utmisc.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/acpi/acpica/utmisc.c- Extension
.c- Size
- 10190 bytes
- Lines
- 383
- Domain
- Driver Families
- Bucket
- drivers/acpi
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
acpi/acpi.haccommon.hacnamesp.h
Detected Declarations
function acpi_ut_is_pci_root_bridgefunction acpi_ut_is_aml_tablefunction acpi_ut_dword_byte_swapfunction acpi_ut_set_integer_widthfunction acpi_ut_create_update_state_and_pushfunction acpi_ut_walk_package_treefunction acpi_ut_display_init_pathname
Annotated Snippet
ACPI_IS_OEM_SIG(table->signature)) {
return (TRUE);
}
return (FALSE);
}
#endif
/*******************************************************************************
*
* FUNCTION: acpi_ut_dword_byte_swap
*
* PARAMETERS: value - Value to be converted
*
* RETURN: u32 integer with bytes swapped
*
* DESCRIPTION: Convert a 32-bit value to big-endian (swap the bytes)
*
******************************************************************************/
u32 acpi_ut_dword_byte_swap(u32 value)
{
union {
u32 value;
u8 bytes[4];
} out;
union {
u32 value;
u8 bytes[4];
} in;
ACPI_FUNCTION_ENTRY();
in.value = value;
out.bytes[0] = in.bytes[3];
out.bytes[1] = in.bytes[2];
out.bytes[2] = in.bytes[1];
out.bytes[3] = in.bytes[0];
return (out.value);
}
/*******************************************************************************
*
* FUNCTION: acpi_ut_set_integer_width
*
* PARAMETERS: Revision From DSDT header
*
* RETURN: None
*
* DESCRIPTION: Set the global integer bit width based upon the revision
* of the DSDT. For Revision 1 and 0, Integers are 32 bits.
* For Revision 2 and above, Integers are 64 bits. Yes, this
* makes a difference.
*
******************************************************************************/
void acpi_ut_set_integer_width(u8 revision)
{
if (revision < 2) {
/* 32-bit case */
acpi_gbl_integer_bit_width = 32;
acpi_gbl_integer_nybble_width = 8;
acpi_gbl_integer_byte_width = 4;
} else {
/* 64-bit case (ACPI 2.0+) */
acpi_gbl_integer_bit_width = 64;
acpi_gbl_integer_nybble_width = 16;
acpi_gbl_integer_byte_width = 8;
}
}
/*******************************************************************************
*
* FUNCTION: acpi_ut_create_update_state_and_push
*
* PARAMETERS: object - Object to be added to the new state
* action - Increment/Decrement
* state_list - List the state will be added to
*
* RETURN: Status
*
* DESCRIPTION: Create a new state and push it
*
******************************************************************************/
Annotation
- Immediate include surface: `acpi/acpi.h`, `accommon.h`, `acnamesp.h`.
- Detected declarations: `function acpi_ut_is_pci_root_bridge`, `function acpi_ut_is_aml_table`, `function acpi_ut_dword_byte_swap`, `function acpi_ut_set_integer_width`, `function acpi_ut_create_update_state_and_push`, `function acpi_ut_walk_package_tree`, `function acpi_ut_display_init_pathname`.
- Atlas domain: Driver Families / drivers/acpi.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.