From patchwork Thu Feb 5 10:28:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 44423 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E525221521 for ; Thu, 5 Feb 2015 10:29:35 +0000 (UTC) Received: by mail-wi0-f197.google.com with SMTP id n3sf5731768wiv.0 for ; Thu, 05 Feb 2015 02:29:35 -0800 (PST) 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 :content-type:content-transfer-encoding:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=15nRNdKFm+tT6jEbWE4WR6gwQ5yrfQ1wysE/9wiQYyk=; b=Xl2lf1tZj0mjBckrPxP2eF1EmPAPSFXv38wEx2EsmXskXix75WMJcxh3oXYRiXzNHh Sg1IotX8z6AQDw8jWrJv2fMfdvQhjzbolJK0BLz5mSTWIqisSL86GEYUxRM/ESjAYqtP +irUzT9xp6jt01/5oKJUFHn4bpVkh31EfEkmfmuW2QUkn0pTAhJa7j7CzA1P+t/9Nxh8 YyqxRZqAg9AQjYMev9wKiY3rVImqj1KsguhMhgJHx4jQOwLHX0dE6UsJmbBICuoCnQ15 VEWpBMd2urxRJ0Obt2i8o7E/QE1Xu4Rm59Ivvv64sWhY0cGh5WEUXbfCdvqXQ5cthx7q ho3w== X-Gm-Message-State: ALoCoQk5AQxY6hpx+lo/c7tL4COIsuB4nW3qEj4oKNjljJgrpUU0iJgUcmU7swlGEhG3NuW7Qj8u X-Received: by 10.180.88.66 with SMTP id be2mr3345687wib.1.1423132175181; Thu, 05 Feb 2015 02:29:35 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.170.193 with SMTP id ao1ls156671lac.20.gmail; Thu, 05 Feb 2015 02:29:34 -0800 (PST) X-Received: by 10.112.199.162 with SMTP id jl2mr2647535lbc.48.1423132174910; Thu, 05 Feb 2015 02:29:34 -0800 (PST) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id y3si3595155lad.54.2015.02.05.02.29.34 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Feb 2015 02:29:34 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by mail-la0-f43.google.com with SMTP id pn19so6440801lab.2 for ; Thu, 05 Feb 2015 02:29:34 -0800 (PST) X-Received: by 10.112.140.74 with SMTP id re10mr2598575lbb.80.1423132174735; Thu, 05 Feb 2015 02:29:34 -0800 (PST) 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.112.35.133 with SMTP id h5csp1049519lbj; Thu, 5 Feb 2015 02:29:33 -0800 (PST) X-Received: by 10.107.129.32 with SMTP id c32mr3314327iod.60.1423132169913; Thu, 05 Feb 2015 02:29:29 -0800 (PST) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id v4si3627846igk.34.2015.02.05.02.29.29 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 05 Feb 2015 02:29:29 -0800 (PST) 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 1YJJgX-0003NI-1B; Thu, 05 Feb 2015 10:29:21 +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 1YJJgV-0003N7-AE for edk2-devel@lists.sourceforge.net; Thu, 05 Feb 2015 10:29:19 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of linaro.org designates 74.125.82.43 as permitted sender) client-ip=74.125.82.43; envelope-from=ard.biesheuvel@linaro.org; helo=mail-wg0-f43.google.com; Received: from mail-wg0-f43.google.com ([74.125.82.43]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1YJJgU-0000dN-Bs for edk2-devel@lists.sourceforge.net; Thu, 05 Feb 2015 10:29:19 +0000 Received: by mail-wg0-f43.google.com with SMTP id y19so6772749wgg.2 for ; Thu, 05 Feb 2015 02:29:12 -0800 (PST) X-Received: by 10.180.182.72 with SMTP id ec8mr13937628wic.53.1423132152319; Thu, 05 Feb 2015 02:29:12 -0800 (PST) Received: from ards-macbook-pro.local (205.28.43.5.rev.vodafone.pt. [5.43.28.205]) by mx.google.com with ESMTPSA id x6sm6706609wjf.24.2015.02.05.02.29.09 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 05 Feb 2015 02:29:10 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.sourceforge.net, lersek@redhat.com, olivier.martin@arm.com, roy.franz@linaro.org, leif.lindholm@linaro.org Date: Thu, 5 Feb 2015 10:28:55 +0000 Message-Id: <1423132136-19349-4-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1423132136-19349-1-git-send-email-ard.biesheuvel@linaro.org> References: <1423132136-19349-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 -0.0 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1YJJgU-0000dN-Bs Subject: [edk2] [PATCH 3/4] ArmVirtualizationPkg: record GIC revision in dynamic PCD 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.215.43 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 In order to allow a ArmGicArchLib to be implemented that returns the supported GIC revision based on the device tree, add handling to VirtFdtDxe to record the GIC revision at DT parsing time. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationPkg.dec | 5 +++++ ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc | 1 + ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.c | 2 ++ ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.inf | 1 + 4 files changed, 9 insertions(+) diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationPkg.dec b/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationPkg.dec index 4ebfcddfa595..7d9b8dac124b 100644 --- a/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationPkg.dec +++ b/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationPkg.dec @@ -60,3 +60,8 @@ gArmVirtualizationTokenSpaceGuid.PcdFwCfgSelectorAddress|0x0|UINT64|0x00000004 gArmVirtualizationTokenSpaceGuid.PcdFwCfgDataAddress|0x0|UINT64|0x00000005 + + # + # Supported GIC revision (2, 3, ...) + # + gArmVirtualizationTokenSpaceGuid.PcdArmGicRevision|0x0|UINT32|0x00000006 diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc b/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc index 4f447b8e1da4..73b02ff6e53a 100644 --- a/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc +++ b/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc @@ -171,6 +171,7 @@ gArmTokenSpaceGuid.PcdGicDistributorBase|0x0 gArmTokenSpaceGuid.PcdGicRedistributorBase|0x0 gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x0 + gArmVirtualizationTokenSpaceGuid.PcdArmGicRevision|0x0 ## PL031 RealTimeClock gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0 diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.c b/ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.c index 0064b5e50171..198743a3eaca 100644 --- a/ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.c +++ b/ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.c @@ -263,6 +263,7 @@ InitializeVirtFdtDxe ( PcdSet32 (PcdGicDistributorBase, (UINT32)DistBase); PcdSet32 (PcdGicInterruptInterfaceBase, (UINT32)CpuBase); + PcdSet32 (PcdArmGicRevision, 2); DEBUG ((EFI_D_INFO, "Found GIC @ 0x%Lx/0x%Lx\n", DistBase, CpuBase)); break; @@ -289,6 +290,7 @@ InitializeVirtFdtDxe ( PcdSet32 (PcdGicDistributorBase, (UINT32)DistBase); PcdSet32 (PcdGicRedistributorBase, (UINT32)RedistBase); + PcdSet32 (PcdArmGicRevision, 3); DEBUG ((EFI_D_INFO, "Found GIC v3 (re)distributor @ 0x%Lx (0x%Lx)\n", DistBase, RedistBase)); diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.inf b/ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.inf index 65eaef693d63..020e825e3d87 100644 --- a/ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.inf +++ b/ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.inf @@ -52,6 +52,7 @@ gArmVirtualizationTokenSpaceGuid.PcdArmPsciMethod gArmVirtualizationTokenSpaceGuid.PcdFwCfgSelectorAddress gArmVirtualizationTokenSpaceGuid.PcdFwCfgDataAddress + gArmVirtualizationTokenSpaceGuid.PcdArmGicRevision gArmTokenSpaceGuid.PcdGicDistributorBase gArmTokenSpaceGuid.PcdGicRedistributorBase gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase