Add MdePkg maintainers & reviewers.

One general level comment, could you help to add 'NVME_' prefix to the name of
all newly added structure and macro definitions (like most existing ones in
Nvme.h)?

Best Regards,
Hao Wu

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Weipu
> Zhu
> Sent: Wednesday, February 1, 2023 2:27 PM
> To: devel@edk2.groups.io
> Cc: Zhu, Weipu <weipu....@intel.com>
> Subject: [edk2-devel] [PATCH 1/2] MdePkg: Add RPMB related commands
> and DCB definition for NVMe
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4303
> 
> Add RPMB(Replay Protected Memory Block) access commands,
> result and DCB(Device Configuration Block) definition for
> NVMe according to the NVMe spec 2.0.
> 
> Signed-off-by: Weipu Zhu <weipu....@intel.com>
> ---
>  MdePkg/Include/IndustryStandard/Nvme.h | 46
> +++++++++++++++++++++++++-
>  1 file changed, 45 insertions(+), 1 deletion(-)
> 
> diff --git a/MdePkg/Include/IndustryStandard/Nvme.h
> b/MdePkg/Include/IndustryStandard/Nvme.h
> index 4a1d92c45d..c37cd762b9 100644
> --- a/MdePkg/Include/IndustryStandard/Nvme.h
> +++ b/MdePkg/Include/IndustryStandard/Nvme.h
> @@ -2,12 +2,13 @@
>    Definitions based on NVMe spec. version 1.1.
> 
>    (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
> -  Copyright (c) 2017 - 2021, Intel Corporation. All rights reserved.<BR>
> +  Copyright (c) 2017 - 2023, Intel Corporation. All rights reserved.<BR>
>    SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>    @par Specification Reference:
>    NVMe Specification 1.1
>    NVMe Specification 1.4
> +  NVMe Specification 2.0
> 
>  **/
> 
> @@ -502,6 +503,49 @@ typedef struct {
>    // UINT8    *Data;                         /* Data to be written or read 
> by signed
> access where M = 512 * Sector Count. */
>  } NVME_RPMB_DATA_FRAME;
> 
> +//
> +// RPMB Device Configuration Block Data Structure.
> +// (ref. NVMe Base spec. v2.0 Figure 460).
> +//
> +typedef struct {
> +  UINT8    BPPEnable;     /* Boot Partition Protection Enabled */
> +  UINT8    BPLock;        /* Boot Partition Lock */
> +  UINT8    NameSpaceWrP;  /* Namespace Write Protection */
> +  UINT8    Rsvd1[509];    /* Reserved as of Nvm Express 2.0 Spec */
> +} RPMB_DCB;
> +
> +//
> +// RPMB Request and Response Message Types.
> +// (ref. NVMe Base spec. v2.0 Figure 461).
> +//
> +#define RPMB_AUTHKEY_PROGRAM           0x0001
> +#define RPMB_COUNTER_READ              0x0002
> +#define RPMB_AUTHDATA_WRITE            0x0003
> +#define RPMB_AUTHDATA_READ             0x0004
> +#define RPMB_RESULT_READ               0x0005
> +#define RPMB_DCB_WRITE                 0x0006
> +#define RPMB_DCB_READ                  0x0007
> +#define RPMB_AUTHKEY_PROGRAM_RESPONSE  0x0100
> +#define RPMB_COUNTER_READ_RESPONSE     0x0200
> +#define RPMB_AUTHDATA_WRITE_RESPONSE   0x0300
> +#define RPMB_AUTHDATA_READ_RESPONSE    0x0400
> +#define RPMB_DCB_WRITE_RESPONSE        0x0600
> +#define RPMB_DCB_READ_RESPONSE         0x0700
> +
> +//
> +// RPMB Operation Result.
> +// (ref. NVMe Base spec. v2.0 Figure 462).
> +//
> +#define RPMB_RESULT_SUCCESS                 0x00
> +#define RPMB_RESULT_GENERAL_FAILURE         0x01
> +#define RPMB_RESULT_AHTHENTICATION_FAILURE  0x02
> +#define RPMB_RESULT_COUNTER_FAILURE         0x03
> +#define RPMB_RESULT_ADDRESS_FAILURE         0x04
> +#define RPMB_RESULT_WRITE_FAILURE           0x05
> +#define RPMB_RESULT_READ_FAILURE            0x06
> +#define RPMB_RESULT_AUTHKEY_NOT_PROGRAMMED  0x07
> +#define RPMB_RESULT_INVALID_DCB             0x08
> +
>  //
>  // NvmExpress Admin Identify Cmd
>  //
> --
> 2.37.1.windows.1
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#99426): https://edk2.groups.io/g/devel/message/99426
Mute This Topic: https://groups.io/mt/96684351/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to