Message ID | 1409698598-9766-11-git-send-email-lersek@redhat.com |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBCYMNM6GTEARBRUWTGQAKGQEISVGDNI@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f70.google.com (mail-yh0-f70.google.com [209.85.213.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9C2F820C87 for <linaro@patches.linaro.org>; Tue, 2 Sep 2014 22:57:10 +0000 (UTC) Received: by mail-yh0-f70.google.com with SMTP id b6sf27518682yha.5 for <linaro@patches.linaro.org>; Tue, 02 Sep 2014 15:57:10 -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=rdraGNLSqFubaydwEl9djn6pYKReEeIcFerfRPyLw0c=; b=L4CLgUiiZJqd4JvfRegsdatI26lPPWCo/cLMb77yRU+ufelebKpN+PsCuADbjHeoHe /k3GSP5ATy1d4MKOQbun6yJxSCuCddfvBoLZjY7fxu3rFu1wVlQV2jl3VMDqSQILNsr9 ZG2JmSZFUY2c4oB6aMGfzvkwtqx3ZtpgyWizXH4pcLqfN8EUzPqW4V1VRAElsJoNIr1k 9ijTcawNFxI/ThHoM0XfhOIDEYanX5SlZCVCKh87g1mejqCQKfr0+jJHQcGgtxpSOmzi ZCEY6yZvvBWVDkZ4fQzMokp0FFCBytizFfckObKnpqLEdgUDnvUhIoABxwHFkqMrD6be vDbQ== X-Gm-Message-State: ALoCoQlj+8azQi9rhpK7a9F49t7iNmh4CaPU0LEAb3lxyHPpIfxZpRU6rC7kVfGVNZA3Dk2SCGLF X-Received: by 10.236.11.80 with SMTP id 56mr10949352yhw.22.1409698630461; Tue, 02 Sep 2014 15:57:10 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.51.51 with SMTP id t48ls2658025qga.67.gmail; Tue, 02 Sep 2014 15:57:10 -0700 (PDT) X-Received: by 10.53.0.164 with SMTP id az4mr1871541vdd.52.1409698630361; Tue, 02 Sep 2014 15:57:10 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id e14si2934788vcv.56.2014.09.02.15.57.10 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 02 Sep 2014 15:57:10 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.175 as permitted sender) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id lf12so7883512vcb.34 for <patchwork-forward@linaro.org>; Tue, 02 Sep 2014 15:57:10 -0700 (PDT) X-Received: by 10.220.44.136 with SMTP id a8mr2350017vcf.42.1409698630287; Tue, 02 Sep 2014 15:57:10 -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 uj3csp596466vcb; Tue, 2 Sep 2014 15:57:09 -0700 (PDT) X-Received: by 10.50.43.164 with SMTP id x4mr32173798igl.27.1409698629331; Tue, 02 Sep 2014 15:57:09 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id g6si9927578ice.53.2014.09.02.15.57.08 for <multiple recipients> (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 02 Sep 2014 15:57:09 -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-2.v29.ch3.sourceforge.com) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from <edk2-devel-bounces@lists.sourceforge.net>) id 1XOx0X-0003bL-8m; Tue, 02 Sep 2014 22:57:01 +0000 Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from <lersek@redhat.com>) id 1XOx0U-0003b5-A6 for edk2-devel@lists.sourceforge.net; Tue, 02 Sep 2014 22:56:58 +0000 Received-SPF: pass (sog-mx-3.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-3.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1XOx0T-0004z2-Ce for edk2-devel@lists.sourceforge.net; Tue, 02 Sep 2014 22:56:58 +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 s82MupQf001312 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for <edk2-devel@lists.sourceforge.net>; Tue, 2 Sep 2014 18:56:51 -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 s82MueDa005138 for <edk2-devel@lists.sourceforge.net>; Tue, 2 Sep 2014 18:56:50 -0400 From: Laszlo Ersek <lersek@redhat.com> To: edk2-devel@lists.sourceforge.net Date: Wed, 3 Sep 2014 00:56:37 +0200 Message-Id: <1409698598-9766-11-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: 1XOx0T-0004z2-Ce Subject: [edk2] [PATCH 11/12] OvmfPkg: VirtioLib: 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: <patchwork-forward.linaro.org> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/edk2-devel>, <mailto:edk2-devel-request@lists.sourceforge.net?subject=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.175 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
diff --git a/OvmfPkg/Library/VirtioLib/VirtioLib.inf b/OvmfPkg/Library/VirtioLib/VirtioLib.inf index fb5897a..10a9d6c 100644 --- a/OvmfPkg/Library/VirtioLib/VirtioLib.inf +++ b/OvmfPkg/Library/VirtioLib/VirtioLib.inf @@ -21,6 +21,8 @@ VERSION_STRING = 1.0 LIBRARY_CLASS = VirtioLib + CONSTRUCTOR = VirtioLibConstructor + [Sources] VirtioLib.c diff --git a/OvmfPkg/Library/VirtioLib/VirtioLib.c b/OvmfPkg/Library/VirtioLib/VirtioLib.c index 54cf225..e471633 100644 --- a/OvmfPkg/Library/VirtioLib/VirtioLib.c +++ b/OvmfPkg/Library/VirtioLib/VirtioLib.c @@ -317,3 +317,14 @@ VirtioFlush ( MemoryFence(); return EFI_SUCCESS; } + + +EFI_STATUS +EFIAPI +VirtioLibConstructor ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + return EFI_SUCCESS; +}
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 <lersek@redhat.com> --- OvmfPkg/Library/VirtioLib/VirtioLib.inf | 2 ++ OvmfPkg/Library/VirtioLib/VirtioLib.c | 11 +++++++++++ 2 files changed, 13 insertions(+)