summaryrefslogtreecommitdiffstats
path: root/PcAtChipsetPkg
diff options
context:
space:
mode:
authorRuiyu Ni <ruiyu.ni@intel.com>2016-11-14 13:25:54 +0800
committerRuiyu Ni <ruiyu.ni@intel.com>2016-11-18 10:38:39 +0800
commit5ce6fb99d481212b6b39e934efd40217530b88b1 (patch)
treeaa89482a670094955ba54b709ad005590f21fe91 /PcAtChipsetPkg
parentec16deeac90e4b8014394be58a229f6aa8c493af (diff)
downloadedk2-5ce6fb99d481212b6b39e934efd40217530b88b1.tar.gz
edk2-5ce6fb99d481212b6b39e934efd40217530b88b1.tar.bz2
edk2-5ce6fb99d481212b6b39e934efd40217530b88b1.zip
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 <ruiyu.ni@intel.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
Diffstat (limited to 'PcAtChipsetPkg')
-rw-r--r--PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c5
1 files changed, 5 insertions, 0 deletions
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;
}