MdeModulePkg/AcpiTableDxe: condense whitespace around FADT.{DSDT,X_DSDT}

This patch incurs no functional changes, it just removes some whitespace,
and also makes sure we always assign

  AcpiTableInstance->Fadt3->Dsdt

first, and

  AcpiTableInstance->Fadt3->XDsdt

second. The goal is to separate the syntactic changes from the functional
changes implemented by the next patch.

Cc: Al Stone <ahs3@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Leo Duran <leo.duran@amd.com>
Cc: Michael Tsirkin <mtsirkin@redhat.com>
Cc: Phil Dennis-Jordan <phil@philjordan.eu>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
Laszlo Ersek 2017-02-01 15:10:02 +01:00
parent e0e1cfcbbb
commit 9886ebfe43
1 changed files with 6 additions and 14 deletions

View File

@ -646,16 +646,12 @@ AddTableToList (
AcpiTableInstance->Fadt3->FirmwareCtrl = 0; AcpiTableInstance->Fadt3->FirmwareCtrl = 0;
} }
if ((UINT64)(UINTN)AcpiTableInstance->Dsdt3 < BASE_4GB) { 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)); ZeroMem (&AcpiTableInstance->Fadt3->XDsdt, sizeof (UINT64));
} else { } else {
Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Dsdt3;
CopyMem (
&AcpiTableInstance->Fadt3->XDsdt,
&Buffer64,
sizeof (UINT64)
);
AcpiTableInstance->Fadt3->Dsdt = 0; 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 (AcpiTableInstance->Fadt3 != NULL) {
if ((UINT64)(UINTN)AcpiTableInstance->Dsdt3 < BASE_4GB) { 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; Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Dsdt3;
CopyMem ( CopyMem (&AcpiTableInstance->Fadt3->XDsdt, &Buffer64, sizeof (UINT64));
&AcpiTableInstance->Fadt3->XDsdt,
&Buffer64,
sizeof (UINT64)
);
// //
// Checksum FADT table // Checksum FADT table