From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: zailiang.sun@intel.com) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by groups.io with SMTP; Sun, 14 Apr 2019 20:20:34 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Apr 2019 20:20:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,351,1549958400"; d="scan'208";a="291556445" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga004.jf.intel.com with ESMTP; 14 Apr 2019 20:20:33 -0700 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 14 Apr 2019 20:20:33 -0700 Received: from shsmsx107.ccr.corp.intel.com (10.239.4.96) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 14 Apr 2019 20:20:32 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.92]) by SHSMSX107.ccr.corp.intel.com ([169.254.9.153]) with mapi id 14.03.0415.000; Mon, 15 Apr 2019 11:20:30 +0800 From: "Sun, Zailiang" To: "devel@edk2.groups.io" , "Gao, Zhichao" CC: "Qian, Yi" , "Gao, Liming" Subject: Re: [edk2-devel] [PATCH 21/25] Vlv2TbltdevicePkg/ResetSystemLib: Add new API ResetSystem Thread-Topic: [edk2-devel] [PATCH 21/25] Vlv2TbltdevicePkg/ResetSystemLib: Add new API ResetSystem Thread-Index: AQHU8zhd5hCsw4iMVEiG1kMQm0PkUqY8jVog Date: Mon, 15 Apr 2019 03:20:30 +0000 Message-ID: <7CB7EF03E15B5D48981329A508747A9850C51B47@SHSMSX104.ccr.corp.intel.com> References: <20190415030611.12464-1-zhichao.gao@intel.com> <20190415030611.12464-22-zhichao.gao@intel.com> In-Reply-To: <20190415030611.12464-22-zhichao.gao@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: zailiang.sun@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Zailiang Sun > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > Gao, Zhichao > Sent: Monday, April 15, 2019 11:06 AM > To: devel@edk2.groups.io > Cc: Sun, Zailiang ; Qian, Yi = ; Gao, > Liming > Subject: [edk2-devel] [PATCH 21/25] Vlv2TbltdevicePkg/ResetSystemLib: > Add new API ResetSystem >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1460 >=20 > Add a new API ResetSystem to this ResetSystemLib instance. > It only adds the basic functions from ResetSystemRuntimeDxe. > Lacking of this interface may cause link error, if some drivers use this= new API > and link to this library instance. > Notes: > This library API only provide a basic function of reset. Full function s= hould use > the instance in the MdeModulePkg and make sure the depex driver is > dispatched. >=20 > Cc: Zailiang Sun > Cc: Yi Qian > Cc: Liming Gao > Signed-off-by: Zhichao Gao > --- > .../Library/ResetSystemLib/ResetSystemLib.c | 43 +++++++++++++++++++ > 1 file changed, 43 insertions(+) >=20 > diff --git a/Vlv2TbltDevicePkg/Library/ResetSystemLib/ResetSystemLib.c > b/Vlv2TbltDevicePkg/Library/ResetSystemLib/ResetSystemLib.c > index 1cd6f80891..02457352e9 100644 > --- a/Vlv2TbltDevicePkg/Library/ResetSystemLib/ResetSystemLib.c > +++ b/Vlv2TbltDevicePkg/Library/ResetSystemLib/ResetSystemLib.c > @@ -190,3 +190,46 @@ ResetPlatformSpecific ( { > ResetCold (); > } > + > +/** > + The ResetSystem function resets the entire platform. > + > + @param[in] ResetType The type of reset to perform. > + @param[in] ResetStatus The status code for the reset. > + @param[in] DataSize The size, in bytes, of ResetData. > + @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWa= rm, > or EfiResetShutdown > + the data buffer starts with a Null-terminat= ed string, optionally > + followed by additional binary data. The str= ing is a description > + that the caller may use to further indicate= the reason for the > + system reset. > +**/ > +VOID > +EFIAPI > +ResetSystem ( > + IN EFI_RESET_TYPE ResetType, > + IN EFI_STATUS ResetStatus, > + IN UINTN DataSize, > + IN VOID *ResetData OPTIONAL > + ) > +{ > + switch (ResetType) { > + case EfiResetWarm: > + ResetWarm (); > + break; > + > + case EfiResetCold: > + ResetCold (); > + break; > + > + case EfiResetShutdown: > + ResetShutdown (); > + return ; > + > + case EfiResetPlatformSpecific: > + ResetPlatformSpecific (DataSize, ResetData); > + return; > + > + default: > + return ; > + } > +} > -- > 2.21.0.windows.1 >=20 >=20 >=20