From: Ruiyu Ni Date: Mon, 14 Nov 2016 05:25:54 +0000 (+0800) Subject: PcAtChipsetPkg/PcRtc: Handle NULL table entry in RSDT/XSDT X-Git-Tag: edk2-stable201903~5145 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=5ce6fb99d481212b6b39e934efd40217530b88b1;ds=inline PcAtChipsetPkg/PcRtc: Handle NULL table entry in RSDT/XSDT The ACPI code may reserve the first entry for a certain table (might be FACS) to help with OS compatible issues. We need to skip the NULL table entry in RSDT/XSDT. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni Cc: Sean Brogan Reviewed-by: Star Zeng --- diff --git a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c index 2bb41e7e81..35e34b74b3 100644 --- a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c +++ b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c @@ -1230,6 +1230,11 @@ ScanTableInSDT ( // Table = 0; CopyMem (&Table, (VOID *) (EntryBase + Index * TablePointerSize), TablePointerSize); + + if (Table == NULL) { + continue; + } + if (Table->Signature == Signature) { return Table; }