Re: [edk2-devel] [PATCH 1/1] MdePkg: Update the Label definitions of the EFI_NVDIMM_LABEL

2024-01-15 Thread Junfeng Guan
Hi Liming,
 Would you like help to push this PR: 
https://github.com/tianocore/edk2/pull/5191
Thanks.

B.R.
Junfeng

-Original Message-
From: Guan, JunfengX 
Sent: Thursday, January 11, 2024 3:55 PM
To: gaoliming ; devel@edk2.groups.io
Cc: Kinney, Michael D ; Liu, Zhiguang 
; Li, Yi1 
Subject: RE: [edk2-devel] [PATCH 1/1] MdePkg: Update the Label definitions of 
the EFI_NVDIMM_LABEL

Hi Liming,
   Thanks! I created a PR: https://github.com/tianocore/edk2/pull/5191
   Could you help push it?

B.R.
Junfeng
-Original Message-
From: gaoliming 
Sent: Thursday, January 11, 2024 10:19 AM
To: devel@edk2.groups.io; Guan, JunfengX 
Cc: Kinney, Michael D ; Liu, Zhiguang 
; Li, Yi1 
Subject: 回复: [edk2-devel] [PATCH 1/1] MdePkg: Update the Label definitions of 
the EFI_NVDIMM_LABEL

Reviewed-by: Liming Gao 

