56#define VALID_HARDWARE_REDUCED_FLAG_MASK ( \
57 EFI_ACPI_6_5_WBINVD | \
58 EFI_ACPI_6_5_PWR_BUTTON | \
59 EFI_ACPI_6_5_SLP_BUTTON | \
60 EFI_ACPI_6_5_FIX_RTC | \
61 EFI_ACPI_6_5_DCK_CAP | \
62 EFI_ACPI_6_5_RESET_REG_SUP | \
63 EFI_ACPI_6_5_SEALED_CASE | \
64 EFI_ACPI_6_5_HEADLESS | \
65 EFI_ACPI_6_5_USE_PLATFORM_CLOCK | \
66 EFI_ACPI_6_5_FORCE_APIC_CLUSTER_MODEL | \
67 EFI_ACPI_6_5_FORCE_APIC_PHYSICAL_DESTINATION_MODE | \
68 EFI_ACPI_6_5_HW_REDUCED_ACPI | \
69 EFI_ACPI_6_5_LOW_POWER_S0_IDLE_CAPABLE)
99#define VALID_NON_HARDWARE_REDUCED_FLAG_MASK ( \
100 EFI_ACPI_6_5_WBINVD | \
101 EFI_ACPI_6_5_WBINVD_FLUSH | \
102 EFI_ACPI_6_5_PROC_C1 | \
103 EFI_ACPI_6_5_P_LVL2_UP | \
104 EFI_ACPI_6_5_PWR_BUTTON | \
105 EFI_ACPI_6_5_SLP_BUTTON | \
106 EFI_ACPI_6_5_FIX_RTC | \
107 EFI_ACPI_6_5_RTC_S4 | \
108 EFI_ACPI_6_5_TMR_VAL_EXT | \
109 EFI_ACPI_6_5_DCK_CAP | \
110 EFI_ACPI_6_5_RESET_REG_SUP | \
111 EFI_ACPI_6_5_SEALED_CASE | \
112 EFI_ACPI_6_5_HEADLESS | \
113 EFI_ACPI_6_5_CPU_SW_SLP | \
114 EFI_ACPI_6_5_PCI_EXP_WAK | \
115 EFI_ACPI_6_5_USE_PLATFORM_CLOCK | \
116 EFI_ACPI_6_5_S4_RTC_STS_VALID | \
117 EFI_ACPI_6_5_REMOTE_POWER_ON_CAPABLE | \
118 EFI_ACPI_6_5_FORCE_APIC_CLUSTER_MODEL | \
119 EFI_ACPI_6_5_FORCE_APIC_PHYSICAL_DESTINATION_MODE | \
120 EFI_ACPI_6_5_LOW_POWER_S0_IDLE_CAPABLE)
140 EFI_ACPI_RESERVED_BYTE,
142 EFI_ACPI_6_5_PM_PROFILE_UNSPECIFIED,
218 EFI_ACPI_6_5_FIXED_ACPI_DESCRIPTION_TABLE_MINOR_REVISION,
244 EFI_ACPI_RESERVED_QWORD
298 ASSERT (CfgMgrProtocol !=
NULL);
301 Status = GetEArchCommonObjPowerManagementProfileInfo (
307 if (EFI_ERROR (Status)) {
310 "ERROR: FADT: Failed to get Power Management Profile information." \
319 "FADT: PreferredPmProfile = 0x%x\n",
351 ASSERT (CfgMgrProtocol !=
NULL);
354 Status = GetEArchCommonObjHypervisorVendorIdentity (
357 &HypervisorVendorInfo,
360 if (EFI_ERROR (Status)) {
361 if (Status == EFI_NOT_FOUND) {
364 "INFO: FADT: Platform does not have a Hypervisor Vendor ID."
371 "ERROR: FADT: Failed to get Hypervisor Vendor ID. Status = %r\n",
381 "FADT: EArchCommonObjHypervisorVendorIdentity = 0x%lx\n",
413 ASSERT (CfgMgrProtocol !=
NULL);
416 Status = GetEArchCommonObjFixedFeatureFlags (
422 if (EFI_ERROR (Status)) {
423 if (Status == EFI_NOT_FOUND) {
426 "INFO: FADT: Platform does not define additional Fixed feature flags."
433 "ERROR: FADT: Failed to get Fixed feature flags. Status = %r\n",
443 "FADT: EArchCommonObjFixedFeatureFlags = 0x%x\n",
444 FixedFeatureFlags->
Flags
447 if ((FixedFeatureFlags->
Flags & EFI_ACPI_6_5_HW_REDUCED_ACPI) != 0) {
451 "FADT: Invalid Fixed feature flags defined by platform,"
452 "Invalid Flags bits are = 0x%x\n",
463 "FADT: Invalid Fixed feature flags defined for non-hardware reduced model,"
464 "Invalid Flags bits are = 0x%x\n",
511 ASSERT (This !=
NULL);
512 ASSERT (AcpiTableInfo !=
NULL);
513 ASSERT (CfgMgrProtocol !=
NULL);
514 ASSERT (Table !=
NULL);
515 ASSERT (AcpiTableInfo->TableGeneratorId == This->GeneratorID);
516 ASSERT (AcpiTableInfo->AcpiTableSignature == This->AcpiTableSignature);
518 if ((AcpiTableInfo->AcpiTableRevision < This->MinAcpiTableRevision) ||
519 (AcpiTableInfo->AcpiTableRevision > This->AcpiTableRevision))
523 "ERROR: FADT: Requested table revision = %d, is not supported."
524 "Supported table revision: Minimum = %d, Maximum = %d\n",
525 AcpiTableInfo->AcpiTableRevision,
526 This->MinAcpiTableRevision,
527 This->AcpiTableRevision
529 return EFI_INVALID_PARAMETER;
541 if (EFI_ERROR (Status)) {
544 "ERROR: FADT: Failed to add ACPI header. Status = %r\n",
557 if (AcpiTableInfo->MinorRevision != 0) {
558 if (((AcpiTableInfo->MinorRevision & 0xF) >=
559 EFI_ACPI_6_2_FIXED_ACPI_DESCRIPTION_TABLE_MINOR_REVISION) &&
560 ((AcpiTableInfo->MinorRevision & 0xF) <=
561 EFI_ACPI_6_5_FIXED_ACPI_DESCRIPTION_TABLE_MINOR_REVISION))
563 AcpiFadt.MinorVersion = AcpiTableInfo->MinorRevision;
567 "WARNING: FADT: Unsupported FADT Minor Revision 0x%x specified, " \
568 "defaulting to FADT Minor Revision 0x%x\n",
569 AcpiTableInfo->MinorRevision,
570 EFI_ACPI_6_5_FIXED_ACPI_DESCRIPTION_TABLE_MINOR_REVISION
577 if (EFI_ERROR (Status)) {
585 if (EFI_ERROR (Status)) {
586 if (Status == EFI_NOT_FOUND) {
589 "INFO: FADT: No Hypervisor Vendor ID found," \
590 " assuming no Hypervisor is present in the firmware.\n"
595 "ERROR: FADT: Error reading Hypervisor Vendor ID, Status = %r",
603 if (EFI_ERROR (Status)) {
604 if (Status == EFI_NOT_FOUND) {
607 "INFO: FADT: No Fixed feature flags found," \
608 " assuming no additional flags are defined for the platform.\n"
614 "ERROR: FADT: Error reading Fixed feature flags, Status = %r",
623 if (EFI_ERROR (Status)) {
634#define FADT_GENERATOR_REVISION CREATE_REVISION (1, 0)
644 L
"ACPI.STD.FADT.GENERATOR",
687 DEBUG ((DEBUG_INFO,
"FADT: Register Generator. Status = %r\n", Status));
711 DEBUG ((DEBUG_INFO,
"FADT: Deregister Generator. Status = %r\n", Status));
#define EFI_ACPI_6_2_FIXED_ACPI_DESCRIPTION_TABLE_REVISION
#define EFI_ACPI_6_5_FIXED_ACPI_DESCRIPTION_TABLE_REVISION
#define EFI_ACPI_6_5_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE
EFI_STATUS EFIAPI RegisterAcpiTableGenerator(IN CONST ACPI_TABLE_GENERATOR *CONST Generator)
EFI_STATUS EFIAPI DeregisterAcpiTableGenerator(IN CONST ACPI_TABLE_GENERATOR *CONST Generator)
#define CREATE_STD_ACPI_TABLE_GEN_ID(TableId)
#define TABLE_GENERATOR_CREATOR_ID
@ EStdAcpiTableIdFadt
FADT Generator.
#define ACPI_HEADER(Signature, Type, Revision)
@ EArchCommonObjPowerManagementProfileInfo
1 - Power Management Profile Info
@ EArchCommonObjHypervisorVendorIdentity
5 - Hypervisor Vendor Id
@ EArchCommonObjFixedFeatureFlags
6 - Fixed feature flags for FADT
EFI_STATUS EFIAPI FadtArchUpdate(IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN OUT EFI_ACPI_6_5_FIXED_ACPI_DESCRIPTION_TABLE *Fadt)
#define GET_OBJECT_LIST(CmObjectNameSpace, CmObjectId, Type)
@ EObjNameSpaceArchCommon
Arch Common Objects Namespace.
#define VALID_HARDWARE_REDUCED_FLAG_MASK
#define VALID_NON_HARDWARE_REDUCED_FLAG_MASK
#define FADT_GENERATOR_REVISION
STATIC EFI_STATUS EFIAPI FadtAddPmProfileInfo(IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol)
STATIC CONST ACPI_TABLE_GENERATOR FadtGenerator
STATIC EFI_STATUS EFIAPI BuildFadtTable(IN CONST ACPI_TABLE_GENERATOR *CONST This, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, OUT EFI_ACPI_DESCRIPTION_HEADER **CONST Table)
EFI_STATUS EFIAPI AcpiFadtLibDestructor(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
STATIC EFI_ACPI_6_5_FIXED_ACPI_DESCRIPTION_TABLE AcpiFadt
EFI_STATUS EFIAPI AcpiFadtLibConstructor(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
STATIC EFI_STATUS EFIAPI FadtAddHypervisorVendorId(IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol)
STATIC EFI_STATUS EFIAPI FadtAddFixedFeatureFlags(IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol)
#define ASSERT_EFI_ERROR(StatusParameter)
#define DEBUG(Expression)
EFI_STATUS EFIAPI AddAcpiHeader(IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN CONST ACPI_TABLE_GENERATOR *CONST Generator, IN OUT EFI_ACPI_DESCRIPTION_HEADER *CONST AcpiHeader, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST UINT32 Length)
UINT32 Flags
The Fixed feature flags.
UINT64 HypervisorVendorId
The hypervisor Vendor ID.
UINT8 PowerManagementProfile