From patchwork Tue Sep 2 22:56:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 36532 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f72.google.com (mail-oa0-f72.google.com [209.85.219.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 54EA320C87 for ; Tue, 2 Sep 2014 22:57:08 +0000 (UTC) Received: by mail-oa0-f72.google.com with SMTP id m1sf41702564oag.3 for ; Tue, 02 Sep 2014 15:57:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:reply-to:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=NnW6pkjfAC8PhLLYXzuJiShd5NP1n9qeVL7OScfUMps=; b=HtIxYVPG8eG4tPqaxoKE0LjgILiMmuvJV/EQ1u7Pb/V4RL3yLXTSYrPvukfz5X61aD 7J1XMdxc9e6SYcGHCVo8BaC+Y4asvVjtnH7vieDhnsuKo5Kfm7zUuPFQBjU0FVCLy1jo AtlYc8voX9PscvSgnM95V1E7QkUfA+5Ypk4lu4hC6g9LPoUn075sBAL+vwDFim6u61hJ WIbfe4TlsYEbsaTyB01xuI54XrQNZ2xnv5wm+LKgR66MnDjjlUp3JpExjqBeR0BJLMl+ HTovNZ7rm3lt+ke6lGd9LuCtNDa+ADt4cTnAF1pEPSOiRi/aHsjPaY6uoPnoBONG++UC t7Ag== X-Gm-Message-State: ALoCoQn+h/VTZdzZzG2K6ferLMda4GtCRQ6z4ExvmjtyRznZCdk7bboG5F3RbXia6NzNAZHRFSjU X-Received: by 10.182.142.5 with SMTP id rs5mr19647813obb.15.1409698627737; Tue, 02 Sep 2014 15:57:07 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.86.9 with SMTP id o9ls2701639qgd.47.gmail; Tue, 02 Sep 2014 15:57:07 -0700 (PDT) X-Received: by 10.220.96.137 with SMTP id h9mr2269354vcn.46.1409698627529; Tue, 02 Sep 2014 15:57:07 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id n2si2926063vcx.77.2014.09.02.15.57.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 02 Sep 2014 15:57:07 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id ij19so7911906vcb.17 for ; Tue, 02 Sep 2014 15:57:07 -0700 (PDT) X-Received: by 10.53.7.225 with SMTP id df1mr11867909vdd.9.1409698627438; Tue, 02 Sep 2014 15:57:07 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp596460vcb; Tue, 2 Sep 2014 15:57:07 -0700 (PDT) X-Received: by 10.50.85.74 with SMTP id f10mr32354611igz.4.1409698626868; Tue, 02 Sep 2014 15:57:06 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id jh7si9886493icc.93.2014.09.02.15.57.06 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 02 Sep 2014 15:57:06 -0700 (PDT) Received-SPF: pass (google.com: domain of edk2-devel-bounces@lists.sourceforge.net designates 216.34.181.88 as permitted sender) client-ip=216.34.181.88; Received: from localhost ([127.0.0.1] helo=sfs-ml-1.v29.ch3.sourceforge.com) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1XOx0T-0001CT-Sg; Tue, 02 Sep 2014 22:56:57 +0000 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1XOx0S-0001CA-7V for edk2-devel@lists.sourceforge.net; Tue, 02 Sep 2014 22:56:56 +0000 Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=lersek@redhat.com; helo=mx1.redhat.com; Received: from mx1.redhat.com ([209.132.183.28]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1XOx0R-0007Sz-An for edk2-devel@lists.sourceforge.net; Tue, 02 Sep 2014 22:56:56 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s82MunnB001308 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 2 Sep 2014 18:56:49 -0400 Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-55.ams2.redhat.com [10.36.116.55]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s82MueDY005138 for ; Tue, 2 Sep 2014 18:56:48 -0400 From: Laszlo Ersek To: edk2-devel@lists.sourceforge.net Date: Wed, 3 Sep 2014 00:56:35 +0200 Message-Id: <1409698598-9766-9-git-send-email-lersek@redhat.com> In-Reply-To: <1409698598-9766-1-git-send-email-lersek@redhat.com> References: <54063964.8060402@redhat.com> <1409698598-9766-1-git-send-email-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Spam-Score: -3.2 (---) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -1.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain X-Headers-End: 1XOx0R-0007Sz-An Subject: [edk2] [PATCH 09/12] OvmfPkg: ResetSystemLib: add constructor X-BeenThere: edk2-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list Reply-To: edk2-devel@lists.sourceforge.net List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.sourceforge.net X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lersek@redhat.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Calls to constructors of interdependent library instances are generated in the correct order only if all library instances in question have constructors. If some have no constructors, then the rest may see their constructors called out of order. Cycle detection also only works when all library instances have constructors. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- OvmfPkg/Library/ResetSystemLib/ResetSystemLib.inf | 4 +++- OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c | 10 ++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.inf b/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.inf index b6a3ffe..ab5838e 100644 --- a/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.inf +++ b/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.inf @@ -20,6 +20,8 @@ VERSION_STRING = 1.0 LIBRARY_CLASS = ResetSystemLib + CONSTRUCTOR = ResetSystemLibConstructor + # # The following information is for reference only and not required by the build tools. # @@ -39,4 +41,4 @@ TimerLib [Pcd] - gUefiOvmfPkgTokenSpaceGuid.PcdAcpiPmBaseAddress \ No newline at end of file + gUefiOvmfPkgTokenSpaceGuid.PcdAcpiPmBaseAddress diff --git a/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c b/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c index 6d149e8..2d177f7 100644 --- a/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c +++ b/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c @@ -106,3 +106,13 @@ EnterS3WithImmediateWake ( AcpiPmControl (1); ASSERT (FALSE); } + + +RETURN_STATUS +EFIAPI +ResetSystemLibConstructor ( + VOID + ) +{ + return RETURN_SUCCESS; +}