From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=D85L2gV3; spf=pass (domain: linaro.org, ip: 209.85.128.68, mailfrom: leif.lindholm@linaro.org) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by groups.io with SMTP; Mon, 15 Apr 2019 02:51:33 -0700 Received: by mail-wm1-f68.google.com with SMTP id y197so7727966wmd.0 for ; Mon, 15 Apr 2019 02:51:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=sYEBRC+xcmPDTRkgZxzlmXWoeloq2Z9Ya1Qc8MX5j+4=; b=D85L2gV3f3pK3I+J6PXmA8ruBNscIuUY46FNd6KBzJMqyomL93/ixlpwXW+Izz4+l1 loHDmHSepP71cSUIcqiQAS6MdGVp9Q1M+B3Upi1wbJmvD1qN1N+Sey96VdTRd0m8AeU3 MiVmIjdi+rRxyJjIQMhMGlWpRquV1idle65U/v4EZn2lcz0cIdNNMiQw9164KUAQ+and 30xv4u+ZciQ2pSbv7Lwr1NBUpV5Q2RhcrAXttNrJb81zrWybyd1qktfL4XgM7onTQGR6 MxTl/rQ2arr3OnjNHFQm/blnjmSlSUvlTOdUkFWWz1EgmxFWVxvo3Cqe0Cr7QW8TX1eF rcKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=sYEBRC+xcmPDTRkgZxzlmXWoeloq2Z9Ya1Qc8MX5j+4=; b=Mu1bmmgTaXEpwpanjzwLd93fX72G1LflIqT+M11pHeSw5w9dZ/JCoCwS+bD1Fle6nh 09HKL/Kczwc4qcx2dAmAjVJgu4RPfx5y9rBgE+qaV1JLoWk4WmJz87/vAN2cDz0ry9Dk j3U4K9x1EJ0bvErHSzA7OfVl4i0OMTM8d/xQdK3ZCyRrDJo7C2mFRqUoj/T4dvgQ3KHw No7G85yg8nNu5kc0VyBbgYfSeEncsZfMwL2PYMpUrFWqSHLzE2RUmza2flnBHKXd8n0x ez5JKUBgZDsr6w/XVIRviQbfvm3ojRBFKygkF/l3Gzs6dDca2MX2rrVtC17edaLfrh30 Mtfg== X-Gm-Message-State: APjAAAXztP2tKvIWuFsTuFNIPzEf9jSCOMTCTDT8DWuji9R0ReitmnP/ DfDN8L/HmJr7PCGEgQPauN8SudoioEQ= X-Google-Smtp-Source: APXvYqyvbjMqzXKsUm/hU1q9DOwkl+NJdxbQuvWvI3Pu30gHyrV/R2S8VwCqZJfsG2et7Fu2Cu/83Q== X-Received: by 2002:a7b:ce84:: with SMTP id q4mr22061851wmj.41.1555321890956; Mon, 15 Apr 2019 02:51:30 -0700 (PDT) Return-Path: Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id 91sm6877883wra.86.2019.04.15.02.51.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 15 Apr 2019 02:51:30 -0700 (PDT) Date: Mon, 15 Apr 2019 10:51:28 +0100 From: "Leif Lindholm" To: devel@edk2.groups.io, zhichao.gao@intel.com Cc: Ard Biesheuvel , Liming Gao Subject: Re: [edk2-devel] [PATCH 15/25] BeagleBoardPkg/ResetSystemLib: Add new API ResetSystem Message-ID: <20190415095128.mwbh5nx4cirpveco@bivouac.eciton.net> References: <20190415030611.12464-1-zhichao.gao@intel.com> <20190415030611.12464-16-zhichao.gao@intel.com> MIME-Version: 1.0 In-Reply-To: <20190415030611.12464-16-zhichao.gao@intel.com> User-Agent: NeoMutt/20170113 (1.7.2) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Zhichao, Thanks for this. On Mon, Apr 15, 2019 at 11:06:01AM +0800, Gao, Zhichao wrote: > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460 > > 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: Leif Lindholm > Cc: Ard Biesheuvel > Cc: Liming Gao > Signed-off-by: Zhichao Gao > --- > .../Library/ResetSystemLib/ResetSystemLib.c | 43 +++++++++++++++++++ > 1 file changed, 43 insertions(+) > > diff --git a/BeagleBoardPkg/Library/ResetSystemLib/ResetSystemLib.c b/BeagleBoardPkg/Library/ResetSystemLib/ResetSystemLib.c > index 9fc572957f..e2a9d2469c 100644 > --- a/BeagleBoardPkg/Library/ResetSystemLib/ResetSystemLib.c > +++ b/BeagleBoardPkg/Library/ResetSystemLib/ResetSystemLib.c > @@ -103,3 +103,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, EfiResetWarm, or EfiResetShutdown > + the data buffer starts with a Null-terminated string, optionally > + followed by additional binary data. The string 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 ; Please drop the spurious space before ; > + > + case EfiResetPlatformSpecific: > + ResetPlatformSpecific (DataSize, ResetData); > + return; > + > + default: > + return ; Please drop the spurious space before ; (Unfortunately, this snippet has been copied around many places in many of the patches in this series - they should all be updated.) With that done: Reviewed-by: Leif Lindholm > + } > +} > -- > 2.21.0.windows.1 > > > >