summaryrefslogtreecommitdiffstats
path: root/MdePkg
diff options
context:
space:
mode:
authorYi Li <yi1.li@intel.com>2023-12-19 11:11:43 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-01-19 06:47:46 +0000
commit00bf6890a9c63692215d690b3e00454dbe21b71c (patch)
tree77555c4501540b3598a95f9bb043b466452e298b /MdePkg
parent9d3fe85fcc8ff386ee0814a4dad03bbf7dc54594 (diff)
downloadedk2-00bf6890a9c63692215d690b3e00454dbe21b71c.tar.gz
edk2-00bf6890a9c63692215d690b3e00454dbe21b71c.tar.bz2
edk2-00bf6890a9c63692215d690b3e00454dbe21b71c.zip
MdePkg: Add DECLARE_LENGTH opcode of dependency expression
To avoid messy parsing of the Depex section of a Capsule, it would be a lot easier for everyone involved if we preceded the Capsule Depex Section with a length declaration. It provides simple bounds checking to avoid having to parse the op-codes, but in the case of a malformed depex being parsed, avoid other issues which can be messy. REF: UEFI spec 2.10 Table 23.4 Signed-off-by: Yi Li <yi1.li@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Reviewed-by: Wei6 Xu <wei6.xu@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Diffstat (limited to 'MdePkg')
-rw-r--r--MdePkg/Include/Protocol/FirmwareManagement.h29
1 files changed, 15 insertions, 14 deletions
diff --git a/MdePkg/Include/Protocol/FirmwareManagement.h b/MdePkg/Include/Protocol/FirmwareManagement.h
index f37067df34..e535bb697d 100644
--- a/MdePkg/Include/Protocol/FirmwareManagement.h
+++ b/MdePkg/Include/Protocol/FirmwareManagement.h
@@ -30,20 +30,21 @@ typedef struct _EFI_FIRMWARE_MANAGEMENT_PROTOCOL EFI_FIRMWARE_MANAGEMENT_PROTOCO
///
/// Dependency Expression Opcode
///
-#define EFI_FMP_DEP_PUSH_GUID 0x00
-#define EFI_FMP_DEP_PUSH_VERSION 0x01
-#define EFI_FMP_DEP_VERSION_STR 0x02
-#define EFI_FMP_DEP_AND 0x03
-#define EFI_FMP_DEP_OR 0x04
-#define EFI_FMP_DEP_NOT 0x05
-#define EFI_FMP_DEP_TRUE 0x06
-#define EFI_FMP_DEP_FALSE 0x07
-#define EFI_FMP_DEP_EQ 0x08
-#define EFI_FMP_DEP_GT 0x09
-#define EFI_FMP_DEP_GTE 0x0A
-#define EFI_FMP_DEP_LT 0x0B
-#define EFI_FMP_DEP_LTE 0x0C
-#define EFI_FMP_DEP_END 0x0D
+#define EFI_FMP_DEP_PUSH_GUID 0x00
+#define EFI_FMP_DEP_PUSH_VERSION 0x01
+#define EFI_FMP_DEP_VERSION_STR 0x02
+#define EFI_FMP_DEP_AND 0x03
+#define EFI_FMP_DEP_OR 0x04
+#define EFI_FMP_DEP_NOT 0x05
+#define EFI_FMP_DEP_TRUE 0x06
+#define EFI_FMP_DEP_FALSE 0x07
+#define EFI_FMP_DEP_EQ 0x08
+#define EFI_FMP_DEP_GT 0x09
+#define EFI_FMP_DEP_GTE 0x0A
+#define EFI_FMP_DEP_LT 0x0B
+#define EFI_FMP_DEP_LTE 0x0C
+#define EFI_FMP_DEP_END 0x0D
+#define EFI_FMP_DEP_DECLARE_LENGTH 0x0E
///
/// Image Attribute - Dependency