From patchwork Wed Sep 3 11:18:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 36583 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f200.google.com (mail-qc0-f200.google.com [209.85.216.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4C1AC202E4 for ; Wed, 3 Sep 2014 11:19:17 +0000 (UTC) Received: by mail-qc0-f200.google.com with SMTP id w7sf26074190qcr.7 for ; Wed, 03 Sep 2014 04:19:16 -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:cc: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=77pFlV2gM4WwNk0aC2gHGyHi+ZrES319rGQ5XiQ2V4g=; b=HXEuP47a6/z47QsHNBq+5/m+w8JLTBnoGY+bhdTYWl7WDw2+ozvow0evspCcz5I8wi MiBWQ14EP3m0TE2JX0jMnsfKdDtJxc/tVdP7XyvVtZA2Ij9pD9ptCSE+Wc2pZ2U05OaY 29d/TiLKKQc8AcOqQO4jpCpTDyc1ctCAlOmmyLsS/cBiZ0JcvGHg9O3cbAsmgkYncfFw qEYimVwPNRBrcMLR1ioB0SM97PVWS+ycRS08JmEfWY7NNymxRmv2hTUg4mOHxU1vSp2g g8sIioDAnvlAK6h3Bc8KtmHtLXHtwZaQ+Ywl9EwdTAUpt74s4o97kG0XGHT47/aVCvAO 1VYA== X-Gm-Message-State: ALoCoQnNuOuTSV7UQAx61ZTkahPLHMl7jTz8nYfEQQU7e0LmkTMzXgEBlurub+zKEEQeml7/f2GN X-Received: by 10.224.124.195 with SMTP id v3mr573073qar.4.1409743156753; Wed, 03 Sep 2014 04:19:16 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.50.225 with SMTP id s88ls1637033qga.59.gmail; Wed, 03 Sep 2014 04:19:16 -0700 (PDT) X-Received: by 10.220.105.142 with SMTP id t14mr234177vco.14.1409743156636; Wed, 03 Sep 2014 04:19:16 -0700 (PDT) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id 9si3442728vcq.96.2014.09.03.04.19.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Sep 2014 04:19:16 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.173 as permitted sender) client-ip=209.85.220.173; Received: by mail-vc0-f173.google.com with SMTP id im17so8602072vcb.32 for ; Wed, 03 Sep 2014 04:19:16 -0700 (PDT) X-Received: by 10.52.3.40 with SMTP id 8mr29141728vdz.24.1409743156529; Wed, 03 Sep 2014 04:19:16 -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 uj3csp664003vcb; Wed, 3 Sep 2014 04:19:16 -0700 (PDT) X-Received: by 10.43.70.205 with SMTP id yh13mr38299098icb.44.1409743154747; Wed, 03 Sep 2014 04:19:14 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id e1si1665383igg.41.2014.09.03.04.19.14 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 03 Sep 2014 04:19:14 -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 ) id 1XP8ah-0004JL-6y; Wed, 03 Sep 2014 11:19:07 +0000 Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1XP8af-0004JB-TO for edk2-devel@lists.sourceforge.net; Wed, 03 Sep 2014 11:19:05 +0000 Received-SPF: pass (sog-mx-1.v43.ch3.sourceforge.com: domain of linaro.org designates 74.125.82.42 as permitted sender) client-ip=74.125.82.42; envelope-from=ard.biesheuvel@linaro.org; helo=mail-wg0-f42.google.com; Received: from mail-wg0-f42.google.com ([74.125.82.42]) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1XP8ae-0007as-OS for edk2-devel@lists.sourceforge.net; Wed, 03 Sep 2014 11:19:05 +0000 Received: by mail-wg0-f42.google.com with SMTP id b13so8289822wgh.25 for ; Wed, 03 Sep 2014 04:18:58 -0700 (PDT) X-Received: by 10.180.77.193 with SMTP id u1mr34838135wiw.45.1409743138541; Wed, 03 Sep 2014 04:18:58 -0700 (PDT) Received: from ards-macbook-pro.local (cag06-7-83-153-85-71.fbx.proxad.net. [83.153.85.71]) by mx.google.com with ESMTPSA id p1sm15258661wjy.22.2014.09.03.04.18.56 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Sep 2014 04:18:57 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.sourceforge.net, lersek@redhat.com, olivier.martin@arm.com Date: Wed, 3 Sep 2014 13:18:13 +0200 Message-Id: <1409743096-14919-21-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1409743096-14919-1-git-send-email-ard.biesheuvel@linaro.org> References: <1409743096-14919-1-git-send-email-ard.biesheuvel@linaro.org> X-Spam-Score: -1.5 (-) 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_PASS SPF: sender matches SPF record X-Headers-End: 1XP8ae-0007as-OS Cc: peter.maydell@linaro.org, christoffer.dall@linaro.org, ilias.biris@linaro.org Subject: [edk2] [PATCH v6 20/23] ArmVirtualizationPkg: add ArmVirtualizationPlatformSysConfigLib library 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: ard.biesheuvel@linaro.org 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.173 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 This introduces an implementation of ArmPlatformSysConfigLib for virtual machines. This is currently a stub, but some peripheral drivers (such as the PL031 RTC driver) rely on one to be available. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Casadevall Acked-by: Laszlo Ersek Signed-off-by: Ard Biesheuvel --- Trivial changes only .../ArmVirtualizationPlatformSysConfigLib.c | 87 ++++++++++++++++++++++ .../ArmVirtualizationPlatformSysConfigLib.inf | 31 ++++++++ 2 files changed, 118 insertions(+) create mode 100644 ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformSysConfigLib/ArmVirtualizationPlatformSysConfigLib.c create mode 100644 ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformSysConfigLib/ArmVirtualizationPlatformSysConfigLib.inf diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformSysConfigLib/ArmVirtualizationPlatformSysConfigLib.c b/ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformSysConfigLib/ArmVirtualizationPlatformSysConfigLib.c new file mode 100644 index 000000000000..0aa173d79834 --- /dev/null +++ b/ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformSysConfigLib/ArmVirtualizationPlatformSysConfigLib.c @@ -0,0 +1,87 @@ +/** @file + + Copyright (c) 2011-2012, ARM Ltd. All rights reserved.
+ Copyright (c) 2014, Linaro Ltd. All rights reserved.
+ + This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +#include + +#include + + +RETURN_STATUS +ArmPlatformSysConfigInitialize ( + VOID + ) +{ + return RETURN_SUCCESS; +} + +/*************************************** + * GENERAL FUNCTION: AccessSysCfgRegister + * Interacts with + * SYS_CFGSTAT + * SYS_CFGDATA + * SYS_CFGCTRL + * for setting and for reading out values + ***************************************/ + +RETURN_STATUS +AccessSysCfgRegister ( + IN UINT32 ReadWrite, + IN UINT32 Function, + IN UINT32 Site, + IN UINT32 Position, + IN UINT32 Device, + IN OUT UINT32* Data + ) +{ + return RETURN_UNSUPPORTED; +} + +RETURN_STATUS +ArmPlatformSysConfigGet ( + IN SYS_CONFIG_FUNCTION Function, + OUT UINT32* Value + ) +{ + return RETURN_UNSUPPORTED; +} + +RETURN_STATUS +ArmPlatformSysConfigGetValues ( + IN SYS_CONFIG_FUNCTION Function, + IN UINTN Size, + OUT UINT32* Values + ) +{ + return RETURN_UNSUPPORTED; +} + +RETURN_STATUS +ArmPlatformSysConfigSet ( + IN SYS_CONFIG_FUNCTION Function, + IN UINT32 Value + ) +{ + return RETURN_UNSUPPORTED; +} + +RETURN_STATUS +ArmPlatformSysConfigSetDevice ( + IN SYS_CONFIG_FUNCTION Function, + IN UINT32 Device, + IN UINT32 Value + ) +{ + return RETURN_UNSUPPORTED; +} diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformSysConfigLib/ArmVirtualizationPlatformSysConfigLib.inf b/ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformSysConfigLib/ArmVirtualizationPlatformSysConfigLib.inf new file mode 100644 index 000000000000..2c723077e117 --- /dev/null +++ b/ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformSysConfigLib/ArmVirtualizationPlatformSysConfigLib.inf @@ -0,0 +1,31 @@ +#/** @file +# +# Component description file for ArmVirtualizationPlatformSysConfigLib module +# +# Copyright (c) 2011-2012, ARM Ltd. All rights reserved.
+# Copyright (c) 2014, Linaro Ltd. All rights reserved.
+# +# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +#**/ + +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = ArmVirtualizationPlatformSysConfigLib + FILE_GUID = b5988e68-a2cc-49ac-9ca8-8cc78420ae45 + MODULE_TYPE = BASE + VERSION_STRING = 1.0 + LIBRARY_CLASS = ArmPlatformSysConfigLib + +[Sources.common] + ArmVirtualizationPlatformSysConfigLib.c + +[Packages] + MdePkg/MdePkg.dec + ArmPlatformPkg/ArmPlatformPkg.dec