From 79f4f6f0c99c2cc8b03304d0fec9bd657b313312 Mon Sep 17 00:00:00 2001 From: "Leahy, Leroy P" Date: Wed, 24 Feb 2016 18:53:31 -0800 Subject: [PATCH] CorebootModulePkg-CbParseLib: Add ACPI table verification 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 Reviewed-by: Erik Bjorge Reviewed-by: Prince Agyeman --- CorebootModulePkg/Library/CbParseLib/CbParseLib.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CorebootModulePkg/Library/CbParseLib/CbParseLib.c b/CorebootModulePkg/Library/CbParseLib/CbParseLib.c index 8509bd2f9e..d9717f4210 100644 --- a/CorebootModulePkg/Library/CbParseLib/CbParseLib.c +++ b/CorebootModulePkg/Library/CbParseLib/CbParseLib.c @@ -478,6 +478,15 @@ CbParseFadtInfo ( DEBUG ((EFI_D_INFO, "PmGpeEn Reg 0x%x\n", *pPmGpeEnReg)); } + // + // 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; } } -- 2.39.2