mirror of
https://github.com/acpica/acpica/
synced 2025-03-19 12:42:57 +03:00
ACPICA: Cleanup of Fadt verification function. Removed offset display, not needed.
Updated field names to reflect latest header files.
This commit is contained in:
parent
42f376a70a
commit
887a85161f
@ -1,7 +1,7 @@
|
|||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
*
|
*
|
||||||
* Module Name: utinit - Common ACPI subsystem initialization
|
* Module Name: utinit - Common ACPI subsystem initialization
|
||||||
* $Revision: 1.132 $
|
* $Revision: 1.133 $
|
||||||
*
|
*
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
@ -130,8 +130,7 @@
|
|||||||
static void
|
static void
|
||||||
AcpiUtFadtRegisterError (
|
AcpiUtFadtRegisterError (
|
||||||
char *RegisterName,
|
char *RegisterName,
|
||||||
UINT32 Value,
|
UINT32 Value);
|
||||||
UINT8 Offset);
|
|
||||||
|
|
||||||
static void AcpiUtTerminate (
|
static void AcpiUtTerminate (
|
||||||
void);
|
void);
|
||||||
@ -143,9 +142,8 @@ static void AcpiUtTerminate (
|
|||||||
*
|
*
|
||||||
* PARAMETERS: RegisterName - Pointer to string identifying register
|
* PARAMETERS: RegisterName - Pointer to string identifying register
|
||||||
* Value - Actual register contents value
|
* Value - Actual register contents value
|
||||||
* Offset - Byte offset in the FADT
|
|
||||||
*
|
*
|
||||||
* RETURN: AE_BAD_VALUE
|
* RETURN: None
|
||||||
*
|
*
|
||||||
* DESCRIPTION: Display failure message
|
* DESCRIPTION: Display failure message
|
||||||
*
|
*
|
||||||
@ -154,13 +152,11 @@ static void AcpiUtTerminate (
|
|||||||
static void
|
static void
|
||||||
AcpiUtFadtRegisterError (
|
AcpiUtFadtRegisterError (
|
||||||
char *RegisterName,
|
char *RegisterName,
|
||||||
UINT32 Value,
|
UINT32 Value)
|
||||||
UINT8 Offset)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
ACPI_WARNING ((AE_INFO,
|
ACPI_WARNING ((AE_INFO, "Invalid FADT value %s = %X",
|
||||||
"Invalid FADT value %s=%X at offset %X in FADT=%p",
|
RegisterName, Value));
|
||||||
RegisterName, Value, Offset, &AcpiGbl_FADT));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -187,48 +183,41 @@ AcpiUtValidateFadt (
|
|||||||
*/
|
*/
|
||||||
if (AcpiGbl_FADT.Pm1EventLength < 4)
|
if (AcpiGbl_FADT.Pm1EventLength < 4)
|
||||||
{
|
{
|
||||||
AcpiUtFadtRegisterError ("PM1_EVT_LEN",
|
AcpiUtFadtRegisterError ("Pm1EventLength",
|
||||||
(UINT32) AcpiGbl_FADT.Pm1EventLength,
|
(UINT32) AcpiGbl_FADT.Pm1EventLength);
|
||||||
ACPI_FADT_OFFSET (Pm1EventLength));
|
}
|
||||||
|
|
||||||
|
if (AcpiGbl_FADT.PmTimerLength < 4)
|
||||||
|
{
|
||||||
|
AcpiUtFadtRegisterError ("PmTimerLength",
|
||||||
|
(UINT32) AcpiGbl_FADT.PmTimerLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!AcpiGbl_FADT.Pm1ControlLength)
|
if (!AcpiGbl_FADT.Pm1ControlLength)
|
||||||
{
|
{
|
||||||
AcpiUtFadtRegisterError ("PM1_CNT_LEN", 0,
|
AcpiUtFadtRegisterError ("Pm1ControlLength", 0);
|
||||||
ACPI_FADT_OFFSET (Pm1ControlLength));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ACPI_VALID_ADDRESS (AcpiGbl_FADT.XPm1aEventBlock.Address))
|
if (!ACPI_VALID_ADDRESS (AcpiGbl_FADT.XPm1aEventBlock.Address))
|
||||||
{
|
{
|
||||||
AcpiUtFadtRegisterError ("X_PM1a_EVT_BLK", 0,
|
AcpiUtFadtRegisterError ("XPm1aEventBlock.Address", 0);
|
||||||
ACPI_FADT_OFFSET (XPm1aEventBlock.Address));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ACPI_VALID_ADDRESS (AcpiGbl_FADT.XPm1aControlBlock.Address))
|
if (!ACPI_VALID_ADDRESS (AcpiGbl_FADT.XPm1aControlBlock.Address))
|
||||||
{
|
{
|
||||||
AcpiUtFadtRegisterError ("X_PM1a_CNT_BLK", 0,
|
AcpiUtFadtRegisterError ("XPm1aControlBlock.Address", 0);
|
||||||
ACPI_FADT_OFFSET (XPm1aControlBlock.Address));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ACPI_VALID_ADDRESS (AcpiGbl_FADT.XPmTimerBlock.Address))
|
if (!ACPI_VALID_ADDRESS (AcpiGbl_FADT.XPmTimerBlock.Address))
|
||||||
{
|
{
|
||||||
AcpiUtFadtRegisterError ("X_PM_TMR_BLK", 0,
|
AcpiUtFadtRegisterError ("XPmTimerBlock.Address", 0);
|
||||||
ACPI_FADT_OFFSET (XPmTimerBlock.Address));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ACPI_VALID_ADDRESS (AcpiGbl_FADT.XPm2ControlBlock.Address) &&
|
if ((ACPI_VALID_ADDRESS (AcpiGbl_FADT.XPm2ControlBlock.Address) &&
|
||||||
!AcpiGbl_FADT.Pm2ControlLength))
|
!AcpiGbl_FADT.Pm2ControlLength))
|
||||||
{
|
{
|
||||||
AcpiUtFadtRegisterError ("PM2_CNT_LEN",
|
AcpiUtFadtRegisterError ("Pm2ControlLength",
|
||||||
(UINT32) AcpiGbl_FADT.Pm2ControlLength,
|
(UINT32) AcpiGbl_FADT.Pm2ControlLength);
|
||||||
ACPI_FADT_OFFSET (Pm2ControlLength));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (AcpiGbl_FADT.PmTimerLength < 4)
|
|
||||||
{
|
|
||||||
AcpiUtFadtRegisterError ("PM_TM_LEN",
|
|
||||||
(UINT32) AcpiGbl_FADT.PmTimerLength,
|
|
||||||
ACPI_FADT_OFFSET (PmTimerLength));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Length of GPE blocks must be a multiple of 2 */
|
/* Length of GPE blocks must be a multiple of 2 */
|
||||||
@ -236,17 +225,15 @@ AcpiUtValidateFadt (
|
|||||||
if (ACPI_VALID_ADDRESS (AcpiGbl_FADT.XGpe0Block.Address) &&
|
if (ACPI_VALID_ADDRESS (AcpiGbl_FADT.XGpe0Block.Address) &&
|
||||||
(AcpiGbl_FADT.Gpe0BlockLength & 1))
|
(AcpiGbl_FADT.Gpe0BlockLength & 1))
|
||||||
{
|
{
|
||||||
AcpiUtFadtRegisterError ("(x)GPE0_BLK_LEN",
|
AcpiUtFadtRegisterError ("Gpe0BlockLength",
|
||||||
(UINT32) AcpiGbl_FADT.Gpe0BlockLength,
|
(UINT32) AcpiGbl_FADT.Gpe0BlockLength);
|
||||||
ACPI_FADT_OFFSET (Gpe0BlockLength));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ACPI_VALID_ADDRESS (AcpiGbl_FADT.XGpe1Block.Address) &&
|
if (ACPI_VALID_ADDRESS (AcpiGbl_FADT.XGpe1Block.Address) &&
|
||||||
(AcpiGbl_FADT.Gpe1BlockLength & 1))
|
(AcpiGbl_FADT.Gpe1BlockLength & 1))
|
||||||
{
|
{
|
||||||
AcpiUtFadtRegisterError ("(x)GPE1_BLK_LEN",
|
AcpiUtFadtRegisterError ("Gpe1BlockLength",
|
||||||
(UINT32) AcpiGbl_FADT.Gpe1BlockLength,
|
(UINT32) AcpiGbl_FADT.Gpe1BlockLength);
|
||||||
ACPI_FADT_OFFSET (Gpe1BlockLength));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (AE_OK);
|
return (AE_OK);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user