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.136, mailfrom: ray.ni@intel.com) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by groups.io with SMTP; Wed, 24 Apr 2019 23:23:02 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Apr 2019 23:23:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,392,1549958400"; d="scan'208";a="134210741" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga007.jf.intel.com with ESMTP; 24 Apr 2019 23:23:01 -0700 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 24 Apr 2019 23:23:01 -0700 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by FMSMSX157.amr.corp.intel.com (10.18.116.73) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 24 Apr 2019 23:23:00 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.92]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.147]) with mapi id 14.03.0415.000; Thu, 25 Apr 2019 14:22:59 +0800 From: "Ni, Ray" To: "Gao, Zhichao" CC: "devel@edk2.groups.io" Subject: Re: [edk2-devel] [PATCH 19/25] PcAtChipsetPkg/ResetSystemLib: Add new API ResetSystem Thread-Topic: [edk2-devel] [PATCH 19/25] PcAtChipsetPkg/ResetSystemLib: Add new API ResetSystem Thread-Index: AQHU+qLxd5/Ezy/PS06IEPTCn4LWX6ZMaT7w Date: Thu, 25 Apr 2019 06:22:58 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5C1023A5@SHSMSX104.ccr.corp.intel.com> References: <20190415030611.12464-1-zhichao.gao@intel.com> <159586F2D3C4CEE3.6441@groups.io> <3CE959C139B4C44DBEA1810E3AA6F9000B7C400F@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <3CE959C139B4C44DBEA1810E3AA6F9000B7C400F@SHSMSX101.ccr.corp.intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjFiZGY5NWYtM2JjMy00MjhjLTg2MGEtYWNiMzFmYmEyNDE5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiKytZVmtlV056SEQ1ZmJWTWVuRTNTQ1pyZ3Y2WmFPNTFXWHRXS3pXaFM3RzM0MVwvSVY5M2dFVXFcL0pHZ2ZleDNIIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: ray.ni@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ray Ni > > -----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: Ni, Ray ; Gao, Liming > > Subject: [edk2-devel] [PATCH 19/25] PcAtChipsetPkg/ResetSystemLib: Add > > new API ResetSystem > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1460 > > > > 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 > > should use the instance in the MdeModulePkg and make sure the depex > > driver is dispatched. > > > > Cc: Ray Ni > > Cc: Liming Gao > > Signed-off-by: Zhichao Gao > > --- > > .../Library/ResetSystemLib/ResetSystemLib.c | 43 ++++++++++++++++++= + > > 1 file changed, 43 insertions(+) > > > > diff --git a/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c > > b/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c > > index eccef89ebe..b215ebed61 100644 > > --- a/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c > > +++ b/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c > > @@ -99,3 +99,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, EfiReset= Warm, > > or EfiResetShutdown > > + the data buffer starts with a Null-termin= ated string, > optionally > > + followed by additional binary data. The s= tring is a > description > > + that the caller may use to further indica= te 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