Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5626033pxj; Wed, 23 Jun 2021 05:41:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypF/RbWZc6uYC3j1Uo4+sldEAjgISZlqnZdxzN5pCLWfV0cl53JDQt5yR9iIzlxwbqDfIF X-Received: by 2002:a5e:8513:: with SMTP id i19mr6871482ioj.50.1624452091874; Wed, 23 Jun 2021 05:41:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624452091; cv=none; d=google.com; s=arc-20160816; b=vPFIG6oJKb9u1GArM1Of+XMCRJph+uCxe+hfo01VwxHHEYbHiSFhe+XjIPvT0B9uVP vI76mQMutxIocAcyKXAMEfUowlj7HAbpGRJIs/D6nddyUHsFaPxqI+KkMaUN5puctsuT eWXjxpMpHt2S9LRoyGURgEOdOHgxPdqqnWedYrB6LcLUH9opMCA5jq48/uJdLEkNUcIT gqnbno1K612OaWeZKrXkX1rciqINwqAjicRMoAmxxMMYRD3FFWvphcbLMlzo6o89wTym 3H8nMLT6mpMiQYOSg041KpfL7V5jSqdVrfOmziDyzGxrr7SRFOBxix2XYXSOQ0OsmPIT uJVA== 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=3uqMjVJHJBa2t+5mjYb8AyUe3BeH+l3Dsep+pnrbTAw=; b=ZQCm/O2MAxphUOvR8YE36xfHexq24T1yrVUXhyWND/oDMf/7o0C4oHUdqGBNx0gcwf +QVgrpMM0JH3WJIbKaMyGGz00Q+JebpaQaHeINvQCAdwmK6M5PXIhAG9OUV2slFeeR0O r4LP4Oh8oaNwHJD/XesmI4bQ7EhW1wS5eOQ+qgDdeYuRmqSUjBl8eSi/77ag6Ed4zs53 4gHhxymeMjaA8dEDx3g/r4dRrM6pn0VxxvXFotS0ZdyKnIIqaohhPugSq32r1MTZ6Br7 WesZzEMXV+b56mdZYibeDvuSlSdn6mUvoqVlwHiCFMEOIhDAgycBpaDq45knH143tWN0 ASPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BRDfzh8x; 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 k6si22921157iow.10.2021.06.23.05.41.19; Wed, 23 Jun 2021 05:41:31 -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=BRDfzh8x; 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 S230513AbhFWMmt (ORCPT + 99 others); Wed, 23 Jun 2021 08:42:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:58968 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231135AbhFWMm1 (ORCPT ); Wed, 23 Jun 2021 08:42:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4099B61075; Wed, 23 Jun 2021 12:40:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624452009; bh=E2jJiWLflk4zOTprOIP3xybsAuLmX2jkH2ltmG50uzw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BRDfzh8xW2f5/Fl3+oLqp/FpUbyRw1f2/BGc++p3YYTOF1kRjN3JfPIHdW6sBUoaw F0q3pstRI6JC0z7h1+1BSfywq+7IcoGglYoGO36678+2oYCTEo9g0pRRNK2nuQGEjq +H+p2wPZ/9uzvwGVLTStz2cXLnPZIyAzUO/hY8jE= Date: Wed, 23 Jun 2021 14:40:07 +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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 23, 2021 at 02:17:54PM +0200, Hans-Gert Dahmen wrote: > Hi, > > these are some good points. > > On 23.06.21 00:18, David Laight wrote: > > Are you saying that my 15 year old 64bit Athlon cpu and bios > > have this large SPI flash > > No. The reads will wrap, i.e. if your flash is 2MB then it would be repeated > 8 times in the 16MB window. > > > and the required hardware to > > convert bus cycles to serial spi reads? > > 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. > > However, after reading your mail I understand that I should have looked up > the exact explanations in the respective specs. So to definitively answer > your question I need to know which south bridge there is in your 15 year old > system and have a look into its datasheet. Do you know which one it is by > any chance? 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. thanks, greg k-h