From patchwork Fri May 29 12:33:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 49171 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 60CE7218EC for ; Fri, 29 May 2015 12:34:30 +0000 (UTC) Received: by wgez8 with SMTP id z8sf17894918wge.2 for ; Fri, 29 May 2015 05:34:29 -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 :content-type:content-transfer-encoding:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=mXCkwr/BfaLJDJQ0ztM/DLpjGFN4mYT3eJ5XyfozhCA=; b=Nvx2MxRGBnj0K0tSlr7BjY42ZHSRmgUBLAgTJA6OmaDNzMjg01R8vfgXaFABRxqZI+ CZXTo6Q1CvUjXlLnpk7rbfB2mb4/aq4RSayfInc8D2yWiCc6jvXL/n5mBfHgnNM2ey8f SBoROP8Q48pifCv/IrEKb1FhTqUzeP5mXNkXQIf/7pUz+VIroe+BHlcq7BHJm1pCnqFL ypvJdY8fJAjktcD7mdOf4ZLx0aQcDj3Cn3xR08dyRIjxtfgspm2SK5YhB7Eaxg4l3wvB fJuZymmCpnlIBAJx6HWPNf2BehYBL9CBg28ACt45q9MWiKRY1eEE8b0pGafT8z+5i81P p20g== X-Gm-Message-State: ALoCoQn1IGS195BtwZJaOLsqoYZWBhhoeWZg/707qukiXKU5bRIbsqF3vTXqxA2I5Ls5QBw157SG X-Received: by 10.180.105.226 with SMTP id gp2mr2759400wib.1.1432902869419; Fri, 29 May 2015 05:34:29 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.88.68 with SMTP id be4ls285137lab.47.gmail; Fri, 29 May 2015 05:34:29 -0700 (PDT) X-Received: by 10.112.105.104 with SMTP id gl8mr7847300lbb.81.1432902869187; Fri, 29 May 2015 05:34:29 -0700 (PDT) Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com. [209.85.217.171]) by mx.google.com with ESMTPS id ay7si631855lbc.60.2015.05.29.05.34.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 May 2015 05:34:29 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) client-ip=209.85.217.171; Received: by lbcmx3 with SMTP id mx3so47491252lbc.1 for ; Fri, 29 May 2015 05:34:29 -0700 (PDT) X-Received: by 10.152.44.166 with SMTP id f6mr7779700lam.86.1432902869084; Fri, 29 May 2015 05:34:29 -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.112.108.230 with SMTP id hn6csp290936lbb; Fri, 29 May 2015 05:34:27 -0700 (PDT) X-Received: by 10.43.12.136 with SMTP id pi8mr14770997icb.6.1432902861810; Fri, 29 May 2015 05:34:21 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id dx9si4671672icc.75.2015.05.29.05.34.21 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 29 May 2015 05:34:21 -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-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YyJUI-0005DQ-Cb; Fri, 29 May 2015 12:34:10 +0000 Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YyJUH-0005DJ-VN for edk2-devel@lists.sourceforge.net; Fri, 29 May 2015 12:34:09 +0000 Received-SPF: pass (sog-mx-3.v43.ch3.sourceforge.com: domain of linaro.org designates 209.85.212.176 as permitted sender) client-ip=209.85.212.176; envelope-from=ard.biesheuvel@linaro.org; helo=mail-wi0-f176.google.com; Received: from mail-wi0-f176.google.com ([209.85.212.176]) by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1YyJUC-0007mH-BS for edk2-devel@lists.sourceforge.net; Fri, 29 May 2015 12:34:09 +0000 Received: by wicmx19 with SMTP id mx19so16196260wic.0 for ; Fri, 29 May 2015 05:33:58 -0700 (PDT) X-Received: by 10.194.22.131 with SMTP id d3mr4889060wjf.111.1432902838335; Fri, 29 May 2015 05:33:58 -0700 (PDT) Received: from localhost.localdomain ([109.112.79.182]) by mx.google.com with ESMTPSA id ex5sm2953226wib.2.2015.05.29.05.33.56 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 May 2015 05:33:57 -0700 (PDT) From: Ard Biesheuvel To: lersek@redhat.com, olivier.martin@arm.com, leif.lindholm@linaro.org, edk2-devel@lists.sourceforge.net Date: Fri, 29 May 2015 14:33:39 +0200 Message-Id: <1432902820-18721-7-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1432902820-18721-1-git-send-email-ard.biesheuvel@linaro.org> References: <1432902820-18721-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: 1YyJUC-0007mH-BS Subject: [edk2] [PATCH 6/7] ArmVirtPkg: 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.217.171 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 --- ArmVirtPkg/ArmVirtPkg.dec | 7 ++++++- ArmVirtPkg/ArmVirtQemu.dsc | 1 + ArmVirtPkg/ArmVirtXen.dsc | 1 + ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c | 2 ++ ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf | 1 + 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ArmVirtPkg/ArmVirtPkg.dec b/ArmVirtPkg/ArmVirtPkg.dec index 7bbd9fff570e..bf8de4db97be 100644 --- a/ArmVirtPkg/ArmVirtPkg.dec +++ b/ArmVirtPkg/ArmVirtPkg.dec @@ -61,6 +61,11 @@ gArmVirtTokenSpaceGuid.PcdFwCfgSelectorAddress|0x0|UINT64|0x00000004 gArmVirtTokenSpaceGuid.PcdFwCfgDataAddress|0x0|UINT64|0x00000005 + # + # Supported GIC revision (2, 3, ...) + # + gArmVirtTokenSpaceGuid.PcdArmGicRevision|0x0|UINT32|0x00000006 + [PcdsFeatureFlag] # # "Map PCI MMIO as Cached" @@ -84,4 +89,4 @@ # # The default is to turn off the kludge; DSC's can selectively enable it. # - gArmVirtTokenSpaceGuid.PcdKludgeMapPciMmioAsCached|FALSE|BOOLEAN|0x00000006 + gArmVirtTokenSpaceGuid.PcdKludgeMapPciMmioAsCached|FALSE|BOOLEAN|0x00000007 diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index 374cf7a9ee02..592f07ee6d38 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -192,6 +192,7 @@ gArmTokenSpaceGuid.PcdGicDistributorBase|0x0 gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x0 gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x0 + gArmVirtTokenSpaceGuid.PcdArmGicRevision|0x0 ## PL031 RealTimeClock gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0 diff --git a/ArmVirtPkg/ArmVirtXen.dsc b/ArmVirtPkg/ArmVirtXen.dsc index 3a53debedd2c..b4007ff3c6a4 100644 --- a/ArmVirtPkg/ArmVirtXen.dsc +++ b/ArmVirtPkg/ArmVirtXen.dsc @@ -127,6 +127,7 @@ gArmTokenSpaceGuid.PcdGicDistributorBase|0x0 gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x0 gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x0 + gArmVirtTokenSpaceGuid.PcdArmGicRevision|0x0 ## PL031 RealTimeClock gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0 diff --git a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c index c9a181a871b8..73db63078ffb 100644 --- a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c +++ b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c @@ -441,6 +441,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; @@ -470,6 +471,7 @@ InitializeVirtFdtDxe ( PcdSet32 (PcdGicDistributorBase, (UINT32)DistBase); PcdSet32 (PcdGicRedistributorsBase, (UINT32)RedistBase); + PcdSet32 (PcdArmGicRevision, 3); DEBUG ((EFI_D_INFO, "Found GIC v3 (re)distributor @ 0x%Lx (0x%Lx)\n", DistBase, RedistBase)); diff --git a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf index 3477db039f93..657b4e88019d 100644 --- a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf +++ b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf @@ -53,6 +53,7 @@ gArmVirtTokenSpaceGuid.PcdArmPsciMethod gArmVirtTokenSpaceGuid.PcdFwCfgSelectorAddress gArmVirtTokenSpaceGuid.PcdFwCfgDataAddress + gArmVirtTokenSpaceGuid.PcdArmGicRevision gArmTokenSpaceGuid.PcdGicDistributorBase gArmTokenSpaceGuid.PcdGicRedistributorsBase gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase