Remove useless pointer check.

Signed-of-by: ydong10
Reviewed-by: vanjeff
Reviewed-by: rsun3

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12348 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
ydong10 2011-09-14 09:55:31 +00:00
parent 83a52195e8
commit 02317fc34f

View File

@ -789,73 +789,71 @@ AddTableToList (
// //
// Update pointers in FADT. If tables don't exist this will put NULL pointers there. // Update pointers in FADT. If tables don't exist this will put NULL pointers there.
// //
if (AcpiSupportInstance->Fadt3 != NULL) { AcpiSupportInstance->Fadt3->FirmwareCtrl = (UINT32) (UINTN) AcpiSupportInstance->Facs3;
AcpiSupportInstance->Fadt3->FirmwareCtrl = (UINT32) (UINTN) AcpiSupportInstance->Facs3; Buffer64 = (UINT64) (UINTN) AcpiSupportInstance->Facs3;
Buffer64 = (UINT64) (UINTN) AcpiSupportInstance->Facs3; CopyMem (
CopyMem ( &AcpiSupportInstance->Fadt3->XFirmwareCtrl,
&AcpiSupportInstance->Fadt3->XFirmwareCtrl, &Buffer64,
&Buffer64, sizeof (UINT64)
sizeof (UINT64) );
); AcpiSupportInstance->Fadt3->Dsdt = (UINT32) (UINTN) AcpiSupportInstance->Dsdt3;
AcpiSupportInstance->Fadt3->Dsdt = (UINT32) (UINTN) AcpiSupportInstance->Dsdt3; Buffer64 = (UINT64) (UINTN) AcpiSupportInstance->Dsdt3;
Buffer64 = (UINT64) (UINTN) AcpiSupportInstance->Dsdt3; CopyMem (
CopyMem ( &AcpiSupportInstance->Fadt3->XDsdt,
&AcpiSupportInstance->Fadt3->XDsdt, &Buffer64,
&Buffer64, sizeof (UINT64)
sizeof (UINT64) );
);
//
// RSDP OEM information is updated to match the FADT OEM information
//
CopyMem (
&AcpiSupportInstance->Rsdp3->OemId,
&AcpiSupportInstance->Fadt3->Header.OemId,
6
);
//
// RSDT OEM information is updated to match FADT OEM information.
//
CopyMem (
&AcpiSupportInstance->Rsdt3->OemId,
&AcpiSupportInstance->Fadt3->Header.OemId,
6
);
CopyMem (
&AcpiSupportInstance->Rsdt3->OemTableId,
&AcpiSupportInstance->Fadt3->Header.OemTableId,
sizeof (UINT64)
);
AcpiSupportInstance->Rsdt3->OemRevision = AcpiSupportInstance->Fadt3->Header.OemRevision;
//
// XSDT OEM information is updated to match FADT OEM information.
//
CopyMem (
&AcpiSupportInstance->Xsdt->OemId,
&AcpiSupportInstance->Fadt3->Header.OemId,
6
);
CopyMem (
&AcpiSupportInstance->Xsdt->OemTableId,
&AcpiSupportInstance->Fadt3->Header.OemTableId,
sizeof (UINT64)
);
AcpiSupportInstance->Xsdt->OemRevision = AcpiSupportInstance->Fadt3->Header.OemRevision;
}
// //
// Checksum the table // RSDP OEM information is updated to match the FADT OEM information
// //
if (Checksum) { CopyMem (
AcpiPlatformChecksum ( &AcpiSupportInstance->Rsdp3->OemId,
CurrentTableList->Table, &AcpiSupportInstance->Fadt3->Header.OemId,
CurrentTableList->Table->Length, 6
OFFSET_OF (EFI_ACPI_DESCRIPTION_HEADER, );
Checksum)
); //
} // RSDT OEM information is updated to match FADT OEM information.
//
CopyMem (
&AcpiSupportInstance->Rsdt3->OemId,
&AcpiSupportInstance->Fadt3->Header.OemId,
6
);
CopyMem (
&AcpiSupportInstance->Rsdt3->OemTableId,
&AcpiSupportInstance->Fadt3->Header.OemTableId,
sizeof (UINT64)
);
AcpiSupportInstance->Rsdt3->OemRevision = AcpiSupportInstance->Fadt3->Header.OemRevision;
//
// XSDT OEM information is updated to match FADT OEM information.
//
CopyMem (
&AcpiSupportInstance->Xsdt->OemId,
&AcpiSupportInstance->Fadt3->Header.OemId,
6
);
CopyMem (
&AcpiSupportInstance->Xsdt->OemTableId,
&AcpiSupportInstance->Fadt3->Header.OemTableId,
sizeof (UINT64)
);
AcpiSupportInstance->Xsdt->OemRevision = AcpiSupportInstance->Fadt3->Header.OemRevision;
}
//
// Checksum the table
//
if (Checksum) {
AcpiPlatformChecksum (
CurrentTableList->Table,
CurrentTableList->Table->Length,
OFFSET_OF (EFI_ACPI_DESCRIPTION_HEADER,
Checksum)
);
} }
break; break;