From patchwork Fri Sep 5 11:56:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 36834 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qg0-f70.google.com (mail-qg0-f70.google.com [209.85.192.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 025B520D9F for ; Fri, 5 Sep 2014 11:57:46 +0000 (UTC) Received: by mail-qg0-f70.google.com with SMTP id i50sf34136857qgf.5 for ; Fri, 05 Sep 2014 04:57:46 -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=VHFjHfL+/77qZKE8G+AkPxl3jvsDF2MgxNTgSdUGNes=; b=FY54pr6g9q9PyZ2Y8uiMZzBYjq0EDX9wZwg8/qFNde2fCVI1KDhB0JWH5dhqRXQPKK GD+e8LXJyhdsf7tGpeh6uPKoAXpcwuGkb/Pfc3CGMiniGmQWnVLauAGvcCf74yDi1hjH kf44tsm29b5rz6CG6E6AaXwj34xHRJm0z5fKjO0C9gxwx/QnH8DCZJGbQD3t22y0Tq8f KnHFX75coQubqDNkuV6gU+Lj6Kl6ZKp6RqmAhxHtALWwfrGXj/Ipx+19fy/SjWY1iX4E cfu39CA1e84LZQtbamVQaS5/Kwjyus5S56i7pOV1A+8erolgj7NdhWd/q6kg650mBo8z FeaQ== X-Gm-Message-State: ALoCoQmGgPeoFid+xsUm42gJakmKdNUN9uv0bAx9/w4mJgV7uOgcQ2rfRd2kDbegnjsg8B3N8tGJ X-Received: by 10.236.216.67 with SMTP id f63mr6496362yhp.10.1409918266850; Fri, 05 Sep 2014 04:57:46 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.82.75 with SMTP id g69ls142895qgd.53.gmail; Fri, 05 Sep 2014 04:57:46 -0700 (PDT) X-Received: by 10.220.163.69 with SMTP id z5mr9843891vcx.10.1409918266721; Fri, 05 Sep 2014 04:57:46 -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 u19si365173vcr.36.2014.09.05.04.57.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 05 Sep 2014 04:57:46 -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 im17so12216946vcb.32 for ; Fri, 05 Sep 2014 04:57:46 -0700 (PDT) X-Received: by 10.52.164.199 with SMTP id ys7mr627153vdb.42.1409918266646; Fri, 05 Sep 2014 04:57:46 -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 uj3csp71104vcb; Fri, 5 Sep 2014 04:57:46 -0700 (PDT) X-Received: by 10.50.57.68 with SMTP id g4mr3843705igq.48.1409918265678; Fri, 05 Sep 2014 04:57:45 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id mo16si2838131icb.35.2014.09.05.04.57.45 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 05 Sep 2014 04:57:45 -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-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1XPs93-0005j0-IS; Fri, 05 Sep 2014 11:57:37 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1XPs92-0005ic-Bp for edk2-devel@lists.sourceforge.net; Fri, 05 Sep 2014 11:57:36 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of linaro.org designates 74.125.82.178 as permitted sender) client-ip=74.125.82.178; envelope-from=ard.biesheuvel@linaro.org; helo=mail-we0-f178.google.com; Received: from mail-we0-f178.google.com ([74.125.82.178]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1XPs90-0002z8-VJ for edk2-devel@lists.sourceforge.net; Fri, 05 Sep 2014 11:57:36 +0000 Received: by mail-we0-f178.google.com with SMTP id q58so181286wes.23 for ; Fri, 05 Sep 2014 04:57:28 -0700 (PDT) X-Received: by 10.194.87.41 with SMTP id u9mr14042853wjz.124.1409918248466; Fri, 05 Sep 2014 04:57:28 -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 dc9sm1758798wib.5.2014.09.05.04.57.27 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 05 Sep 2014 04:57:27 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.sourceforge.net, lersek@redhat.com, olivier.martin@arm.com Date: Fri, 5 Sep 2014 13:56:51 +0200 Message-Id: <1409918214-29584-22-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1409918214-29584-1-git-send-email-ard.biesheuvel@linaro.org> References: <1409918214-29584-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: 1XPs90-0002z8-VJ Cc: peter.maydell@linaro.org, christoffer.dall@linaro.org, ilias.biris@linaro.org Subject: [edk2] [PATCH v7 21/24] 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 --- .../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