28 FIRMWARE_CONFIG_ITEM FwCfgItem;
34 if (EFI_ERROR (Status)) {
35 DEBUG ((DEBUG_ERROR,
"%a %d read %s error Status %d \n", __func__, __LINE__, Name, Status));
66 VOID *AcpiTables =
NULL;
67 UINT32 *Entry32 =
NULL;
69 UINT32 *Signature =
NULL;
74 DEBUG ((DEBUG_ERROR,
"%a %d read etc/acpi/rsdp error \n", __func__, __LINE__));
79 if (AcpiTables ==
NULL) {
80 DEBUG ((DEBUG_ERROR,
"%a %d read etc/acpi/tables error \n", __func__, __LINE__));
86 Entry32 = (UINT32 *)(Rsdt + 1);
88 for (Idx = 0; Idx < Entry32Num; Idx++) {
89 Signature = (UINT32 *)((
UINTN)Entry32[Idx] + (
UINTN)AcpiTables);
92 DEBUG ((DEBUG_INFO,
"Found Fadt in Rsdt\n"));
98 Entry32 = (UINT32 *)(Xsdt + 1);
100 for (Idx = 0; Idx < Entry32Num; Idx++) {
101 Signature = (UINT32 *)((
UINTN)Entry32[Idx] + (
UINTN)AcpiTables);
104 DEBUG ((DEBUG_INFO,
"Found Fadt in Xsdt\n"));
111 DEBUG ((DEBUG_ERROR,
" Fadt Not Found\n"));
112 return EFI_NOT_FOUND;
115 mPowerManager.ResetRegAddr = Fadt->ResetReg.Address;
116 mPowerManager.ResetValue = Fadt->ResetValue;
117 mPowerManager.SleepControlRegAddr = Fadt->SleepControlReg.Address;
118 mPowerManager.SleepStatusRegAddr = Fadt->SleepStatusReg.Address;
142 if (EFI_ERROR (Status)) {
143 DEBUG ((DEBUG_INFO,
"%a:%d\n", __func__, __LINE__));
146 ASSERT (mPowerManager.SleepControlRegAddr);
147 ASSERT (mPowerManager.SleepStatusRegAddr);
148 ASSERT (mPowerManager.ResetRegAddr);
#define EFI_ACPI_5_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE
STATIC EFI_STATUS GetPowerManagerByParseAcpiInfo(VOID)
STATIC VOID * GetFwCfgData(CONST CHAR8 *Name)
EFI_STATUS EFI_API ResetSystemLibConstructor(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
VOID EFIAPI FreePool(IN VOID *Buffer)
#define DEBUG(Expression)
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
RETURN_STATUS EFIAPI QemuFwCfgFindFile(IN CONST CHAR8 *Name, OUT FIRMWARE_CONFIG_ITEM *Item, OUT UINTN *Size)
VOID EFIAPI QemuFwCfgReadBytes(IN UINTN Size, IN VOID *Buffer OPTIONAL)
VOID EFIAPI QemuFwCfgSelectItem(IN FIRMWARE_CONFIG_ITEM QemuFwCfgItem)