Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp136112pxv; Thu, 24 Jun 2021 04:44:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCqEqIVZrbcBe9JnYOhufjAATIsQZThW6w4hokj/KliQRnpIKhLchXh1POslpIqV1EaYZu X-Received: by 2002:a6b:b882:: with SMTP id i124mr3786312iof.80.1624535066612; Thu, 24 Jun 2021 04:44:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624535066; cv=none; d=google.com; s=arc-20160816; b=LL4dRpKgbdtQ8LuXoSCFNiRilsPqzg4gCiegMY0CrMqo2JVI4DKgfDbRpdMbJz2siI pwXHACqclPVldnZh+fMgCZsWtGMS6RpNmvn+LpUvonmLBZwKQ67PBn6ienaaFoAY1yVc M6g5BtxCT3pK3yWBZQ1ocXxuCGUKex0c4/Nzl5XdHK+XmebUvGE9BeFZ8VvaxseUbDZs IWo8jfTXLMZ8sf5hNqDxcgqvcRfVeNit4y6Pr0kGbdVSo3MtPsEzkKTy3yTPZVhMSeDH Wnsxz93ht+gw2CHO5H4UwDf4lG+/a1Ix/P2eVxpIwI9WXhARcsn9vt+WW98lADctUVIl O+hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=kmJsO/tGm11G0Sw1VEydP95F0ktCc3Xl2qmJO9Al9ug=; b=udVwaoOUgaZH5Yr37XJdxlSh+Pxs4GykGbwUZzgT8pNERMpgXoyaP7UIxJntYXd3SP V4DUxuoqE9zN49x2R8S5Yclgm9x+AtbpKMuEkQOvGtB9TUUX+ZmrXWp6kK9+NTuPt9s6 O7VAH1io/LvKETTaBmRtYQhkBgCm67+mgXfqDoJ6YpoeILIrYRSTG5F88eqm4pZqYNB2 BVAetzZfa+B73TjM4rBqFUf9NuUPBCRJBoR4io7vJ7jJwFU6hH1bxSorr+BQXkNB5+BW 1KtYNFDj/EylSTzPgeWjsZK28AJwod4z1zSONYK/71B6KzJas6kMnzrKe3HTJ9SRPGgX kOsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VlEpJ2aK; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r9si2494754ilb.8.2021.06.24.04.44.13; Thu, 24 Jun 2021 04:44:26 -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=@linuxfoundation.org header.s=korg header.b=VlEpJ2aK; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229465AbhFXLoY (ORCPT + 99 others); Thu, 24 Jun 2021 07:44:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:44302 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229445AbhFXLoW (ORCPT ); Thu, 24 Jun 2021 07:44:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 81A15613B9; Thu, 24 Jun 2021 11:42:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624534923; bh=qJmXgN7CIXV0tAhUIHPht8LddBB9hfJphL9CMTVxFb8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VlEpJ2aKToVGA22EHZeTVKlQFXxm7cxvLCefs+NKe/FGOi15cc0+MGRNK1Euf2Oi5 9MTzqZNJSeeCF5lbTPZmQpImOvopB8MPsbFOg1MfGGy38d6bd3gRIjgM7wN4YRt9t5 vNzYIzadfI+zb2rnb+Nni0mnqO9bN32nKDskPkEw= Date: Thu, 24 Jun 2021 13:42:00 +0200 From: "gregkh@linuxfoundation.org" To: Hans-Gert Dahmen Cc: David Laight , "akpm@linux-foundation.org" , "linux-kernel@vger.kernel.org" , "philipp.deppenwiese@immu.ne" Subject: Re: [PATCH] firmware: export x86_64 platform flash bios region via sysfs Message-ID: References: <20210622142334.14883-1-hans-gert.dahmen@immu.ne> <5ee9e467bfbf49d29cb54679d2dce1c3@AcuMS.aculab.com> <7f076743-3dd6-d397-d3cc-8c31e080695c@immu.ne> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7f076743-3dd6-d397-d3cc-8c31e080695c@immu.ne> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 24, 2021 at 01:20:28PM +0200, Hans-Gert Dahmen wrote: > > On 23.06.21 14:40, gregkh@linuxfoundation.org wrote: > > > On Wed, Jun 23, 2021 at 02:17:54PM +0200, Hans-Gert Dahmen wrote: > > > Hi, > > > Yes. The window is part of the DMI interface and the south bridge or PCH > > > converts the bus cycles to SPI reads. It is because this region contains the > > > reset vector address of your CPU and the very first instruction it executes > > > after a reset when the internal setup is done will actually be loaded from > > > the serial SPI bus. It is AFAIK part of AMD's original 64-bit specification. > > The point is that you will never be able to do this for all devices. > > You should ONLY be allowed to have this module bind to the hardware that > > you KNOW it will work with. > > > > So please work off of a DMI table, or some such hardware description, > > instead of just blindly enabling it for all systems. > > I was referring to the DMI/QPI/PCI interface that connects the ICH/PCH/south > bridge to the CPU. I have gone through all datasheets of intel ICH and PCH > and they state that the address range from 0xff000000 through 0xffffffff is > a fixed mapping that cannot be changed (no BAR) except for the original ICH > (dating back to 1999) where the window is only 8MB. The original ICH is for > 32-bit systems only so all 64-bit Intel systems that exist have this > feature. I have talked to somebody who works with future Intel hardware and > the person indicated that it is not likely to change. > > This is why I made the module depend on X86_64. I still have to do the same > complete research for AMD systems which is a little harder to do, so I am > proposing to check if the root complex has Intel's vendor ID and only load > the module on 64-bit Intel systems until I can confirm the same behavior for > all 64-bit AMD systems. Then I could check if the root complex is Intel or > AMD. Would that suffice as "some such hardware description"? That would help, yes. Especially given the other types of Intel-like cpus we are seeing in the wild these days (not all the world is Intel and AMD...) But what is this really going to be used for? What userspace tools need this type of direct access to do something useful? thanks, greg k-h