From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web10.24781.1664983399522595457 for ; Wed, 05 Oct 2022 08:23:19 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@linux.microsoft.com header.s=default header.b=NikS5Sz8; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: mikuback@linux.microsoft.com) Received: from localhost.localdomain (unknown [47.201.8.94]) by linux.microsoft.com (Postfix) with ESMTPSA id 50D0120E94B0; Wed, 5 Oct 2022 08:23:18 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 50D0120E94B0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1664983399; bh=YY+pzWpCLxBZSG3XQOAh7A6j1DYSTNAPgSFM2+g4rYk=; h=From:To:Cc:Subject:Date:From; b=NikS5Sz8peQmfWK7lExqics+lkjnWsN/8cAXutgGQ6dNbfLBkHbhlMxK50FK/vl/f WnbJtL2f1XNpgl5kY4ojgQy4gC5Z3vg69CcpzLeqj4vpznv72v8N1JKeZ4sUSY5qyM CyiC1J4JP0FxnNHJFMK0NfaOSXWGYsPRySlRPTVc= From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Ashraf Ali S , Isaac Oram , Rangasai V Chaganty , Ray Ni Subject: [edk2-platforms][PATCH v1 1/1] IntelSiliconPkg/SpiFvbService: Read FV header length from header Date: Wed, 5 Oct 2022 11:23:02 -0400 Message-Id: <20221005152302.4445-1-mikuback@linux.microsoft.com> X-Mailer: git-send-email 2.28.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Kubacki Bug Fix: Read the FV header length from the Firmware Volume Block (FVB) information structure as opposed to EFI_FIRMWARE_VOLUME_HEADER to account for a variable number of block map entries. Cc: Ashraf Ali S Cc: Isaac Oram Cc: Rangasai V Chaganty Cc: Ray Ni Signed-off-by: Michael Kubacki --- Silicon/Intel/IntelSiliconPkg/Feature/Flash/SpiFvbService/FvbInfo.c | 2 = +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/Flash/SpiFvbService/Fv= bInfo.c b/Silicon/Intel/IntelSiliconPkg/Feature/Flash/SpiFvbService/FvbIn= fo.c index 634a44218c7a..ab1cb2ef1622 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/Flash/SpiFvbService/FvbInfo.c +++ b/Silicon/Intel/IntelSiliconPkg/Feature/Flash/SpiFvbService/FvbInfo.c @@ -115,7 +115,7 @@ GetFvbInfo ( Status =3D mFvbMediaInfoGenerators[Index](&FvbMediaInfo); ASSERT_EFI_ERROR (Status); if (!EFI_ERROR (Status) && (FvbMediaInfo.BaseAddress =3D=3D FvBaseAd= dress)) { - FvHeader =3D AllocateCopyPool (sizeof (EFI_FIRMWARE_VOLUME_HEADER)= , &FvbMediaInfo.FvbInfo); + FvHeader =3D AllocateCopyPool (FvbMediaInfo.FvbInfo.HeaderLength, = &FvbMediaInfo.FvbInfo); =20 // // Update the checksum value of FV header. --=20 2.28.0.windows.1