From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from atlmailgw1.ami.com (atlmailgw1.ami.com []) by mx.groups.io with SMTP id smtpd.web12.2744.1589233880372180480 for ; Mon, 11 May 2020 14:51:24 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: ami.com, ip: , mailfrom: oleksiyy@ami.com) X-AuditID: ac1060b2-0f7ff700000018d4-57-5eb9c8dbc0da Received: from atlms1.us.megatrends.com (atlms1.us.megatrends.com [172.16.96.144]) (using TLS with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client did not present a certificate) by atlmailgw1.ami.com (Symantec Messaging Gateway) with SMTP id 0B.61.06356.BD8C9BE5; Mon, 11 May 2020 17:51:23 -0400 (EDT) Received: from Oleksiy77.us.megatrends.com (172.16.97.158) by atlms1.us.megatrends.com (172.16.96.144) with Microsoft SMTP Server id 14.3.468.0; Mon, 11 May 2020 17:50:46 -0400 From: "Oleksiy Yakovlev" To: CC: , , , , , Subject: [PATCH V3 5/5] MdeModulePkg: Add FMP Capsule Image Header extension Date: Mon, 11 May 2020 17:50:40 -0400 Message-ID: <20200511215040.31780-6-oleksiyy@ami.com> X-Mailer: git-send-email 2.9.0.windows.1 In-Reply-To: <20200511215040.31780-1-oleksiyy@ami.com> References: <20200511215040.31780-1-oleksiyy@ami.com> MIME-Version: 1.0 Return-Path: oleksiyy@ami.com X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrNIsWRmVeSWpSXmKPExsWyRiBhgu7tEzvjDD4v1rdonzCbzeLqrV9M FvO+zWC1WHFvA7tFR8c/JgdWj+3fLzB6LN7zkimAKaqB0SYxLy+/JLEkVSEltTjZVimgKLMs MblSSSEzxVbJUEmhICcxOTU3Na/EVimxoCA1L0XJjksBA9gAlWXmKaTmJeenZOal2yp5Bvvr WliYWuoaKtmFZKQqZOal5RflJpZk5ucpJOfnlQBVp6YARRUSujkzVu68x1zwgKti1ZunbA2M szm7GDk5JARMJE59+sHcxcjFISSwi0misfk9C4SzhVHi1MM3bCBVbAKaEgeOTWEEsUUEpCSm HJjJBFLELDCRUWLrhsVgRcICPhKbj+5jBrFZBFQlJl46yQ5i8wqYShyaOosFYp2GxLQ1d5lA bE4BM4nj33+C1QgB1ezdMp8Rol5Q4uTMJ2D1zAISEgdfvGCGqJGVaDv+nH0CI/8sJGWzkJQt YGRaxSiUWJKTm5iZk15uqJeYm6mXnJ+7iRESc5t2MLZcND/EyMTBeIhRgoNZSYS3JXNnnBBv SmJlVWpRfnxRaU5q8SFGJ6AHJjJLcYOCEBgn8cYGBlKiMI6hiZmJuZG5oaWJubGxkjjv5LVr 4oQE0oFxm52aWpBaBDOEiYNTqoGxqmjeQ3+HV3v3xP1wuHLv2Z2KaadK39R0O/wrvfLP6dA2 46fn9fQEj3W5CjW2vBe7d/VTi03iTn+N8EmJt9WD3ZTaKz/J6N1wsuHe5LNCxIxpZ5EB77K6 Y36rtgtGvi6//8P+o7WH8cV9RpJhf2ReznmU0mvlYPkrTNXE4a9Wnonoim+yF5mVWIozEg21 mIuKEwGgmYJ9zgIAAA== Content-Type: text/plain Add bitmask to structure which gives a binary-inspectable mechanism to determine if a capsule contains an authentication section or depex section. (UEFI 2.8 errata a, mantis 2026) Signed-off-by: Oleksiy Yakovlev --- MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c index 5dda561..af80039 100644 --- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c +++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c @@ -285,8 +285,10 @@ ValidateFmpCapsule ( DEBUG((DEBUG_ERROR, "ImageHeader->Version(0x%x) Unknown\n", ImageHeader->Version)); return EFI_INVALID_PARAMETER; } - if (ImageHeader->Version < EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { + if (ImageHeader->Version == 1) { FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance); + } else { + FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, ImageCapsuleSupport); } if (FmpImageSize < FmpImageHeaderSize) { DEBUG((DEBUG_ERROR, "FmpImageSize(0x%lx) < FmpImageHeaderSize(0x%x)\n", FmpImageSize, FmpImageHeaderSize)); -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.