> -邮件原件-
> 发件人: devel@edk2.groups.io  代表 Junfeng Guan
> 发送时间: 2023年12月27日 9:57
> 收件人: devel@edk2.groups.io
> 抄送: Michael D Kinney ; Liming Gao 
> ; Zhiguang Liu ; Yi 
> Li 
> 主题: [edk2-devel] [PATCH 1/1] MdePkg: Update the Label definitions of 
> the EFI_NVDIMM_LABEL
> 
> Refer to Uefi spec 2.10 section 13.19.5, update the label definitions 
> for NVDIMM SPA location cookie.
> 
> Signed-off-by: Junfeng Guan 
> Cc: Michael D Kinney 
> Cc: Liming Gao 
> Cc: Zhiguang Liu 
> Cc: Yi Li 
> ---
>  MdePkg/Include/Protocol/NvdimmLabel.h | 16 +++-
>  1 file changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/MdePkg/Include/Protocol/NvdimmLabel.h
> b/MdePkg/Include/Protocol/NvdimmLabel.h
> index e46999a3ab4a..2352c9bd1652 100644
> --- a/MdePkg/Include/Protocol/NvdimmLabel.h
> +++ b/MdePkg/Include/Protocol/NvdimmLabel.h
> @@ -122,6 +122,12 @@ typedef struct {
>  ///
>  #define EFI_NVDIMM_LABEL_FLAGS_UPDATING  0x0008
> 
> +///
> +/// When set, the SPALocationCookie in the namespace label is valid 
> +and
> should match the
> +/// current value in the NFIT SPA Range Structure.
> +///
> +#define EFI_NVDIMM_LABEL_FLAGS_SPACOOKIE_BOUND  0x0010
> +
>  typedef struct {
>///
>/// Unique Label Identifier UUID per RFC 4122.
> @@ -196,10 +202,18 @@ typedef struct {
>///
>EFI_GUIDAddressAbstractionGuid;
> 
> +  ///
> +  /// When creating the label, this value is set to the value from 
> + the
NFIT
> SPA Range Structure if the
> +  /// SPALocationCookie flag (bit 2) is set. If
> EFI_NVDIMM_LABEL_FLAGS_SPACOOKIE_BOUND is set, the SPALocationCookie
> +  /// value stored in the namespace label should match the current 
> + value
in
> the NFIT SPA Range Structure.
> +  /// Otherwise, the data may not be read correctly.
> +  ///
> +  UINT64  SPALocationCookie;
> +
>///
>/// Shall be 0.
>///
> -  UINT8   Reserved1[88];
> +  UINT8   Reserved1[80];
> 
>///
>/// 64-bit Fletcher64 checksum of all fields in this Label.
> --
> 2.26.2.windows.1
> 
> 
> 
> 
> 





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




Re: [edk2-devel] [PATCH 1/1] MdePkg: Update the Label definitions of the EFI_NVDIMM_LABEL

2024-01-10 Thread Junfeng Guan
Hi Liming,
   Thanks! I created a PR: https://github.com/tianocore/edk2/pull/5191
   Could you help push it?

B.R.
Junfeng
-Original Message-
From: gaoliming  
Sent: Thursday, January 11, 2024 10:19 AM
To: devel@edk2.groups.io; Guan, JunfengX 
Cc: Kinney, Michael D ; Liu, Zhiguang 
; Li, Yi1 
Subject: 回复: [edk2-devel] [PATCH 1/1] MdePkg: Update the Label definitions of 
the EFI_NVDIMM_LABEL

Reviewed-by: Liming Gao 

> -邮件原件-
> 发件人: devel@edk2.groups.io  代表 Junfeng Guan
> 发送时间: 2023年12月27日 9:57
> 收件人: devel@edk2.groups.io
> 抄送: Michael D Kinney ; Liming Gao 
> ; Zhiguang Liu ; Yi 
> Li 
> 主题: [edk2-devel] [PATCH 1/1] MdePkg: Update the Label definitions of 
> the EFI_NVDIMM_LABEL
> 
> Refer to Uefi spec 2.10 section 13.19.5, update the label definitions 
> for NVDIMM SPA location cookie.
> 
> Signed-off-by: Junfeng Guan 
> Cc: Michael D Kinney 
> Cc: Liming Gao 
> Cc: Zhiguang Liu 
> Cc: Yi Li 
> ---
>  MdePkg/Include/Protocol/NvdimmLabel.h | 16 +++-
>  1 file changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/MdePkg/Include/Protocol/NvdimmLabel.h
> b/MdePkg/Include/Protocol/NvdimmLabel.h
> index e46999a3ab4a..2352c9bd1652 100644
> --- a/MdePkg/Include/Protocol/NvdimmLabel.h
> +++ b/MdePkg/Include/Protocol/NvdimmLabel.h
> @@ -122,6 +122,12 @@ typedef struct {
>  ///
>  #define EFI_NVDIMM_LABEL_FLAGS_UPDATING  0x0008
> 
> +///
> +/// When set, the SPALocationCookie in the namespace label is valid 
> +and
> should match the
> +/// current value in the NFIT SPA Range Structure.
> +///
> +#define EFI_NVDIMM_LABEL_FLAGS_SPACOOKIE_BOUND  0x0010
> +
>  typedef struct {
>///
>/// Unique Label Identifier UUID per RFC 4122.
> @@ -196,10 +202,18 @@ typedef struct {
>///
>EFI_GUIDAddressAbstractionGuid;
> 
> +  ///
> +  /// When creating the label, this value is set to the value from 
> + the
NFIT
> SPA Range Structure if the
> +  /// SPALocationCookie flag (bit 2) is set. If
> EFI_NVDIMM_LABEL_FLAGS_SPACOOKIE_BOUND is set, the SPALocationCookie
> +  /// value stored in the namespace label should match the current 
> + value
in
> the NFIT SPA Range Structure.
> +  /// Otherwise, the data may not be read correctly.
> +  ///
> +  UINT64  SPALocationCookie;
> +
>///
>/// Shall be 0.
>///
> -  UINT8   Reserved1[88];
> +  UINT8   Reserved1[80];
> 
>///
>/// 64-bit Fletcher64 checksum of all fields in this Label.
> --
> 2.26.2.windows.1
> 
> 
> 
> 
> 





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




Re: [edk2-devel] [PATCH 1/1] MdePkg: Update GetHealthStatus function description

2024-01-10 Thread Junfeng Guan
Hi Liming,
   Thanks! I created a PR: https://github.com/tianocore/edk2/pull/5248
   Could you help push it?

B.R.
Junfeng
-Original Message-
From: gaoliming  
Sent: Wednesday, January 10, 2024 2:19 PM
To: devel@edk2.groups.io; Guan, JunfengX 
Cc: Kinney, Michael D ; Liu, Zhiguang 
; Li, Yi1 
Subject: 回复: [edk2-devel] [PATCH 1/1] MdePkg: Update GetHealthStatus function 
description

Reviewed-by: Liming Gao 

> -邮件原件-
> 发件人: devel@edk2.groups.io  代表 Junfeng Guan
> 发送时间: 2023年12月28日 15:54
> 收件人: devel@edk2.groups.io
> 抄送: Michael D Kinney ; Liming Gao 
> ; Zhiguang Liu ; Yi 
> Li 
> 主题: [edk2-devel] [PATCH 1/1] MdePkg: Update GetHealthStatus function 
> description
> 
> Refer to Uefi spec 2.10 section 11.10.2, update the return value for 
> EFI_DRIVER_HEALTH_PROTOCOL.GetHealthStatus.
> 
> Signed-off-by: Junfeng Guan 
> Cc: Michael D Kinney 
> Cc: Liming Gao 
> Cc: Zhiguang Liu 
> Cc: Yi Li 
> ---
>  MdePkg/Include/Protocol/DriverHealth.h | 32 
> +++---
>  1 file changed, 8 insertions(+), 24 deletions(-)
> 
> diff --git a/MdePkg/Include/Protocol/DriverHealth.h
> b/MdePkg/Include/Protocol/DriverHealth.h
> index 9de025434ef3..9e1bd903f4be 100644
> --- a/MdePkg/Include/Protocol/DriverHealth.h
> +++ b/MdePkg/Include/Protocol/DriverHealth.h
> @@ -137,35 +137,19 @@ EFI_STATUS
>will only be returned with a 
> HealthStatus value of
> 
> EfiDriverHealthStatusConfigurationRequired.
> 
> -  @retval EFI_SUCCESS   ControllerHandle is NULL, and all the
> controllers
> -managed by this driver specified by
> This have a health
> -status of
> EfiDriverHealthStatusHealthy with no warning
> -messages to be returned.  The
> ChildHandle, HealthStatus,
> -MessageList, and FormList
> parameters are ignored.
> -
> -  @retval EFI_DEVICE_ERROR  ControllerHandle is NULL, and one or
> more of the
> -controllers managed by this driver
> specified by This
> -do not have a health status of
> EfiDriverHealthStatusHealthy.
> -The ChildHandle, HealthStatus,
> MessageList, and
> -FormList parameters are ignored.
> -
> -  @retval EFI_DEVICE_ERROR  ControllerHandle is NULL, and one or
> more of the
> -controllers managed by this driver
> specified by This
> -have one or more warning and/or
> error messages.
> -The ChildHandle, HealthStatus,
> MessageList, and
> -FormList parameters are ignored.
> -
> -  @retval EFI_SUCCESS   ControllerHandle is not NULL and the
> health status
> -of the controller specified by
> ControllerHandle and
> -ChildHandle was returned in
> HealthStatus.  A list
> -of warning and error messages may
> be optionally
> -returned in MessageList, and a list of
> HII Forms
> -may be optionally returned in
> FormList.
> +  @retval EFI_SUCCESS   The health status of the controller
> specified by
> +ControllerHandle and ChildHandle
> was returned in HealthStatus.
> +A list of warning and error messages
> may be optionally
> +returned in MessageList, and an HII
> Form may be optionally
> +specified by FormHiiHandle.
> 
>@retval EFI_UNSUPPORTED   ControllerHandle is not NULL, and
> the controller
>  specified by ControllerHandle and 
> ChildHandle is not
>  currently being managed by the driver 
> specified by This.
> 
> +  @retval EFI_UNSUPPORTED   ControllerHandle is NULL and there
> are no devices being
> +managed by the driver.
> +
>@retval EFI_INVALID_PARAMETER HealthStatus is NULL.
> 
>@retval EFI_OUT_OF_RESOURCES  MessageList is not NULL, and there 
> are not enough
> --
> 2.26.2.windows.1
> 
> 
> 
> 
> 





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




[edk2-devel] [PATCH 1/1] MdePkg: Update GetHealthStatus function description

2023-12-27 Thread Junfeng Guan
Refer to Uefi spec 2.10 section 11.10.2, update the return value
for EFI_DRIVER_HEALTH_PROTOCOL.GetHealthStatus.

Signed-off-by: Junfeng Guan 
Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Zhiguang Liu 
Cc: Yi Li 
---
 MdePkg/Include/Protocol/DriverHealth.h | 32 +++---
 1 file changed, 8 insertions(+), 24 deletions(-)

diff --git a/MdePkg/Include/Protocol/DriverHealth.h 
b/MdePkg/Include/Protocol/DriverHealth.h
index 9de025434ef3..9e1bd903f4be 100644
--- a/MdePkg/Include/Protocol/DriverHealth.h
+++ b/MdePkg/Include/Protocol/DriverHealth.h
@@ -137,35 +137,19 @@ EFI_STATUS
   will only be returned with a HealthStatus value 
of
   EfiDriverHealthStatusConfigurationRequired.
 
-  @retval EFI_SUCCESS   ControllerHandle is NULL, and all the 
controllers
-managed by this driver specified by This have 
a health
-status of EfiDriverHealthStatusHealthy with no 
warning
-messages to be returned.  The ChildHandle, 
HealthStatus,
-MessageList, and FormList parameters are 
ignored.
-
-  @retval EFI_DEVICE_ERROR  ControllerHandle is NULL, and one or more of 
the
-controllers managed by this driver specified 
by This
-do not have a health status of 
EfiDriverHealthStatusHealthy.
-The ChildHandle, HealthStatus, MessageList, and
-FormList parameters are ignored.
-
-  @retval EFI_DEVICE_ERROR  ControllerHandle is NULL, and one or more of 
the
-controllers managed by this driver specified 
by This
-have one or more warning and/or error messages.
-The ChildHandle, HealthStatus, MessageList, and
-FormList parameters are ignored.
-
-  @retval EFI_SUCCESS   ControllerHandle is not NULL and the health 
status
-of the controller specified by 
ControllerHandle and
-ChildHandle was returned in HealthStatus.  A 
list
-of warning and error messages may be optionally
-returned in MessageList, and a list of HII 
Forms
-may be optionally returned in FormList.
+  @retval EFI_SUCCESS   The health status of the controller specified 
by
+ControllerHandle and ChildHandle was returned 
in HealthStatus.
+A list of warning and error messages may be 
optionally
+returned in MessageList, and an HII Form may 
be optionally
+specified by FormHiiHandle.
 
   @retval EFI_UNSUPPORTED   ControllerHandle is not NULL, and the 
controller
 specified by ControllerHandle and ChildHandle 
is not
 currently being managed by the driver 
specified by This.
 
+  @retval EFI_UNSUPPORTED   ControllerHandle is NULL and there are no 
devices being
+managed by the driver.
+
   @retval EFI_INVALID_PARAMETER HealthStatus is NULL.
 
   @retval EFI_OUT_OF_RESOURCES  MessageList is not NULL, and there are not 
enough
-- 
2.26.2.windows.1



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




[edk2-devel] [PATCH 1/1] MdePkg: Update the Label definitions of the EFI_NVDIMM_LABEL

2023-12-27 Thread Junfeng Guan
Refer to Uefi spec 2.10 section 13.19.5, update the label definitions
for NVDIMM SPA location cookie.

Signed-off-by: Junfeng Guan 
Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Zhiguang Liu 
Cc: Yi Li 
---
 MdePkg/Include/Protocol/NvdimmLabel.h | 16 +++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/MdePkg/Include/Protocol/NvdimmLabel.h 
b/MdePkg/Include/Protocol/NvdimmLabel.h
index e46999a3ab4a..2352c9bd1652 100644
--- a/MdePkg/Include/Protocol/NvdimmLabel.h
+++ b/MdePkg/Include/Protocol/NvdimmLabel.h
@@ -122,6 +122,12 @@ typedef struct {
 ///
 #define EFI_NVDIMM_LABEL_FLAGS_UPDATING  0x0008
 
+///
+/// When set, the SPALocationCookie in the namespace label is valid and should 
match the
+/// current value in the NFIT SPA Range Structure.
+///
+#define EFI_NVDIMM_LABEL_FLAGS_SPACOOKIE_BOUND  0x0010
+
 typedef struct {
   ///
   /// Unique Label Identifier UUID per RFC 4122.
@@ -196,10 +202,18 @@ typedef struct {
   ///
   EFI_GUIDAddressAbstractionGuid;
 
+  ///
+  /// When creating the label, this value is set to the value from the NFIT 
SPA Range Structure if the
+  /// SPALocationCookie flag (bit 2) is set. If 
EFI_NVDIMM_LABEL_FLAGS_SPACOOKIE_BOUND is set, the SPALocationCookie
+  /// value stored in the namespace label should match the current value in 
the NFIT SPA Range Structure.
+  /// Otherwise, the data may not be read correctly.
+  ///
+  UINT64  SPALocationCookie;
+
   ///
   /// Shall be 0.
   ///
-  UINT8   Reserved1[88];
+  UINT8   Reserved1[80];
 
   ///
   /// 64-bit Fletcher64 checksum of all fields in this Label.
-- 
2.26.2.windows.1



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




[edk2-devel] [PATCH 1/1] MdePkg: Updated the comments of EFI_SYSTEM_TABLE and ReadKeyStroke

2023-12-26 Thread Junfeng Guan
1. Refer to Uefi spec 2.10 section 4.3.1, Updated the comments of
EFI_SYSTEM_TABLE to satisfy ConIn/ConOut/StdErr requirements.
2. Refer to Uefi spec 2.10 section 13.3.3, Add a new retval
EFI_UNSUPPORTED to EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.ReadKeyStrokeEx
and EFI_SIMPLE_TEXT_INPUT_PROTOCOL.ReadKeyStroke().

Signed-off-by: Junfeng Guan 
Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Zhiguang Liu 
Cc: Yi Li 
---
 MdePkg/Include/Protocol/SimpleTextIn.h   |  1 +
 MdePkg/Include/Protocol/SimpleTextInEx.h |  1 +
 MdePkg/Include/Uefi/UefiSpec.h   | 10 +++---
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/MdePkg/Include/Protocol/SimpleTextIn.h 
b/MdePkg/Include/Protocol/SimpleTextIn.h
index 838fae279e71..b9d48472dd7f 100644
--- a/MdePkg/Include/Protocol/SimpleTextIn.h
+++ b/MdePkg/Include/Protocol/SimpleTextIn.h
@@ -100,6 +100,7 @@ EFI_STATUS
   @retval EFI_NOT_READYThere was no keystroke data available.
   @retval EFI_DEVICE_ERROR The keystroke information was not returned due to
hardware errors.
+  @retval EFI_UNSUPPORTED  The device does not support the ability to read 
keystroke data.
 
 **/
 typedef
diff --git a/MdePkg/Include/Protocol/SimpleTextInEx.h 
b/MdePkg/Include/Protocol/SimpleTextInEx.h
index 8317325d9b82..f33893768efb 100644
--- a/MdePkg/Include/Protocol/SimpleTextInEx.h
+++ b/MdePkg/Include/Protocol/SimpleTextInEx.h
@@ -186,6 +186,7 @@ typedef struct {
   @retval EFI_NOT_READYThere was no keystroke data available.
   @retval EFI_DEVICE_ERROR The keystroke information was not returned due to
hardware errors.
+  @retval EFI_UNSUPPORTED  The device does not support the ability to read 
keystroke data.
 
 
 **/
diff --git a/MdePkg/Include/Uefi/UefiSpec.h b/MdePkg/Include/Uefi/UefiSpec.h
index 5de00e8ea2af..c4952bd5f0d3 100644
--- a/MdePkg/Include/Uefi/UefiSpec.h
+++ b/MdePkg/Include/Uefi/UefiSpec.h
@@ -2006,7 +2006,8 @@ typedef struct {
   UINT32 FirmwareRevision;
   ///
   /// The handle for the active console input device. This handle must support
-  /// EFI_SIMPLE_TEXT_INPUT_PROTOCOL and EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.
+  /// EFI_SIMPLE_TEXT_INPUT_PROTOCOL and EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL. If
+  /// there is no active console, these protocols must still be present.
   ///
   EFI_HANDLE ConsoleInHandle;
   ///
@@ -2015,7 +2016,9 @@ typedef struct {
   ///
   EFI_SIMPLE_TEXT_INPUT_PROTOCOL *ConIn;
   ///
-  /// The handle for the active console output device.
+  /// The handle for the active console output device. This handle must 
support the
+  /// EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL. If there is no active console, these 
protocols
+  /// must still be present.
   ///
   EFI_HANDLE ConsoleOutHandle;
   ///
@@ -2025,7 +2028,8 @@ typedef struct {
   EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL*ConOut;
   ///
   /// The handle for the active standard error console device.
-  /// This handle must support the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.
+  /// This handle must support the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL. If there
+  /// is no active console, this protocol must still be present.
   ///
   EFI_HANDLE StandardErrorHandle;
   ///
-- 
2.26.2.windows.1



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