Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp3869873pxb; Tue, 7 Sep 2021 09:16:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWblbsnFPmzrCbdoJcVr5+Mtie7x2ZBgZmLFYe+RXL/JPRzwoScfuRhvu8VkRKRP8tKoTe X-Received: by 2002:aa7:de93:: with SMTP id j19mr229059edv.241.1631031378407; Tue, 07 Sep 2021 09:16:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631031378; cv=none; d=google.com; s=arc-20160816; b=gXA+J0BQLNmERcYrMIvByC0Pu8dDWSVo27MwDPoqYRf07x8c/Wh+yqdEIe4yQZRupH lLXVrqVC5+kd4jPo1pjug+yjffVE00sku24duTpzZsEF1ZDoHmiwwT8E0glRBSOz7Hb5 EAf2T8CZyPHxqj6o92dEW5UsbgWotTfjE1sh5F0eEv3N3Ar/t2TSExUumYHySGgQvf1l j6lxIXtFt8Ad58yXRBB/2yvfjMw3hQdke/jXfz0LI6b7cAKjje0bWzzXt3mRK8fu/qb8 VHdkidDQBksPNMKQSm8AsiJyuHmJDgMmnY6B6n+5ccm/uuIqAUgHwOkSDqalXngXQfCE eFZw== 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; bh=hnPnUv4LY2NTfZ63Maeu4b5XTelhKqKzlKLIDbTdf3M=; b=cg2WkPCcm/zyiK6nHSa6olccbRSip9GWO9cqiWi9lGPjQGpvwfxYir10u1fdkFUWKk Dt5UUSKl4Ibu6rxIdPhMUWEW/3K4vc0S/HVYXLpdN8kU7zo6Eczh3P7ThhVZf06fA/Pf WOjh/nhC21lyxmDRlMCr8S9LI0Eu+aRQHlCvqM8FaKVr0spaXD6OmbJTaCE+2fuEXODM IEUjkOluP4CCs4jtZff4vPMADIjqpDGxb3ntqDQWy3r3MEYWdLdDc1PqrdpXYZS/1KBe 2PN6x1pPwapEyU1KB1+4c6XChZZ/i7CoDnB7g+OJ82obgZpRxuuMn46BitW8nAL/ykVK dAZg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id co14si10500437edb.86.2021.09.07.09.15.50; Tue, 07 Sep 2021 09:16:18 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345367AbhIGPnn (ORCPT + 99 others); Tue, 7 Sep 2021 11:43:43 -0400 Received: from mga02.intel.com ([134.134.136.20]:21515 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235162AbhIGPnm (ORCPT ); Tue, 7 Sep 2021 11:43:42 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10099"; a="207458040" X-IronPort-AV: E=Sophos;i="5.85,274,1624345200"; d="scan'208";a="207458040" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2021 08:42:36 -0700 X-IronPort-AV: E=Sophos;i="5.85,274,1624345200"; d="scan'208";a="538028650" Received: from chenyu-desktop.sh.intel.com (HELO chenyu-desktop) ([10.239.158.176]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2021 08:42:32 -0700 Date: Tue, 7 Sep 2021 23:48:30 +0800 From: Chen Yu To: Jonathan Corbet Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , Len Brown , Dan Williams , Andy Shevchenko , Aubrey Li , Ashok Raj , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , linux-doc@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH 1/5][RFC] Documentation: Introduce Platform Firmware Runtime Update documentation Message-ID: <20210907154830.GA44825@chenyu-desktop> References: <87sfygtnna.fsf@meer.lwn.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87sfygtnna.fsf@meer.lwn.net> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jon, On Tue, Sep 07, 2021 at 09:23:53AM -0600, Jonathan Corbet wrote: > Thanks for adding to the documentation. I have a few nits for you... > Thank you very much for your comments. > Chen Yu writes: > > > Add the Platform Firmware Runtime Update/Telemetry documentation. > > > > Signed-off-by: Chen Yu > > --- > > Documentation/x86/pfru.rst | 98 ++++++++++++++++++++++++++++++++++++++ > > 1 file changed, 98 insertions(+) > > create mode 100644 Documentation/x86/pfru.rst > > When you add a new RST file, you also need to find a spot for it in > index.rst so it becomes part of the docs build. > I see. Will do in next version. > > diff --git a/Documentation/x86/pfru.rst b/Documentation/x86/pfru.rst > > new file mode 100644 > > index 000000000000..321729f46737 > > --- /dev/null > > +++ b/Documentation/x86/pfru.rst > > @@ -0,0 +1,98 @@ > > +.. SPDX-License-Identifier: GPL-2.0 > > + > > +======================================================== > > +The Linux Platform Firmware Runtime Update and Telemetry > > +======================================================== > > + > > +According to the specification of [1], > > +certain computing systems require high Service Level Agreements (SLAs) where > > +system reboot fewer firmware updates are required to deploy firmware changes > > +to address bug fixes, security updates and to debug and root cause issues. This > > +technology is called Intel Seamless Update. The management mode (MM), > > +UEFI runtime services and ACPI services handle most of the system runtime > > +functions. Changing the MM code execution during runtime is called MM Runtime > > +Update. Since the "MM" acronyms might be misunderstood as "Memory Management", > > +this driver uses "Platform Firmware Runtime Update"(PFRU) > > + > > +PFRU provides the following facilities: Performs a runtime firmware driver update > > +and activate. Ability to inject firmware code at runtime, for dynamic instrumentation. > > +PFRU Telemetry is a service which allows Runtime Update handler to produce telemetry > > +data to upper layer OS consumer at runtime. The OS provides interfaces to let the > > +users query the telemetry data via read operations. The specification specifies the > > +interface and recommended policy to extract the data, the format and use are left to > > +individual OEM's and BIOS implementations on what that data represents. > > Sticking to the 80-column limit is preferable; it keeps the text > readable. > Okay, will do. > > +PFRU interfaces > > +===================== > > Underline lengths should match the title text, or Sphinx will get grumpy > with you. > Got it, will fix it. > > +The user space tool manipulates on /dev/pfru/update for code injection and > > +driver update. PFRU stands for Platform Firmware Runtime Update, and the /dev/pfru > > +directory might be reserved for future usage. > > + > > + 1. mmap the capsule file > > + fd_capsule = open("capsule.cap", O_RDONLY); > > + fstat(fd_capsule, &stat); > > + addr = mmap(0, stat.st_size, PROT_READ, fd_capsule); > > These will not render the way you would like; you'll want to use literal > blocks for the code samples. > Okay, I'll fix it. thanks, Chenyu