From patchwork Fri Apr 8 09:44:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 65376 Delivered-To: patch@linaro.org Received: by 10.112.43.237 with SMTP id z13csp569351lbl; Fri, 8 Apr 2016 02:46:05 -0700 (PDT) X-Received: by 10.98.66.89 with SMTP id p86mr11350541pfa.42.1460108750829; Fri, 08 Apr 2016 02:45:50 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id ew7si20633pad.131.2016.04.08.02.45.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Apr 2016 02:45:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; 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 2001:19d0:306:5::1 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 554481A1FCC; Fri, 8 Apr 2016 02:45:39 -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 401241A1FCC for ; Fri, 8 Apr 2016 02:45:38 -0700 (PDT) Received: by mail-wm0-x22f.google.com with SMTP id u206so15477296wme.1 for ; Fri, 08 Apr 2016 02:45:38 -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:in-reply-to:references; bh=/nmTjwTLCh+LUfl7kxMCAkqgK8UOyVOMFhm3CBuJ0ZA=; b=h+zdmbA9iW1fv8V3PWKZKyBgM9XZgJgloERN/ae20Z1OK4zpK/hfB3V5lB3PWEzSdU dFwHz46hIFrR6ecc2sqmWoqMFWOURRB6Hc4gS9olUatvbguBm5NCfyPNmTiw8syLAdWv QatSVzHaso0wcqisZ/JyhiSatko+qzSAeTixw= 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:in-reply-to :references; bh=/nmTjwTLCh+LUfl7kxMCAkqgK8UOyVOMFhm3CBuJ0ZA=; b=dfT/3SVjLWVQgCeT+iL0N6rOqNseMWcFq/JIP+nrj0WKHa4a4FRAp7sTe2xcKqXsf+ mvoxa+kgJQpn7RESTwaGwSTTMjgVQGKVcKxP4IOdVHvAusNTUoLc2GBi8/n1FSSetZO3 UHSki4yCz/Jb2WS7UCcBddf8Yf4PrALwfDNLGtCr1Hzl5WeHRHTWjGwm0YA4w0nVdNXh gTOAHZSBfywlJf2q57Cd+6VK4Nm4aX9MOQmpAteeR7H6aMalidxS/8PfpvuLLpz0hNDX hbaRAVCF+q2kwJW5O/LxkIK21iTNLocwX/QB6w732pg6SAFZDW6f8ulCNr0gWuGTJX3x jzwg== X-Gm-Message-State: AD7BkJJapCQnoRsrnMssn7k0URkdUWY2VMyltsJBLdm0RNa+GgROvvbPjAOCFLjZw7k4Xd4t X-Received: by 10.194.158.226 with SMTP id wx2mr8135808wjb.91.1460108736963; Fri, 08 Apr 2016 02:45:36 -0700 (PDT) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id s10sm9710681wjp.3.2016.04.08.02.45.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 08 Apr 2016 02:45:36 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com Date: Fri, 8 Apr 2016 11:44:59 +0200 Message-Id: <1460108711-12122-13-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1460108711-12122-1-git-send-email-ard.biesheuvel@linaro.org> References: <1460108711-12122-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH v2 12/24] ArmVirtPkg/VirtFdtDxe: remove handling of fw_cfg DT node 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" Remove the handling of the fw_cfg DT node from VirtFdtDxe now that the fw_cfg client library has been moved to the FDT client protocol, and no longer relies on VirtFdtDxe to pass this information via dynamic PCDs. Since the PCDs in question are now no longer used, remove them from the various DEC and DSC files as well. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmVirtPkg/ArmVirtPkg.dec | 5 -- ArmVirtPkg/ArmVirtQemu.dsc | 4 -- ArmVirtPkg/ArmVirtQemuKernel.dsc | 4 -- ArmVirtPkg/ArmVirtXen.dsc | 4 -- ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c | 49 -------------------- ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf | 3 -- 6 files changed, 69 deletions(-) -- 2.5.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Laszlo Ersek diff --git a/ArmVirtPkg/ArmVirtPkg.dec b/ArmVirtPkg/ArmVirtPkg.dec index 73136adf62c6..9f98f28f01e1 100644 --- a/ArmVirtPkg/ArmVirtPkg.dec +++ b/ArmVirtPkg/ArmVirtPkg.dec @@ -59,11 +59,6 @@ [PcdsFixedAtBuild, PcdsPatchableInModule] # gArmVirtTokenSpaceGuid.PcdTerminalTypeGuidBuffer|{0x65, 0x60, 0xA6, 0xDF, 0x19, 0xB4, 0xD3, 0x11, 0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D}|VOID*|0x00000007 -[PcdsDynamic, PcdsFixedAtBuild] - gArmVirtTokenSpaceGuid.PcdFwCfgSelectorAddress|0x0|UINT64|0x00000004 - gArmVirtTokenSpaceGuid.PcdFwCfgDataAddress|0x0|UINT64|0x00000005 - gArmVirtTokenSpaceGuid.PcdFwCfgDmaAddress|0x0|UINT64|0x00000009 - [PcdsFeatureFlag] # # "Map PCI MMIO as Cached" diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index 7743d912d21c..651cbfc84787 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -221,10 +221,6 @@ [PcdsDynamicDefault.common] gArmPlatformTokenSpaceGuid.PcdPciMmio32Size|0x0 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x0 - gArmVirtTokenSpaceGuid.PcdFwCfgSelectorAddress|0x0 - gArmVirtTokenSpaceGuid.PcdFwCfgDataAddress|0x0 - gArmVirtTokenSpaceGuid.PcdFwCfgDmaAddress|0x0 - # # Set video resolution for boot options and for text setup. # PlatformDxe can set the former at runtime. diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc index a30557d8c306..e6306830c402 100644 --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc @@ -206,10 +206,6 @@ [PcdsDynamicDefault.common] gArmPlatformTokenSpaceGuid.PcdPciMmio32Size|0x0 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x0 - gArmVirtTokenSpaceGuid.PcdFwCfgSelectorAddress|0x0 - gArmVirtTokenSpaceGuid.PcdFwCfgDataAddress|0x0 - gArmVirtTokenSpaceGuid.PcdFwCfgDmaAddress|0x0 - # # Set video resolution for boot options and for text setup. # PlatformDxe can set the former at runtime. diff --git a/ArmVirtPkg/ArmVirtXen.dsc b/ArmVirtPkg/ArmVirtXen.dsc index 7ea46514dad3..0af82be42913 100644 --- a/ArmVirtPkg/ArmVirtXen.dsc +++ b/ArmVirtPkg/ArmVirtXen.dsc @@ -142,10 +142,6 @@ [PcdsDynamicDefault.common] gArmPlatformTokenSpaceGuid.PcdPciMmio32Size|0x0 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x0 - gArmVirtTokenSpaceGuid.PcdFwCfgSelectorAddress|0x0 - gArmVirtTokenSpaceGuid.PcdFwCfgDataAddress|0x0 - gArmVirtTokenSpaceGuid.PcdFwCfgDmaAddress|0x0 - gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3 ################################################################################ diff --git a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c index 368618956be1..0a47092e35ce 100644 --- a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c +++ b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c @@ -45,7 +45,6 @@ typedef enum { PropertyTypeRtc, PropertyTypeVirtio, PropertyTypeUart, - PropertyTypeFwCfg, PropertyTypePciHost, PropertyTypeXen, } PROPERTY_TYPE; @@ -59,7 +58,6 @@ STATIC CONST PROPERTY CompatibleProperties[] = { { PropertyTypeRtc, "arm,pl031" }, { PropertyTypeVirtio, "virtio,mmio" }, { PropertyTypeUart, "arm,pl011" }, - { PropertyTypeFwCfg, "qemu,fw-cfg-mmio" }, { PropertyTypePciHost, "pci-host-ecam-generic" }, { PropertyTypeXen, "xen,xen" }, { PropertyTypeUnknown, "" } @@ -279,12 +277,6 @@ InitializeVirtFdtDxe ( VIRTIO_TRANSPORT_DEVICE_PATH *DevicePath; EFI_HANDLE Handle; UINT64 RegBase; - UINT64 FwCfgSelectorAddress; - UINT64 FwCfgSelectorSize; - UINT64 FwCfgDataAddress; - UINT64 FwCfgDataSize; - UINT64 FwCfgDmaAddress; - UINT64 FwCfgDmaSize; BOOLEAN HavePci; Hob = GetFirstGuidHob(&gFdtHobGuid); @@ -338,47 +330,6 @@ InitializeVirtFdtDxe ( HavePci = TRUE; break; - case PropertyTypeFwCfg: - ASSERT (Len == 2 * sizeof (UINT64)); - - FwCfgDataAddress = fdt64_to_cpu (((UINT64 *)RegProp)[0]); - FwCfgDataSize = 8; - FwCfgSelectorAddress = FwCfgDataAddress + FwCfgDataSize; - FwCfgSelectorSize = 2; - - // - // The following ASSERT()s express - // - // Address + Size - 1 <= MAX_UINTN - // - // for both registers, that is, that the last byte in each MMIO range is - // expressible as a MAX_UINTN. The form below is mathematically - // equivalent, and it also prevents any unsigned overflow before the - // comparison. - // - ASSERT (FwCfgSelectorAddress <= MAX_UINTN - FwCfgSelectorSize + 1); - ASSERT (FwCfgDataAddress <= MAX_UINTN - FwCfgDataSize + 1); - - PcdSet64 (PcdFwCfgSelectorAddress, FwCfgSelectorAddress); - PcdSet64 (PcdFwCfgDataAddress, FwCfgDataAddress); - - DEBUG ((EFI_D_INFO, "Found FwCfg @ 0x%Lx/0x%Lx\n", FwCfgSelectorAddress, - FwCfgDataAddress)); - - if (fdt64_to_cpu (((UINT64 *)RegProp)[1]) >= 0x18) { - FwCfgDmaAddress = FwCfgDataAddress + 0x10; - FwCfgDmaSize = 0x08; - - // - // See explanation above. - // - ASSERT (FwCfgDmaAddress <= MAX_UINTN - FwCfgDmaSize + 1); - - PcdSet64 (PcdFwCfgDmaAddress, FwCfgDmaAddress); - DEBUG ((EFI_D_INFO, "Found FwCfg DMA @ 0x%Lx\n", FwCfgDmaAddress)); - } - break; - case PropertyTypeVirtio: ASSERT (Len == 16); // diff --git a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf index c928e826c258..6c8ba68599ae 100644 --- a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf +++ b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf @@ -50,9 +50,6 @@ [Guids] gFdtHobGuid [Pcd] - gArmVirtTokenSpaceGuid.PcdFwCfgSelectorAddress - gArmVirtTokenSpaceGuid.PcdFwCfgDataAddress - gArmVirtTokenSpaceGuid.PcdFwCfgDmaAddress gArmPlatformTokenSpaceGuid.PcdPL031RtcBase gArmPlatformTokenSpaceGuid.PcdPciBusMin gArmPlatformTokenSpaceGuid.PcdPciBusMax