[edk2-devel] [PATCH v2 2/2] MdePkg: Add NVMe boot partition header definition

Weipu Zhu weipu.zhu at intel.com
Thu Feb 2 06:41:54 UTC 2023


REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4304

Add NVMe boot partition header definition to NVMe.h
according to NVMe spec 2.0.

Signed-off-by: Weipu Zhu <weipu.zhu at intel.com>
Cc: Hao Wu <hao.a.wu at intel.com>
Cc: Michael D Kinney <michael.d.kinney at intel.com>
Cc: Liming Gao <gaoliming at byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu at intel.com>
---
 MdePkg/Include/IndustryStandard/Nvme.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/MdePkg/Include/IndustryStandard/Nvme.h b/MdePkg/Include/IndustryStandard/Nvme.h
index 3b4e9fe67c..8b8a1bb7f3 100644
--- a/MdePkg/Include/IndustryStandard/Nvme.h
+++ b/MdePkg/Include/IndustryStandard/Nvme.h
@@ -546,6 +546,19 @@ typedef struct {
 #define NVME_RPMB_RESULT_AUTHKEY_NOT_PROGRAMMED  0x07
 #define NVME_RPMB_RESULT_INVALID_DCB             0x08
 
+//
+// Get Log Page - Boot Partition Log Header.
+// (ref. NVMe Base spec. v2.0 Figure 262).
+//
+typedef struct {
+  UINT8     LogIdentifier;   /* Log Identifier, shall be set to 15h */
+  UINT8     Rsvd1[3];
+  UINT32    Bpsz  : 15;      /* Boot Partition Size */
+  UINT32    Rsvd2 : 16;
+  UINT32    Abpid : 1;       /* Active Boot Partition ID */
+  UINT8     Rsvd3[8];
+} NVME_BOOT_PARTITION_HEADER;
+
 //
 // NvmExpress Admin Identify Cmd
 //
-- 
2.37.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#99439): https://edk2.groups.io/g/devel/message/99439
Mute This Topic: https://groups.io/mt/96695516/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list