Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1891165ybc; Wed, 20 Nov 2019 05:49:27 -0800 (PST) X-Google-Smtp-Source: APXvYqx3vcKyStsjTiPsw4pRryOU9I7NUctSuE7ionvLQxWCr6y7y1cAVTxGORyQhGFX6pYsHG8U X-Received: by 2002:a1c:67d7:: with SMTP id b206mr3315508wmc.68.1574257766532; Wed, 20 Nov 2019 05:49:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574257766; cv=none; d=google.com; s=arc-20160816; b=Xv7oJc8rCd1ITomK05R0nK3vzmivh4DJTe8mdudKWcHnqs2/szcoPXeQL9GsCiMu+U w7SxiR1hMpj4JnRkS0+60bcSo/HpmAtsf5RTzxyk+HFfriJOEwNJWaQjG2VPjk1Wbxq1 OTtIlkNML2Vlmhdr9VOEyAYUrVlS8qLw70dudNwlhD47+yP0RJkgfpCuxGP5bg6kVyLv q5SVJMdY5dsXYQjOOTsgpkY6UXBW7QRgBhfWVMeE34GCiKl9vMc7/dI6RZ52PXaZttyP DERobVte0zVC8bSbu+wjrzLruLQuTnJLnCZZRMxZNV47in2G0uYubIET9xA3RYXUYVeS IjtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=hc+e/4bbkmOsPc7h3n96rW8fCtHfYV+rcvDUEGU80WQ=; b=OpWyQosoLM/F7SJSm/nK/tkfhXnH09JnJMXFoFSFDF9TcvirhdzKi3rtcJNwohXyFk S5+H132BQDWsoepEEOzpEzBU/efasGca8dQmUXB2TyRrromUKfFHQVgsEUmBa96PuoXl 1XZbKzxTIKOa7rPQa5sTIb8p40CTJV+osWL8fNv6o59QJ2INNGigYUJaLKq8HCl/XFCy UjjQySw0I2c/U5597Aqsl/WZWgEldFWxePvhr8VeIcDF5T3ZxrNq8TXIII1+KUDJ+nSI 12pIQET1L8hV4GL2yVdN7cS8Hc4VUH4VfRIYat00yVOw4n36+fSRtri00cWkB+AEZd8s L+aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@9elements.com header.s=google header.b=YreErlZl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=9elements.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q8si16647587edb.28.2019.11.20.05.49.01; Wed, 20 Nov 2019 05:49:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@9elements.com header.s=google header.b=YreErlZl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=9elements.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730508AbfKTNkT (ORCPT + 99 others); Wed, 20 Nov 2019 08:40:19 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:38770 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728795AbfKTNkS (ORCPT ); Wed, 20 Nov 2019 08:40:18 -0500 Received: by mail-wm1-f66.google.com with SMTP id z19so7865861wmk.3 for ; Wed, 20 Nov 2019 05:40:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=9elements.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hc+e/4bbkmOsPc7h3n96rW8fCtHfYV+rcvDUEGU80WQ=; b=YreErlZlPJh+ONjf/24/XKR2tp1V0tI82se8RiBRjVqwfZj4r2VHnsbcTRwyLtFtPi m425AUFz9OdzMCNLdOlhtkeuUyYnv+iXxPY4RKjIWaFDirWUu3ohOGHntM71SUY5P3n8 WGqM67AN98Jgp2Pr0j7pLNbpkjfICD63OwRzkHJYyKZ7ZGpu/7M1ftpb2BNaWZ3yVemt 8vKtB9cgAaVib6G/r53uPmElhvhu1+hbD6VTglES/yMpKxtgcLd2NKANYpFfllEMEnfy TvtqjNtCIzQmG6Lq7PRvxJsTXUIFy2clzU0MBG2bteNdIJ9GvtcckDd5IJKsTYhslg7Z cieA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hc+e/4bbkmOsPc7h3n96rW8fCtHfYV+rcvDUEGU80WQ=; b=lQYPfRpkHpEOpxYzdOpLvcIJbGhMHeU0OLjtzt9rXf4qHuHgULSaUddPSNNwNDpTmV tdueMc1uAZCqWq4IFvHmyWULzamauhVShvyvWQSknXopvUOf8m6U3pISF9zGo1fhsbiM GJYb5sC/0anOG6WeihnIvt7xjN31RCK8m1qxqdkk6nSstfCjjATIm3t5PX/EwirQfoPU U/zbSJHirgzNmpVZn/EMeRKyqKkM0x3So4aJJ1CjHGqKH9xmeHUy6oOzBgn48aHz1Wou gfpXJLuE8AfDewzobYnLiy9n5Wbt5fzXBHYLqfHUARitlFENEgHF59K/mg9WMYnY78KU h/wQ== X-Gm-Message-State: APjAAAVLNSzHjdDFfMPzdAAUMs3mqtc25gSX4b0Vihzs3ElH7eSn2JNP +VEjMZzMEcuauBAu8qu7Q0sE8xifhiPt5W3f X-Received: by 2002:a7b:cc86:: with SMTP id p6mr3400151wma.116.1574257216438; Wed, 20 Nov 2019 05:40:16 -0800 (PST) Received: from rudolphp.9e.network (b2b-78-94-0-50.unitymedia.biz. [78.94.0.50]) by smtp.gmail.com with ESMTPSA id t14sm30473434wrw.87.2019.11.20.05.40.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Nov 2019 05:40:15 -0800 (PST) From: patrick.rudolph@9elements.com To: linux-kernel@vger.kernel.org Cc: Patrick Rudolph , Greg Kroah-Hartman , Thomas Gleixner , Alexios Zavras , Allison Randal , Samuel Holland , Julius Werner , Stephen Boyd Subject: [PATCH 0/2] firmware: google: Expose coreboot tables and CBMEM Date: Wed, 20 Nov 2019 14:39:45 +0100 Message-Id: <20191120133958.13160-1-patrick.rudolph@9elements.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Patrick Rudolph As user land tools currently use /dev/mem to access coreboot tables and CBMEM, provide a better way by using read-only sysfs attributes. Unconditionally expose all tables and buffers making future changes in coreboot possible without modifying a kernel driver. Changes in v2: - Add ABI documentation - Add 0x prefix on hex values - Remove wrong ioremap hint as found by CI Patrick Rudolph (2): firmware: google: Expose CBMEM over sysfs firmware: google: Expose coreboot tables over sysfs Documentation/ABI/stable/sysfs-bus-coreboot | 73 +++++++++ drivers/firmware/google/Kconfig | 9 ++ drivers/firmware/google/Makefile | 1 + drivers/firmware/google/cbmem-coreboot.c | 162 ++++++++++++++++++++ drivers/firmware/google/coreboot_table.c | 60 ++++++++ drivers/firmware/google/coreboot_table.h | 13 ++ 6 files changed, 318 insertions(+) create mode 100644 Documentation/ABI/stable/sysfs-bus-coreboot create mode 100644 drivers/firmware/google/cbmem-coreboot.c -- 2.21.0