drivers/acpi/acpica/tbdata.c
Source file repositories/reference/linux-study-clean/drivers/acpi/acpica/tbdata.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/acpi/acpica/tbdata.c- Extension
.c- Size
- 30369 bytes
- Lines
- 1098
- Domain
- Driver Families
- Bucket
- drivers/acpi
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
acpi/acpi.haccommon.hacnamesp.hactables.hacevents.h
Detected Declarations
function acpi_tb_compare_tablesfunction acpi_tb_init_table_descriptorfunction acpi_tb_acquire_tablefunction acpi_tb_release_tablefunction acpi_tb_acquire_temp_tablefunction acpi_tb_release_temp_tablefunction acpi_tb_validate_tablefunction acpi_tb_validate_tablefunction acpi_tb_validate_temp_tablefunction acpi_tb_check_duplicationfunction futurefunction acpi_tb_verify_temp_tablefunction acpi_tb_resize_root_table_listfunction acpi_tb_get_next_table_descriptorfunction acpi_tb_terminatefunction acpi_tb_delete_namespace_by_ownerfunction acpi_tb_allocate_owner_idfunction acpi_tb_release_owner_idfunction acpi_tb_get_owner_idfunction acpi_tb_is_table_loadedfunction acpi_tb_set_table_loaded_flagfunction acpi_tb_load_tablefunction acpi_tb_install_and_load_tablefunction acpi_tb_unload_tablefunction acpi_tb_notify_table
Annotated Snippet
if (!table) {
table =
acpi_os_map_memory(address,
sizeof(struct
acpi_table_header));
if (!table) {
return (AE_NO_MEMORY);
}
mapped_table = TRUE;
}
break;
case ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL:
case ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL:
if (!table) {
return (AE_BAD_PARAMETER);
}
break;
default:
/* Table is not valid yet */
return (AE_NO_MEMORY);
}
acpi_tb_init_table_descriptor(table_desc, address, flags, table);
if (mapped_table) {
acpi_os_unmap_memory(table, sizeof(struct acpi_table_header));
}
return (AE_OK);
}
/*******************************************************************************
*
* FUNCTION: acpi_tb_release_temp_table
*
* PARAMETERS: table_desc - Table descriptor to be released
*
* RETURN: Status
*
* DESCRIPTION: The inverse of acpi_tb_acquire_temp_table().
*
*****************************************************************************/
void acpi_tb_release_temp_table(struct acpi_table_desc *table_desc)
{
/*
* Note that the .Address is maintained by the callers of
* acpi_tb_acquire_temp_table(), thus do not invoke acpi_tb_uninstall_table()
* where .Address will be freed.
*/
acpi_tb_invalidate_table(table_desc);
}
/******************************************************************************
*
* FUNCTION: acpi_tb_validate_table
*
* PARAMETERS: table_desc - Table descriptor
*
* RETURN: Status
*
* DESCRIPTION: This function is called to validate the table, the returned
* table descriptor is in "VALIDATED" state.
*
*****************************************************************************/
acpi_status acpi_tb_validate_table(struct acpi_table_desc *table_desc)
{
acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE(tb_validate_table);
/* Validate the table if necessary */
if (!table_desc->pointer) {
status = acpi_tb_acquire_table(table_desc, &table_desc->pointer,
&table_desc->length,
&table_desc->flags);
if (!table_desc->pointer) {
status = AE_NO_MEMORY;
}
}
Annotation
- Immediate include surface: `acpi/acpi.h`, `accommon.h`, `acnamesp.h`, `actables.h`, `acevents.h`.
- Detected declarations: `function acpi_tb_compare_tables`, `function acpi_tb_init_table_descriptor`, `function acpi_tb_acquire_table`, `function acpi_tb_release_table`, `function acpi_tb_acquire_temp_table`, `function acpi_tb_release_temp_table`, `function acpi_tb_validate_table`, `function acpi_tb_validate_table`, `function acpi_tb_validate_temp_table`, `function acpi_tb_check_duplication`.
- Atlas domain: Driver Families / drivers/acpi.
- Implementation status: integration 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.