diff options
author | rsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-05-17 08:32:05 +0000 |
---|---|---|
committer | rsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-05-17 08:32:05 +0000 |
commit | f0c855b26386c16ba0a70600d72cd09c090db0e0 (patch) | |
tree | 14527b04cad3e48d713e7577f02a595eb7b1b1b2 /MdeModulePkg/Universal/Acpi/AcpiTableDxe | |
parent | 0e4483bc69aa31f1facbe62af438fa4feaf4503a (diff) | |
download | edk2-platforms-f0c855b26386c16ba0a70600d72cd09c090db0e0.tar.xz |
Small code refinement in MdeModulePkg.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10492 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Acpi/AcpiTableDxe')
-rw-r--r-- | MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c | 106 |
1 files changed, 52 insertions, 54 deletions
diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c index bd926d3ab7..23117b1ded 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c @@ -719,61 +719,59 @@ AddTableToList ( //
// Update pointers in FADT. If tables don't exist this will put NULL pointers there.
//
- if (AcpiTableInstance->Fadt3 != NULL) {
- AcpiTableInstance->Fadt3->FirmwareCtrl = (UINT32) (UINTN) AcpiTableInstance->Facs3;
- Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Facs3;
- CopyMem (
- &AcpiTableInstance->Fadt3->XFirmwareCtrl,
- &Buffer64,
- sizeof (UINT64)
- );
- AcpiTableInstance->Fadt3->Dsdt = (UINT32) (UINTN) AcpiTableInstance->Dsdt3;
- Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Dsdt3;
- CopyMem (
- &AcpiTableInstance->Fadt3->XDsdt,
- &Buffer64,
- sizeof (UINT64)
- );
+ AcpiTableInstance->Fadt3->FirmwareCtrl = (UINT32) (UINTN) AcpiTableInstance->Facs3;
+ Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Facs3;
+ CopyMem (
+ &AcpiTableInstance->Fadt3->XFirmwareCtrl,
+ &Buffer64,
+ sizeof (UINT64)
+ );
+ AcpiTableInstance->Fadt3->Dsdt = (UINT32) (UINTN) AcpiTableInstance->Dsdt3;
+ Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Dsdt3;
+ CopyMem (
+ &AcpiTableInstance->Fadt3->XDsdt,
+ &Buffer64,
+ sizeof (UINT64)
+ );
- //
- // RSDP OEM information is updated to match the FADT OEM information
- //
- CopyMem (
- &AcpiTableInstance->Rsdp3->OemId,
- &AcpiTableInstance->Fadt3->Header.OemId,
- 6
- );
-
- //
- // RSDT OEM information is updated to match FADT OEM information.
- //
- CopyMem (
- &AcpiTableInstance->Rsdt3->OemId,
- &AcpiTableInstance->Fadt3->Header.OemId,
- 6
- );
- CopyMem (
- &AcpiTableInstance->Rsdt3->OemTableId,
- &AcpiTableInstance->Fadt3->Header.OemTableId,
- sizeof (UINT64)
- );
- AcpiTableInstance->Rsdt3->OemRevision = AcpiTableInstance->Fadt3->Header.OemRevision;
-
- //
- // XSDT OEM information is updated to match FADT OEM information.
- //
- CopyMem (
- &AcpiTableInstance->Xsdt->OemId,
- &AcpiTableInstance->Fadt3->Header.OemId,
- 6
- );
- CopyMem (
- &AcpiTableInstance->Xsdt->OemTableId,
- &AcpiTableInstance->Fadt3->Header.OemTableId,
- sizeof (UINT64)
- );
- AcpiTableInstance->Xsdt->OemRevision = AcpiTableInstance->Fadt3->Header.OemRevision;
- }
+ //
+ // RSDP OEM information is updated to match the FADT OEM information
+ //
+ CopyMem (
+ &AcpiTableInstance->Rsdp3->OemId,
+ &AcpiTableInstance->Fadt3->Header.OemId,
+ 6
+ );
+
+ //
+ // RSDT OEM information is updated to match FADT OEM information.
+ //
+ CopyMem (
+ &AcpiTableInstance->Rsdt3->OemId,
+ &AcpiTableInstance->Fadt3->Header.OemId,
+ 6
+ );
+ CopyMem (
+ &AcpiTableInstance->Rsdt3->OemTableId,
+ &AcpiTableInstance->Fadt3->Header.OemTableId,
+ sizeof (UINT64)
+ );
+ AcpiTableInstance->Rsdt3->OemRevision = AcpiTableInstance->Fadt3->Header.OemRevision;
+
+ //
+ // XSDT OEM information is updated to match FADT OEM information.
+ //
+ CopyMem (
+ &AcpiTableInstance->Xsdt->OemId,
+ &AcpiTableInstance->Fadt3->Header.OemId,
+ 6
+ );
+ CopyMem (
+ &AcpiTableInstance->Xsdt->OemTableId,
+ &AcpiTableInstance->Fadt3->Header.OemTableId,
+ sizeof (UINT64)
+ );
+ AcpiTableInstance->Xsdt->OemRevision = AcpiTableInstance->Fadt3->Header.OemRevision;
}
//
// Checksum the table
|