src/add-ons/kernel/bus_managers/acpi/acpica/components/hardware/hwregs.c
/******************************************************************************
 *
 * FUNCTION:    AcpiHwWriteMultiple
 *
 * PARAMETERS:  Value               - The value to write
 *              RegisterA           - First ACPI register (required)
 *              RegisterB           - Second ACPI register (optional)
 *
 * RETURN:      Status
 *
 * DESCRIPTION: Write to the specified two-part ACPI register (such as PM1 A/B)
 *
 ******************************************************************************/
AcpiHwWriteMultiple
PARAMETERS:  Value               - The value to write
RegisterA           - First ACPI register (required)
RegisterB           - Second ACPI register (optional)

Status

Write to the specified two-part ACPI register (such as PM1 A/B)
AcpiHwWriteMultiple PARAMETERS : Value - The value to write RegisterA - First ACPI register ( required ) RegisterB - Second ACPI register ( optional ) Status Write to the specified two - part ACPI register ( such as PM1 A / B )
static ACPI_STATUS
AcpiHwWriteMultiple (
    UINT32                  Value,
    ACPI_GENERIC_ADDRESS    *RegisterA,
    ACPI_GENERIC_ADDRESS    *RegisterB)
{
    ACPI_STATUS             Status;
    Status = AcpiHwWrite (Value, RegisterA);
    if (ACPI_FAILURE (Status))
    {
        return (Status);
    }
    if (RegisterB->Address)
    {
        Status = AcpiHwWrite (Value, RegisterB);
    }
    return (Status);
}
static ACPI_STATUS AcpiHwWriteMultiple ( UINT32 Value , ACPI_GENERIC_ADDRESS * RegisterA , ACPI_GENERIC_ADDRESS * RegisterB ) { ACPI_STATUS Status ; Status = AcpiHwWrite ( Value , RegisterA ) ; if ( ACPI_FAILURE ( Status ) ) { return ( Status ) ; } if ( RegisterB -> Address ) { Status = AcpiHwWrite ( Value , RegisterB ) ; } return ( Status ) ; }
FUNCTION:    AcpiHwWriteMultiple
 PARAMETERS:  Value               - The value to write
              RegisterA           - First ACPI register (required)
              RegisterB           - Second ACPI register (optional)
FUNCTION : AcpiHwWriteMultiple PARAMETERS : Value - The value to write RegisterA - First ACPI register ( required ) RegisterB - Second ACPI register ( optional )
/* The first register is always required */ /*
     * Second register is optional
     *
     * No bit shifting or clearing is necessary, because of how the PM1
     * registers are defined in the ACPI specification:
     *
     * "Although the bits can be split between the two register blocks (each
     * register block has a unique pointer within the FADT), the bit positions
     * are maintained. The register block with unimplemented bits (that is,
     * those implemented in the other register block) always returns zeros,
     * and writes have no side effects"
     */