TianoCore EDK2 master
Loading...
Searching...
No Matches
ArmFadtGenerator.c
Go to the documentation of this file.
1
12#include <Library/AcpiLib.h>
13#include <Library/DebugLib.h>
14#include <Protocol/AcpiTable.h>
15
16// Module specific include files.
17#include <AcpiTableGenerator.h>
22#include "FadtGenerator.h"
23
39 );
40
43#define FADT_FLAGS (EFI_ACPI_6_5_HW_REDUCED_ACPI | \
44 EFI_ACPI_6_5_LOW_POWER_S0_IDLE_CAPABLE)
45
61EFIAPI
65 )
66{
67 EFI_STATUS Status;
68 CM_ARM_BOOT_ARCH_INFO *BootArchInfo;
69
70 ASSERT (CfgMgrProtocol != NULL);
71 ASSERT (Fadt != NULL);
72
73 // Get the Boot Architecture flags from the Platform Configuration Manager
74 Status = GetEArmObjBootArchInfo (
75 CfgMgrProtocol,
77 &BootArchInfo,
78 NULL
79 );
80 if (EFI_ERROR (Status)) {
81 DEBUG ((
82 DEBUG_ERROR,
83 "ERROR: FADT: Failed to get Boot Architecture flags. Status = %r\n",
84 Status
85 ));
86 return Status;
87 }
88
89 DEBUG ((
90 DEBUG_INFO,
91 "FADT BootArchFlag = 0x%x\n",
92 BootArchInfo->BootArchFlags
93 ));
94
95 Fadt->ArmBootArch = BootArchInfo->BootArchFlags;
96
97 return Status;
98}
99
114EFIAPI
118 )
119{
120 ASSERT (CfgMgrProtocol != NULL);
121 ASSERT (Fadt != NULL);
122
123 Fadt->Flags = FADT_FLAGS;
124
125 return ArmFadtBootArchInfoUpdate (CfgMgrProtocol, Fadt);
126}
#define FADT_FLAGS
EFI_STATUS EFIAPI FadtArchUpdate(IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN OUT EFI_ACPI_6_5_FIXED_ACPI_DESCRIPTION_TABLE *Fadt)
STATIC EFI_STATUS EFIAPI ArmFadtBootArchInfoUpdate(IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN OUT EFI_ACPI_6_5_FIXED_ACPI_DESCRIPTION_TABLE *Fadt)
@ EArmObjBootArchInfo
1 - Boot Architecture Info
#define GET_OBJECT_LIST(CmObjectNameSpace, CmObjectId, Type)
@ EObjNameSpaceArm
ARM Objects Namespace.
#define NULL
Definition: Base.h:319
#define CONST
Definition: Base.h:259
#define STATIC
Definition: Base.h:264
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
#define DEBUG(Expression)
Definition: DebugLib.h:434
#define CM_NULL_TOKEN
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29