From: Star Zeng <star.zeng@intel.com>
To: edk2-devel@lists.01.org
Cc: Star Zeng <star.zeng@intel.com>, Liming Gao <liming.gao@intel.com>
Subject: [PATCH V2 1/4] MdePkg PiFirmwareVolume.h: Add USED_SIZE FV_EXT_TYPE definitions
Date: Wed, 29 Nov 2017 18:14:54 +0800 [thread overview]
Message-ID: <1511950497-9088-2-git-send-email-star.zeng@intel.com> (raw)
In-Reply-To: <1511950497-9088-1-git-send-email-star.zeng@intel.com>
The definitions are introduced by PI 1.6 spec.
The EFI_FIRMWARE_VOLUME_EXT_ENTRY_USED_SIZE_TYPE can be used to find
out how many EFI_FVB2_ERASE_POLARITY bytes are at the end of the FV.
When the FV gets shadowed into memory you only need to copy the used
bytes into memory and fill the rest of the memory buffer with the
erase value.
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
MdePkg/Include/Pi/PiFirmwareVolume.h | 23 +++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)
diff --git a/MdePkg/Include/Pi/PiFirmwareVolume.h b/MdePkg/Include/Pi/PiFirmwareVolume.h
index 79fde131902e..2482a7f96add 100644
--- a/MdePkg/Include/Pi/PiFirmwareVolume.h
+++ b/MdePkg/Include/Pi/PiFirmwareVolume.h
@@ -1,7 +1,7 @@
/** @file
The firmware volume related definitions in PI.
- Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -11,7 +11,7 @@
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@par Revision Reference:
- PI Version 1.3
+ PI Version 1.6
**/
@@ -231,4 +231,23 @@ typedef struct {
///
} EFI_FIRMWARE_VOLUME_EXT_ENTRY_GUID_TYPE;
+#define EFI_FV_EXT_TYPE_USED_SIZE_TYPE 0x03
+
+///
+/// The EFI_FIRMWARE_VOLUME_EXT_ENTRY_USED_SIZE_TYPE can be used to find
+/// out how many EFI_FVB2_ERASE_POLARITY bytes are at the end of the FV.
+///
+typedef struct {
+ ///
+ /// Standard extension entry, with the type EFI_FV_EXT_TYPE_USED_SIZE_TYPE.
+ ///
+ EFI_FIRMWARE_VOLUME_EXT_ENTRY Hdr;
+ ///
+ /// The number of bytes of the FV that are in uses. The remaining
+ /// EFI_FIRMWARE_VOLUME_HEADER FvLength minus UsedSize bytes in
+ /// the FV must contain the value implied by EFI_FVB2_ERASE_POLARITY.
+ ///
+ UINT32 UsedSize;
+} EFI_FIRMWARE_VOLUME_EXT_ENTRY_USED_SIZE_TYPE;
+
#endif
--
2.7.0.windows.1
next prev parent reply other threads:[~2017-11-29 10:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-29 10:14 [PATCH 0/4] Add USED_SIZE FV_EXT_TYPE support Star Zeng
2017-11-29 10:14 ` Star Zeng [this message]
2017-11-29 10:14 ` [PATCH V2 2/4] MdeModulePkg PeiCore: Support USED_SIZE FV_EXT_TYPE Star Zeng
2017-11-29 10:14 ` [PATCH V2 3/4] MdeModulePkg DxeCore: Check FvImage alignment Star Zeng
2017-11-29 10:14 ` [PATCH V2 4/4] MdeModulePkg DxeCore: Support USED_SIZE FV_EXT_TYPE Star Zeng
2017-11-30 11:09 ` [PATCH 0/4] Add USED_SIZE FV_EXT_TYPE support Gao, Liming
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=1511950497-9088-2-git-send-email-star.zeng@intel.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