[edk2-devel] [PATCH V2 1/6] MdeModulePkg/ResetSystemLib.h: Add useful reset data definition

Laszlo Ersek lersek at redhat.com
Wed May 8 08:50:39 UTC 2019


On 05/08/19 06:49, Zhichao Gao wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1772
> 
> Add a useful definition of reset data which start with a NULL
> string and followed by a EFI_GUID.
> 
> Cc: Jian J Wang <jian.j.wang at intel.com>
> Cc: Hao Wu <hao.a.wu at intel.com>
> Cc: Ray Ni <ray.ni at intel.com>
> Cc: Star Zeng <star.zeng at intel.com>
> Cc: Liming Gao <liming.gao at intel.com>
> Cc: Sean Brogan <sean.brogan at microsoft.com>
> Cc: Michael Turner <Michael.Turner at microsoft.com>
> Cc: Bret Barkelew <Bret.Barkelew at microsoft.com>
> Cc: Laszlo Ersek <lersek at redhat.com>
> Signed-off-by: Zhichao Gao <zhichao.gao at intel.com>
> ---
>  MdeModulePkg/Include/Library/ResetSystemLib.h | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/MdeModulePkg/Include/Library/ResetSystemLib.h b/MdeModulePkg/Include/Library/ResetSystemLib.h
> index 3b2a098a60..e39e8c748c 100644
> --- a/MdeModulePkg/Include/Library/ResetSystemLib.h
> +++ b/MdeModulePkg/Include/Library/ResetSystemLib.h
> @@ -13,6 +13,15 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
>  #include <Uefi/UefiBaseType.h>
>  #include <Uefi/UefiMultiPhase.h>
>  
> +#pragma pack(1)
> +typedef struct {
> +  CHAR16      NullString;
> +  EFI_GUID    ResetGuid;
> +} RESET_DATA_WITH_NULL_STRING;
> +#pragma pack()
> +
> +VERIFY_SIZE_OF (RESET_DATA_WITH_NULL_STRING, 18);
> +
>  /**
>    This function causes a system-wide reset (cold reset), in which
>    all circuitry within the system returns to its initial state. This type of reset
> 

(1) Please insert a space character between "pack" and "(". (Two
instances in the patch.)

(2) Personally I think the structure is small and clear enough for it to
need no comments. The MdeModulePkg maintainers might still request some
light comments just above the structure.

With (1) updated, and regardless of (2):

Reviewed-by: Laszlo Ersek <lersek at redhat.com>

Thanks
Laszlo


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40186): https://edk2.groups.io/g/devel/message/40186
Mute This Topic: https://groups.io/mt/31540322/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