diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c index 7f95b9dc70..7795ff7269 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c @@ -646,16 +646,12 @@ AddTableToList ( AcpiTableInstance->Fadt3->FirmwareCtrl = 0; } if ((UINT64)(UINTN)AcpiTableInstance->Dsdt3 < BASE_4GB) { - AcpiTableInstance->Fadt3->Dsdt = (UINT32) (UINTN) AcpiTableInstance->Dsdt3; + AcpiTableInstance->Fadt3->Dsdt = (UINT32) (UINTN) AcpiTableInstance->Dsdt3; ZeroMem (&AcpiTableInstance->Fadt3->XDsdt, sizeof (UINT64)); } else { - Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Dsdt3; - CopyMem ( - &AcpiTableInstance->Fadt3->XDsdt, - &Buffer64, - sizeof (UINT64) - ); AcpiTableInstance->Fadt3->Dsdt = 0; + Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Dsdt3; + CopyMem (&AcpiTableInstance->Fadt3->XDsdt, &Buffer64, sizeof (UINT64)); } // @@ -850,14 +846,10 @@ AddTableToList ( // if (AcpiTableInstance->Fadt3 != NULL) { if ((UINT64)(UINTN)AcpiTableInstance->Dsdt3 < BASE_4GB) { - AcpiTableInstance->Fadt3->Dsdt = (UINT32) (UINTN) AcpiTableInstance->Dsdt3; + AcpiTableInstance->Fadt3->Dsdt = (UINT32) (UINTN) AcpiTableInstance->Dsdt3; } - Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Dsdt3; - CopyMem ( - &AcpiTableInstance->Fadt3->XDsdt, - &Buffer64, - sizeof (UINT64) - ); + Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Dsdt3; + CopyMem (&AcpiTableInstance->Fadt3->XDsdt, &Buffer64, sizeof (UINT64)); // // Checksum FADT table