FreeBSD/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c
/*******************************************************************************
 *
 * FUNCTION:    AcpiHwSetFirmwareWakingVector
 *
 * PARAMETERS:  Facs                - Pointer to FACS table
 *              PhysicalAddress     - 32-bit physical address of ACPI real mode
 *                                    entry point
 *              PhysicalAddress64   - 64-bit physical address of ACPI protected
 *                                    mode entry point
 *
 * RETURN:      Status
 *
 * DESCRIPTION: Sets the FirmwareWakingVector fields of the FACS
 *
 ******************************************************************************/


Status

Sets the FirmwareWakingVector fields of the FACS
Status Sets the FirmwareWakingVector fields of the FACS
static ACPI_STATUS
AcpiHwSetFirmwareWakingVector (
    ACPI_TABLE_FACS         *Facs,
    ACPI_PHYSICAL_ADDRESS   PhysicalAddress,
    ACPI_PHYSICAL_ADDRESS   PhysicalAddress64)
{
    ACPI_FUNCTION_TRACE (AcpiHwSetFirmwareWakingVector);
    Facs->FirmwareWakingVector = (UINT32) PhysicalAddress;
    if (Facs->Length > 32)
    {
        if (Facs->Version >= 1)
        {
            Facs->XFirmwareWakingVector = PhysicalAddress64;
        }
        else
        {
            Facs->XFirmwareWakingVector = 0;
        }
    }
    return_ACPI_STATUS (AE_OK);
}
static ACPI_STATUS AcpiHwSetFirmwareWakingVector ( ACPI_TABLE_FACS * Facs , ACPI_PHYSICAL_ADDRESS PhysicalAddress , ACPI_PHYSICAL_ADDRESS PhysicalAddress64 ) { ACPI_FUNCTION_TRACE ( AcpiHwSetFirmwareWakingVector ) ; Facs -> FirmwareWakingVector = ( UINT32 ) PhysicalAddress ; if ( Facs -> Length > 32 ) { if ( Facs -> Version >= 1 ) { Facs -> XFirmwareWakingVector = PhysicalAddress64 ; } else { Facs -> XFirmwareWakingVector = 0 ; } } return_ACPI_STATUS ( AE_OK ) ; }
FUNCTION:    AcpiHwSetFirmwareWakingVector
 PARAMETERS:  Facs                - Pointer to FACS table
              PhysicalAddress     - 32-bit physical address of ACPI real mode
                                    entry point
              PhysicalAddress64   - 64-bit physical address of ACPI protected
                                    mode entry point
FUNCTION : AcpiHwSetFirmwareWakingVector PARAMETERS : Facs - Pointer to FACS table PhysicalAddress - 32 - bit physical address of ACPI real mode entry point PhysicalAddress64 - 64 - bit physical address of ACPI protected mode entry point
/*
     * According to the ACPI specification 2.0c and later, the 64-bit
     * waking vector should be cleared and the 32-bit waking vector should
     * be used, unless we want the wake-up code to be called by the BIOS in
     * Protected Mode. Some systems (for example HP dv5-1004nr) are known
     * to fail to resume if the 64-bit vector is used.
     */ /* Set the 32-bit vector */ /* Set the 64-bit vector */ /* Clear the 64-bit vector if it exists */