drivers/acpi/acpica/tbxface.c
Source file repositories/reference/linux-study-clean/drivers/acpi/acpica/tbxface.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/acpi/acpica/tbxface.c- Extension
.c- Size
- 15465 bytes
- Lines
- 531
- 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.hactables.h
Detected Declarations
function Copyrightfunction acpi_initialize_tablesfunction acpi_reallocate_root_tablefunction acpi_initialize_tablesfunction acpi_get_table_headerfunction acpi_get_tablefunction acpi_put_tablefunction acpi_get_table_by_indexfunction acpi_install_table_handlerfunction acpi_remove_table_handler
Annotated Snippet
if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status);
}
} else {
/* Root Table Array has been statically allocated by the host */
memset(initial_table_array, 0,
(acpi_size)initial_table_count *
sizeof(struct acpi_table_desc));
acpi_gbl_root_table_list.tables = initial_table_array;
acpi_gbl_root_table_list.max_table_count = initial_table_count;
acpi_gbl_root_table_list.flags = ACPI_ROOT_ORIGIN_UNKNOWN;
if (allow_resize) {
acpi_gbl_root_table_list.flags |=
ACPI_ROOT_ALLOW_RESIZE;
}
}
/* Get the address of the RSDP */
rsdp_address = acpi_os_get_root_pointer();
if (!rsdp_address) {
return_ACPI_STATUS(AE_NOT_FOUND);
}
/*
* Get the root table (RSDT or XSDT) and extract all entries to the local
* Root Table Array. This array contains the information of the RSDT/XSDT
* in a common, more usable format.
*/
status = acpi_tb_parse_root_table(rsdp_address);
return_ACPI_STATUS(status);
}
ACPI_EXPORT_SYMBOL_INIT(acpi_initialize_tables)
/*******************************************************************************
*
* FUNCTION: acpi_reallocate_root_table
*
* PARAMETERS: None
*
* RETURN: Status
*
* DESCRIPTION: Reallocate Root Table List into dynamic memory. Copies the
* root list from the previously provided scratch area. Should
* be called once dynamic memory allocation is available in the
* kernel.
*
******************************************************************************/
acpi_status ACPI_INIT_FUNCTION acpi_reallocate_root_table(void)
{
acpi_status status;
struct acpi_table_desc *table_desc;
u32 i, j;
ACPI_FUNCTION_TRACE(acpi_reallocate_root_table);
/*
* If there are tables unverified, it is required to reallocate the
* root table list to clean up invalid table entries. Otherwise only
* reallocate the root table list if the host provided a static buffer
* for the table array in the call to acpi_initialize_tables().
*/
if ((acpi_gbl_root_table_list.flags & ACPI_ROOT_ORIGIN_ALLOCATED) &&
acpi_gbl_enable_table_validation) {
return_ACPI_STATUS(AE_SUPPORT);
}
(void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES);
/*
* Ensure OS early boot logic, which is required by some hosts. If the
* table state is reported to be wrong, developers should fix the
* issue by invoking acpi_put_table() for the reported table during the
* early stage.
*/
for (i = 0; i < acpi_gbl_root_table_list.current_table_count; ++i) {
table_desc = &acpi_gbl_root_table_list.tables[i];
if (table_desc->pointer) {
ACPI_ERROR((AE_INFO,
"Table [%4.4s] is not invalidated during early boot stage",
table_desc->signature.ascii));
}
}
if (!acpi_gbl_enable_table_validation) {
/*
* Now it's safe to do full table validation. We can do deferred
Annotation
- Immediate include surface: `acpi/acpi.h`, `accommon.h`, `actables.h`.
- Detected declarations: `function Copyright`, `function acpi_initialize_tables`, `function acpi_reallocate_root_table`, `function acpi_initialize_tables`, `function acpi_get_table_header`, `function acpi_get_table`, `function acpi_put_table`, `function acpi_get_table_by_index`, `function acpi_install_table_handler`, `function acpi_remove_table_handler`.
- 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.