drivers/acpi/acpica/hwxfsleep.c
Source file repositories/reference/linux-study-clean/drivers/acpi/acpica/hwxfsleep.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/acpi/acpica/hwxfsleep.c- Extension
.c- Size
- 10044 bytes
- Lines
- 366
- 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.h
Detected Declarations
function acpi_hw_set_firmware_waking_vectorfunction acpi_set_firmware_waking_vectorfunction acpi_enter_sleep_state_s4biosfunction acpi_enter_sleep_state_prepfunction acpi_enter_sleep_statefunction acpi_leave_sleep_state_prepfunction acpi_leave_sleep_state
Annotated Snippet
if (facs->version >= 1) {
/* Set the 64-bit vector */
facs->xfirmware_waking_vector = physical_address64;
} else {
/* Clear the 64-bit vector if it exists */
facs->xfirmware_waking_vector = 0;
}
}
return_ACPI_STATUS(AE_OK);
}
/*******************************************************************************
*
* FUNCTION: acpi_set_firmware_waking_vector
*
* PARAMETERS: physical_address - 32-bit physical address of ACPI real mode
* entry point
* physical_address64 - 64-bit physical address of ACPI protected
* mode entry point
*
* RETURN: Status
*
* DESCRIPTION: Sets the firmware_waking_vector fields of the FACS
*
******************************************************************************/
acpi_status
acpi_set_firmware_waking_vector(acpi_physical_address physical_address,
acpi_physical_address physical_address64)
{
ACPI_FUNCTION_TRACE(acpi_set_firmware_waking_vector);
if (acpi_gbl_FACS) {
(void)acpi_hw_set_firmware_waking_vector(acpi_gbl_FACS,
physical_address,
physical_address64);
}
return_ACPI_STATUS(AE_OK);
}
ACPI_EXPORT_SYMBOL(acpi_set_firmware_waking_vector)
/*
* These functions are removed for the ACPI_REDUCED_HARDWARE case:
* acpi_enter_sleep_state_s4bios
*/
#if (!ACPI_REDUCED_HARDWARE)
/*******************************************************************************
*
* FUNCTION: acpi_enter_sleep_state_s4bios
*
* PARAMETERS: None
*
* RETURN: Status
*
* DESCRIPTION: Perform a S4 bios request.
* THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
*
******************************************************************************/
acpi_status acpi_enter_sleep_state_s4bios(void)
{
u32 in_value;
acpi_status status;
ACPI_FUNCTION_TRACE(acpi_enter_sleep_state_s4bios);
/* Clear the wake status bit (PM1) */
status =
acpi_write_bit_register(ACPI_BITREG_WAKE_STATUS, ACPI_CLEAR_STATUS);
if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status);
}
status = acpi_hw_clear_acpi_status();
if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status);
}
/*
* 1) Disable all GPEs
* 2) Enable all wakeup GPEs
*/
Annotation
- Immediate include surface: `acpi/acpi.h`, `accommon.h`.
- Detected declarations: `function acpi_hw_set_firmware_waking_vector`, `function acpi_set_firmware_waking_vector`, `function acpi_enter_sleep_state_s4bios`, `function acpi_enter_sleep_state_prep`, `function acpi_enter_sleep_state`, `function acpi_leave_sleep_state_prep`, `function acpi_leave_sleep_state`.
- 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.