]> git.proxmox.com Git - mirror_edk2.git/commitdiff
CorebootModulePkg-CbParseLib: Add ACPI table verification
authorLeahy, Leroy P <leroy.p.leahy@intel.com>
Thu, 25 Feb 2016 02:53:31 +0000 (18:53 -0800)
committerPrince Agyeman <prince.agyeman@intel.com>
Fri, 26 Feb 2016 18:02:25 +0000 (10:02 -0800)
Verify the register address in the FADT.

TEST=Build and run on Galileo Gen2 when the FADT was not present.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
Reviewed-by: Prince Agyeman <prince.agyeman@intel.com>
CorebootModulePkg/Library/CbParseLib/CbParseLib.c

index 8509bd2f9e51013e7ffecbeae8a2713bd467b26e..d9717f4210dd5cba2b748f3d35a6d1394f649d36 100644 (file)
@@ -478,6 +478,15 @@ CbParseFadtInfo (
           DEBUG ((EFI_D_INFO, "PmGpeEn Reg 0x%x\n", *pPmGpeEnReg));\r
         }\r
 \r
+        //
+        // Verify values for proper operation
+        //
+        ASSERT(Fadt->Pm1aCntBlk != 0);
+        ASSERT(Fadt->PmTmrBlk != 0);
+        ASSERT(Fadt->ResetReg.Address != 0);
+        ASSERT(Fadt->Pm1aEvtBlk != 0);
+        ASSERT(Fadt->Gpe0Blk != 0);
+
         return RETURN_SUCCESS;\r
       }\r
     }\r