From patchwork Wed Apr 13 08:10:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 65691 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp2366018qge; Wed, 13 Apr 2016 01:10:28 -0700 (PDT) X-Received: by 10.66.122.100 with SMTP id lr4mr10620531pab.99.1460535028801; Wed, 13 Apr 2016 01:10:28 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id b90si2463931pfd.128.2016.04.13.01.10.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Apr 2016 01:10:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 5491D1A1FBF; Wed, 13 Apr 2016 01:10:28 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 058631A1FB4 for ; Wed, 13 Apr 2016 01:10:26 -0700 (PDT) Received: by mail-wm0-x22f.google.com with SMTP id u206so62314927wme.1 for ; Wed, 13 Apr 2016 01:10:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=7qkfQBuySj/ia5nnM25PgDrrh9r1RKPypEkEAfYdmQU=; b=iXB+aZyWLf80IBygUiLGytyoNwxENZTkMQ6I3ZTaNi30jLGTfbNt9CpS6e7e6untYD LjHHWa9KEaZ5TUQ/V8AokY1rdKbsMTwerw4K1tqicYctck4vDTpGpAvK0Dcazn/Vh7Zx /ZfoFCqC99XMNKXdq/FUF49mbcTQf2lGZLnVI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=7qkfQBuySj/ia5nnM25PgDrrh9r1RKPypEkEAfYdmQU=; b=BJQs+iR1U8Fo9EyrMtFfshZDQZ/C1Bv9iXvwTNHijEVgXhaNt3nl5EbgK6MZPpF3kj nmDGwihzGsiX3AuhIBz6P401FHba8mriHrjsJ8ONSzjkVTdGN/NxbbjilXcIhpNXeHgF QgEZmgPDCAH+Iid27KwMVVnjbIJzN+wvYg92k4ATOrJCQKmcV8l84zYvVDmcSeo+WfO3 dZe7178UAGvU0rosSNIH0SnYBFSMbJDOYHcsZIhJrT1uSri2R8uqqEFFRo7246FolSGO BAxudozhGTy9kBKSRDDaXi3x8z8nehryl5SRFS7Q82ZwaHK014hcX83R1ova/rWzsS02 STzQ== X-Gm-Message-State: AOPr4FVhJxjiRA8JKOZjJq2/1VEw5NfTpAUdv/o1ckczN6AGAKc3hYQk9vK4YTXIzEqgEov9 X-Received: by 10.194.22.97 with SMTP id c1mr8335903wjf.19.1460535024676; Wed, 13 Apr 2016 01:10:24 -0700 (PDT) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id s10sm34475702wjp.3.2016.04.13.01.10.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Apr 2016 01:10:23 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org Date: Wed, 13 Apr 2016 10:10:19 +0200 Message-Id: <1460535020-3044-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 Subject: [edk2] [PATCH 1/2] ArmPlatformPkg/PL031RealTimeClockLib: don't clobber gRT table X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" PL031RealTimeClockLib is a base library that could potentially (although unlikely) be incorporated into other modules than the DXE_RUNTIME_DRIVER module that it was intended to complement. This means the library has no business whatsoever setting the Runtime Service table pointers directly (since we have no way of knowing which instance will 'win', and the pointers may end up referring to a module that is not a DXE_RUNTIME_DRIVER). So remove the assignment altogether. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c | 6 ------ 1 file changed, 6 deletions(-) -- 2.5.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Leif Lindholm diff --git a/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c index 52ba48992b83..516b45675c69 100644 --- a/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c +++ b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c @@ -650,12 +650,6 @@ LibRtcInitialize ( return Status; } - // Setup the setters and getters - gRT->GetTime = LibGetTime; - gRT->SetTime = LibSetTime; - gRT->GetWakeupTime = LibGetWakeupTime; - gRT->SetWakeupTime = LibSetWakeupTime; - mRT = gRT; // Install the protocol