From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ADA69C49EA4 for ; Wed, 23 Jun 2021 12:40:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 967616024A for ; Wed, 23 Jun 2021 12:40:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231153AbhFWMmw (ORCPT ); Wed, 23 Jun 2021 08:42:52 -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