Received: by 10.223.176.46 with SMTP id f43csp1472196wra; Wed, 24 Jan 2018 17:44:11 -0800 (PST) X-Google-Smtp-Source: AH8x224YftrRYUCqAGZuaAtTh2JbL0jlejHJCqdkzZmr+ec3UchEmaEH1jFknLk0fYwle2xlJiWI X-Received: by 10.98.153.2 with SMTP id d2mr14844751pfe.44.1516844651676; Wed, 24 Jan 2018 17:44:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516844651; cv=none; d=google.com; s=arc-20160816; b=T516NlGGoQo8/jmzqEAlAmqx0JLBND28iV+aOyr+TPbJbatyRNFXPIXuerFF09WLqL jrJixZKf1up2xtnu+bgSbFQvz1Yoxaca6D6WGdj3Hws6acXq2P+TBBwxQGJQ2OsBxOOj 6T62elwh392mVUQpUN//97qhNf1pmVfKOH0YIRB6lBfi9B/H6IFxEIp6RrsYy+slZN1C quZsuW4qllo4aszl1kSz5X4/D6VPd9ANrQ9eEDwATM1icXl2qtYfi/CnBomR5MwY96lD nIZ5K8BGMB7ZGX6czCNds1Algy5qCsvjcCJLkxpszEqYvQXnmVvxchR4wgeoVK7um0m/ dchQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature:arc-authentication-results; bh=kFT1sp2J3vZCdmYAyyMWt/zLoYM5YuB3SuWAl2Ybfws=; b=gz76W7NFTrqJ0nrhodC0QNsDaW5uiBcLN5WTUEH+n51W7iuQ5ZwGt9kj2NOjYvhANl RXqIjLTo4E2WHzVr6t2RDUULFjTkfk8SGofEoNfMETPPCzeBuIDL5U3ATMC7kokyGDpq +0KaCgSGCTeJV7/Ok6TfqEuHFAyjlN6U/1JdqVirECtmfxbnSx5otFwjbjQh7IxWFmSs ncUo6/2KqSDZ2p6HcBREd9JXJZ4N593uVbBuqIwv7kejVUux9b3Rl1rWY+D+rf1C3jLt TQqaNJORf0k7RXZKWoBmJBjdaUdvjybV8g5zj2RG049irJEiu7ts64zRM+D/dA1KtPYE On/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm1 header.b=tuOYa8KD; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=UC1SsIV+; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q81si3812953pfd.99.2018.01.24.17.43.57; Wed, 24 Jan 2018 17:44:11 -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=@sholland.org header.s=fm1 header.b=tuOYa8KD; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=UC1SsIV+; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751830AbeAYBl0 (ORCPT + 99 others); Wed, 24 Jan 2018 20:41:26 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:41821 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751199AbeAYBlY (ORCPT ); Wed, 24 Jan 2018 20:41:24 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id A0990226E4; Wed, 24 Jan 2018 20:41:23 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Wed, 24 Jan 2018 20:41:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:date:from:message-id:subject:to:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=kFT1sp2J3vZCdmYAyyMWt/zLoYM5YuB3SuWAl2Ybf ws=; b=tuOYa8KD2QsOstdZ+LqwqcoN+WR4r3CvPkT7ywagihLvXaAtZDG7K9EEa UZln/rNO1273sawHzQffOMPtlzp0v+4/XUO2z5ymfCXWoESTtM2ZIX3JCUUFTpDw zvsZMjrfafElA0cDHRQRrAk/b8c5DE+GVd5Ym3ZOyeHlbI3laXy6fLJlJg2WZeKm Qa/FC5/eknE4XY4Yfe7lB03/wGlReMcexmXatouH9Tc8pQfDDRG4PtcxaYwsRhG3 sRbbjxtLcMuLNbdgObGB0uTpBOzTRbg/8bBM9TXfP7rol7Lj1cIJ/1vQaicUzhnt kzgBM4IeGdqtdaTmKWPdajMKH9DGg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:message-id:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=kFT1sp2J3vZCdmYAy yMWt/zLoYM5YuB3SuWAl2Ybfws=; b=UC1SsIV+ndqq3gYM/Oi5SPKqNAjxrZfWn QcKbLE9ePg88VsSChQVi+hZtQzcA/96vhF2npm36KYPrfvOAtAwdtcTIX3POh66g oVHL9SgYrVXDUxbMuTrxJvM/ZVo5ESqgjXl76KGqT/AzVKRE3bFHpezjRsl1CCpo oM0FdK2JaSe0MsMQL8mAY/CMc5j4hcA2E+c9xl/FqOnnvFzoD+YbJ+x9dTn1boEw Bk7E5KPeb/7EW4Zfg97Nqe1ebOVq8WmPxjAQlw2sNps0OQgooy1or0RGdKUd6V8G E/wKu2GulKdcLooFKNYoIWVwYgQ0RK9QrJPG74jIOJszm65p5N5EA== X-ME-Sender: Received: from indium.zzz.sholland.net (unknown [99.198.199.144]) by mail.messagingengine.com (Postfix) with ESMTPA id 8035C7E3D4; Wed, 24 Jan 2018 20:41:22 -0500 (EST) From: Samuel Holland To: linux-kernel@vger.kernel.org, Greg Kroah-Hartman Cc: coreboot@coreboot.org, Thierry Escande , Wei-Ning Huang , Julius Werner , Dmitry Torokhov , Guenter Roeck , Samuel Holland Subject: [PATCH 0/5] coreboot table bus and framebuffer driver Date: Wed, 24 Jan 2018 19:41:15 -0600 Message-Id: <20180125014120.20851-1-samuel@sholland.org> X-Mailer: git-send-email 2.13.6 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On many systems, coreboot[1] firmware can initialize graphics hardware and set up a high-resolution linear framebuffer. It exports information about this framebuffer, along with various other information, in a table discoverable via ACPI or a device tree. coreboot also supports booting Linux directly from flash as a "payload". Projects such as Heads[2], u-root[3], and petitboot[4] provide a minimal userland that can then be used to chainload (via kexec) into a full Linux system loaded from disk or over the network. Fitting even a minimal Linux system on an SPI flash chip is challenging. Reusing the framebuffer setup from coreboot provides an enormous benefit to these projects by allowing them to omit full graphics drivers from their kernel builds. It also speeds up boot times by avoiding duplicated effort, and because coreboot's graphics initialization is often much faster than the Linux driver. Patch 1 of this series expands coreboot table support into an enumerable bus that devices can hang off of. Patches 2-3 convert the existing drivers to use the new bus structure instead of ad-hoc platform devices, and patch 4 removes the old coreboot_table_find function. Finally, patch 5 adds a new driver for the coreboot-initialized framebuffer. It improves on earlier work[5] by being architecture- independent and not needing to scan through low memory. This patchset has been tested on a Lenovo ThinkPad X220, and earlier versions of these patches have been tested by various members of the coreboot community on other hardware. [1]: https://www.coreboot.org/Welcome_to_coreboot [2]: https://github.com/osresearch/heads [3]: https://github.com/u-root/u-root [4]: https://www.kernel.org/pub/linux/kernel/people/geoff/petitboot/petitboot.html [5]: https://mail.coreboot.org/pipermail/coreboot/2014-September/078551.html Samuel Holland (5): firmware: coreboot: Expose the coreboot table as a bus firmware: memconsole: Probe via coreboot bus firmware: vpd: Probe via coreboot bus firmware: coreboot: Remove unused coreboot_table_find firmware: coreboot: Add coreboot framebuffer driver drivers/firmware/google/Kconfig | 8 ++ drivers/firmware/google/Makefile | 1 + drivers/firmware/google/coreboot_table-acpi.c | 2 +- drivers/firmware/google/coreboot_table-of.c | 2 +- drivers/firmware/google/coreboot_table.c | 130 ++++++++++++++++++------- drivers/firmware/google/coreboot_table.h | 72 +++++++++++--- drivers/firmware/google/framebuffer-coreboot.c | 115 ++++++++++++++++++++++ drivers/firmware/google/memconsole-coreboot.c | 49 ++++------ drivers/firmware/google/vpd.c | 43 +++----- 9 files changed, 313 insertions(+), 109 deletions(-) create mode 100644 drivers/firmware/google/framebuffer-coreboot.c -- 2.13.6