Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5290842pxj; Wed, 26 May 2021 07:18:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkc8NrTBPmZ36uW2CBSwsdXZVHVnAFN4E5q8rQ5fCYXWqJ4mp+7DRMxbtOHIa8iOLJxnXM X-Received: by 2002:a17:906:3b8f:: with SMTP id u15mr33668329ejf.444.1622038717270; Wed, 26 May 2021 07:18:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622038717; cv=none; d=google.com; s=arc-20160816; b=Uwo+yBpSp/To7WJDhVndXbTAEAyYap7WvAnzeT3RLWdHTQHGKo0rqoZBm3MNEO2cb0 GiakeMlBiTD5QMUOw+NTJLRM2W/TOj4d+22O5V5IJ1bXVLD/UHWuNeIdlrr1332nxgYr Gto07UnO+jCTalvngbK0qgm3Dz8mE91Kv86/HErg468RULKCNqkMl5yS+SbITZdtQNql IWSQEuc+Y5Az0DYgRA1rDm8j3fMSnEVkq2Uc8YLk2MQBh7wXNK+seTZu99i8hGDK2t8h bGEkshtsXAXAgax+tSuDXz5W1AIp5BjESJg+CFjaiU1uFMRxw/nltWiEhBJYst+UWdj3 AETA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=3KVeD/THJU+o0TbCFKagLZOspWWqAaoyJryUyz5ldGA=; b=HG6dTgKOX5aTMPCqtcRMXnKemuhK4sWExlqKMz5dz7bbe08/U9YKkwDbGrK94ztJnN On51LqihOzt1AAi+LnBOxj2XNtLubz7P0CDURp2w8tA2yJ04XJWXUHm/u/mmRldFeCXa H8mRD7wGtWdiCJsWBHjnRzsgN+3dZoCYY2RTycg6XiAYmUj9E+3T7390sy5PGhx3xQ1e 01u1tOldUb97qx4TgUqqHHXwtMB5N+PIICYRUuz7FliucZBiSvnKgUOxesvHCsXQNMiT +aj4z/ixFTaOU4DLFxZ/wK8vS/mIDUy4sRpARnsFWJBr6SQ0vvD4gqxJ9qv52kQyPL0/ HdyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dvLySTxE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bo27si2787548edb.287.2021.05.26.07.18.12; Wed, 26 May 2021 07:18:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dvLySTxE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234537AbhEZOQp (ORCPT + 99 others); Wed, 26 May 2021 10:16:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:42252 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233484AbhEZOQo (ORCPT ); Wed, 26 May 2021 10:16:44 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6B57E613D7; Wed, 26 May 2021 14:15:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622038513; bh=V9yfVGz48znBhoLYjEcvRlIp+daisCyNDfH0CN868s4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=dvLySTxEZiqHBU8DH6u3hrzj/0VudX+Pm4o9KGnIC8axkD+9PaZiv2F7PbCAMhuXl ZeeO7mNhyyyXa9eue79WEGTCXLOOHL4gm432bZz7BcvKQV38DZvaX+GPQIxzETcm8T mD24awDK8Uz+0BUmBoOAbktmxDwSqKnRjK9wiYEzrSANcvvsqFHEbpWBWST4A8FTx3 HclZI2Quz0gpF21n72viLd14SRFeky5BDhX4phZGE3Y7QzuEgUlbhAQtBrD12xLRls AOb2wzA2NOhnENSybyHuEQ+jbJa4Oslqju8HYAuZs9c/n3g2MwlPkKXBHIIfMYWBoL fbBwjsDcOveFg== Received: by mail-ot1-f54.google.com with SMTP id u25-20020a0568302319b02902ac3d54c25eso1149846ote.1; Wed, 26 May 2021 07:15:13 -0700 (PDT) X-Gm-Message-State: AOAM530RRriy6jUaRfONF7+ScC6ggAqCZsfXm3OGM4K8y8Lnu70YsqiW j27hVzaX+Fvl6ABV0aWZjwQqXiXMBaZumJfrRRY= X-Received: by 2002:a05:6830:4da:: with SMTP id s26mr2542142otd.77.1622038512765; Wed, 26 May 2021 07:15:12 -0700 (PDT) MIME-Version: 1.0 References: <7a1e2ebc-f7d8-8431-d844-41a9c36a8911@arm.com> <01efd004-1c50-25ca-05e4-7e4ef96232e2@arm.com> <87eedxbtkn.fsf@stealth> <877djnaq11.fsf@stealth> <9b99d520-e4b1-ae44-44eb-93c2e3d0c0cb@gmail.com> In-Reply-To: <9b99d520-e4b1-ae44-44eb-93c2e3d0c0cb@gmail.com> From: Ard Biesheuvel Date: Wed, 26 May 2021 16:15:01 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [BUG] rockpro64: PCI BAR reassignment broken by commit 9d57e61bf723 ("of/pci: Add IORESOURCE_MEM_64 to resource flags for 64-bit memory addresses") To: =?UTF-8?Q?Christian_K=C3=B6nig?= Cc: Peter Geis , Punit Agrawal , Robin Murphy , Alexandru Elisei , Linux Kernel Mailing List , "open list:ARM/Rockchip SoC..." , arm-mail-list , Heiko Stuebner , Leonardo Bras , Rob Herring , PCI Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 26 May 2021 at 15:55, Christian K=C3=B6nig wrote: > > Hi Ard, > > Am 25.05.21 um 19:18 schrieb Ard Biesheuvel: > > [SNIP] > >>> I seriously doubt that this is what is going on here. > >>> > >>> lspci -x will give you the bare BAR values - I suspect that those are > >>> probably fine. > >> lspci -x > >> 00:00.0 PCI bridge: Fuzhou Rockchip Electronics Co., Ltd Device 3566 (= rev 01) > >> 00: 87 1d 66 35 07 05 10 40 01 00 04 06 00 00 01 00 > >> 10: 00 00 00 00 00 00 00 00 00 01 ff 00 10 10 00 20 > >> 20: 00 10 00 10 01 00 f1 0f 00 00 00 00 00 00 00 00 > >> 30: 00 00 00 00 40 00 00 00 00 00 00 00 5f 01 02 00 > >> > >> 01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. > >> [AMD/ATI] Turks PRO [Radeon HD 7570] > >> 00: 02 10 5d 67 07 00 10 20 00 00 00 03 00 00 80 00 > >> 10: 0c 00 00 00 00 00 00 00 > > This is a 64-bit prefetchable BAR programmed with bus address 0x0 > > > >> 04 00 00 10 00 00 00 00 > > This is a 64-bit non-prefetchable BAR programmed with bus address 0x100= 0_0000 > > > > (https://en.wikipedia.org/wiki/PCI_configuration_space describes the > > meaning of the low order BAR bits) > > Sorry for jumping into the middle of the discussion and to be honest I > haven't fully read it. > > This looks a bit odd since on AMD VGA hardware the non-prefetchable BAR > is usually only 32bit, not 64bit. > > But this hardware generation is rather old and I'm not sure what the BAR > assignment for that generation was. I would need to dig up the register > description in our archives as well. > I have another museum piece in my AMD Seattle: 02:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Oland XT [Radeon HD 8670 / R7 250/350] (rev 81) (prog-if 00 [VGA controller]) Subsystem: Dell Oland XT [Radeon HD 8670 / R7 250/350] Flags: bus master, fast devsel, latency 0, IRQ 255 Memory at 100000000 (64-bit, prefetchable) [size=3D4G] Memory at 40000000 (64-bit, non-prefetchable) [size=3D256K] I/O ports at 1000 [disabled] [size=3D256] Expansion ROM at 40060000 [disabled] [size=3D128K] Capabilities: Kernel modules: radeon, amdgpu So AMD/ATI ASICs definitely exist that expose a 64-bit pref and a 64-bit non-pref BAR. --=20 Ard.