]> git.proxmox.com Git - mirror_edk2.git/commitdiff
PcAtChipsetPkg/PcRtc: Handle NULL table entry in RSDT/XSDT
authorRuiyu Ni <ruiyu.ni@intel.com>
Mon, 14 Nov 2016 05:25:54 +0000 (13:25 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Fri, 18 Nov 2016 02:38:39 +0000 (10:38 +0800)
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>
PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c

index 2bb41e7e81a45d1e64ae9124068ca51778a8d093..35e34b74b3a251f1e37f775dcc33156734729679 100644 (file)
@@ -1230,6 +1230,11 @@ ScanTableInSDT (
     //\r
     Table = 0;\r
     CopyMem (&Table, (VOID *) (EntryBase + Index * TablePointerSize), TablePointerSize);\r
+\r
+    if (Table == NULL) {\r
+      continue;\r
+    }\r\r
+\r
     if (Table->Signature == Signature) {\r
       return Table;\r
     }\r