From 82556400569dfc2ca006137cb2eab6c050f20bc6 Mon Sep 17 00:00:00 2001 From: Maurice Ma Date: Tue, 16 Apr 2019 10:27:45 -0700 Subject: [PATCH] [APL] Enhance Boot Guard check logic for IFWI image This patch updated the logic to check if Boot Guard is enabled in the base IFWI image. Signed-off-by: Maurice Ma --- Platform/ApollolakeBoardPkg/Script/StitchLoader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Platform/ApollolakeBoardPkg/Script/StitchLoader.py b/Platform/ApollolakeBoardPkg/Script/StitchLoader.py index 8ca8e0a6..9cf88901 100755 --- a/Platform/ApollolakeBoardPkg/Script/StitchLoader.py +++ b/Platform/ApollolakeBoardPkg/Script/StitchLoader.py @@ -784,7 +784,7 @@ def CreateIfwiImage (IfwiIn, IfwiOut, BiosOut, PlatformData, NonRedundant, Stitc if not Comp: raise Exception ('Unsupported base image format !') Data = IfwiData[Comp.Offset + 0x30:Comp.Offset + 0x32] - if Data[0] != 0x10 or Data[1] != 0x00: + if (Data[0] & 0x0F) != 0x00: raise Exception ('Unsupported base image type. Boot Guard might have been enabled in this image !') print ('Creating %sredundant image ...' % ('Non-' if NonRedundant else ''))