From: jason.spottswood@hpe.com
To: "Rothman, Michael A" <michael.a.rothman@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Subject: Re: [edk2-devel] Recent changes to EsrtFmp causing ASSERTs
Date: Mon, 30 Sep 2019 21:23:35 +0000 [thread overview]
Message-ID: <CS1PR8401MB1239E499F034196275A2968D93820@CS1PR8401MB1239.NAMPRD84.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <709B20DB-2303-422B-9244-C7F9DD6CF535@intel.com>
[-- Attachment #1: Type: text/plain, Size: 2805 bytes --]
Cut-n-paste problem. My apologies.
Copying again in plain text:
//
// Check to see of FmpImageInfoBuf GUID/HardwareInstance is unique
//
for (Index = 0; Index < *NumberOfDescriptors; Index++) {
if (CompareGuid (&HardwareInstances[Index].ImageTypeGuid, &FmpImageInfoBuf->ImageTypeId)) {
if (HardwareInstances[Index].HardwareInstance == FmpHardwareInstance) {
DEBUG ((DEBUG_ERROR, "EsrtFmpDxe: Duplicate firmware image descriptor with GUID %g HardwareInstance:0x%x\n", &FmpImageInfoBuf->ImageTypeId, FmpHardwareInstance));
ASSERT (
!CompareGuid (&HardwareInstances[Index].ImageTypeGuid, &FmpImageInfoBuf->ImageTypeId) ||
HardwareInstances[Index].HardwareInstance != FmpHardwareInstance
);
return EFI_UNSUPPORTED;
}
}
}
-Jason
From: Rothman, Michael A <michael.a.rothman@intel.com>
Sent: Monday, September 30, 2019 3:53 PM
To: devel@edk2.groups.io; Spottswood, Jason <jason.spottswood@hpe.com>
Subject: Re: [edk2-devel] Recent changes to EsrtFmp causing ASSERTs
Jason, Agreed - though that image you sent was challenging for these old eyes. Black on dark grey? Ack!
Thanks,
Michael A. Rothman
---------------------------------------------------------------
Let no excuse be a barrier to your success.
On Sep 30, 2019, at 1:48 PM, "jason.spottswood@hpe.com<mailto:jason.spottswood@hpe.com>" <jason.spottswood@hpe.com<mailto:jason.spottswood@hpe.com>> wrote:
In EsrtFmp.c, function CreateEsrtEntry, line 196, the code asserts if the FMP image hardware instance matches that of an existing instance. This is fine if the hardware instance is supported. The field is optional though. In the UEFI spec, "a zero hardware instance means the FMP provider is not able to determine a unique hardware instance number or a hardware instance number is not needed." The code below needs to also check if the hardware instance is supported (by comparing it to zero) before checking it against existing entries.
//
// Check to see of FmpImageInfoBuf GUID/HardwareInstance is unique
//
for (Index = 0; Index < *NumberOfDescriptors; Index++) {
if (CompareGuid (&HardwareInstances[Index].ImageTypeGuid, &FmpImageInfoBuf->ImageTypeId)) {
if (HardwareInstances[Index].HardwareInstance == FmpHardwareInstance) {
DEBUG ((DEBUG_ERROR, "EsrtFmpDxe: Duplicate firmware image descriptor with GUID %g HardwareInstance:0x%x\n", &FmpImageInfoBuf->ImageTypeId, FmpHardwareInstance));
ASSERT (
!CompareGuid (&HardwareInstances[Index].ImageTypeGuid, &FmpImageInfoBuf->ImageTypeId) ||
HardwareInstances[Index].HardwareInstance != FmpHardwareInstance
);
return EFI_UNSUPPORTED;
}
}
}
[-- Attachment #2: Type: text/html, Size: 10726 bytes --]
next prev parent reply other threads:[~2019-09-30 21:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-30 20:48 Recent changes to EsrtFmp causing ASSERTs jason.spottswood
2019-09-30 20:52 ` [edk2-devel] " Rothman, Michael A
2019-09-30 21:23 ` jason.spottswood [this message]
2019-10-01 16:49 ` Sean
2019-10-01 17:30 ` Michael D Kinney
2019-10-01 21:20 ` Spottswood, Jason
2019-10-02 15:12 ` Michael D Kinney
2019-10-18 21:52 ` scott.wiginton
2019-10-19 1:03 ` Michael D Kinney
2019-10-21 13:12 ` scott.wiginton
2019-10-21 16:30 ` Michael D Kinney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CS1PR8401MB1239E499F034196275A2968D93820@CS1PR8401MB1239.NAMPRD84.PROD.OUTLOOK.COM \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox