thirdparty/acpica/src/hwregs.c
/*******************************************************************************
 *
 * FUNCTION:    AcpiHwClearAcpiStatus
 *
 * PARAMETERS:  None
 *
 * RETURN:      Status
 *
 * DESCRIPTION: Clears all fixed and general purpose status bits
 *
 ******************************************************************************/


Status

Clears all fixed and general purpose status bits
Status Clears all fixed and general purpose status bits
ACPI_STATUS
AcpiHwClearAcpiStatus (
    void)
{
    ACPI_STATUS             Status;
    ACPI_CPU_FLAGS          LockFlags = 0;
    ACPI_FUNCTION_TRACE (HwClearAcpiStatus);
    ACPI_DEBUG_PRINT ((ACPI_DB_IO, "About to write %04X to %8.8X%8.8X\n",
        ACPI_BITMASK_ALL_FIXED_STATUS,
        ACPI_FORMAT_UINT64 (AcpiGbl_XPm1aStatus.Address)));
    LockFlags = AcpiOsAcquireLock (AcpiGbl_HardwareLock);
    Status = AcpiHwRegisterWrite (ACPI_REGISTER_PM1_STATUS,
        ACPI_BITMASK_ALL_FIXED_STATUS);
    AcpiOsReleaseLock (AcpiGbl_HardwareLock, LockFlags);
    if (ACPI_FAILURE (Status))
    {
        goto Exit;
    }
    Status = AcpiEvWalkGpeList (AcpiHwClearGpeBlock, NULL);
Exit:
    return_ACPI_STATUS (Status);
}
ACPI_STATUS AcpiHwClearAcpiStatus ( void ) { ACPI_STATUS Status ; ACPI_CPU_FLAGS LockFlags = 0 ; ACPI_FUNCTION_TRACE ( HwClearAcpiStatus ) ; ACPI_DEBUG_PRINT ( ( ACPI_DB_IO , " \n " , ACPI_BITMASK_ALL_FIXED_STATUS , ACPI_FORMAT_UINT64 ( AcpiGbl_XPm1aStatus . Address ) ) ) ; LockFlags = AcpiOsAcquireLock ( AcpiGbl_HardwareLock ) ; Status = AcpiHwRegisterWrite ( ACPI_REGISTER_PM1_STATUS , ACPI_BITMASK_ALL_FIXED_STATUS ) ; AcpiOsReleaseLock ( AcpiGbl_HardwareLock , LockFlags ) ; if ( ACPI_FAILURE ( Status ) ) { goto Exit ; } Status = AcpiEvWalkGpeList ( AcpiHwClearGpeBlock , NULL ) ; Exit : return_ACPI_STATUS ( Status ) ; }
FUNCTION:    AcpiHwClearAcpiStatus
 PARAMETERS:  None
FUNCTION : AcpiHwClearAcpiStatus PARAMETERS : None
/* Clear the fixed events in PM1 A/B */ /* Clear the GPE Bits in all GPE registers in all GPE blocks */