Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 58223CCA480 for ; Wed, 20 Jul 2022 17:00:14 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 52E5F8118A; Wed, 20 Jul 2022 19:00:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="TrWJ2vyR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 43D4480CF3; Wed, 20 Jul 2022 19:00:07 +0200 (CEST) Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 87D14811CA for ; Wed, 20 Jul 2022 18:59:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-wr1-x429.google.com with SMTP id bu1so26985893wrb.9 for ; Wed, 20 Jul 2022 09:59:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7wYle9ZUWjjqwknbwleXiUkNN52rZg3ohD59yvN0O6k=; b=TrWJ2vyRTFe6N+8tlssv0oVRqcxkeZqf9LJ6imUc64Ac8o+2YmOif9uT1BNN4m/hsa IvzHxh3njCOj9UdrhG4TsPF9Q7tcUgnBQl5BUcjlQcOGgLwkDYP4PD2JTqFLwk2wkR96 l2LzC/S9i4jHJADmavcLlUyWI7+8orsCpNGw0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7wYle9ZUWjjqwknbwleXiUkNN52rZg3ohD59yvN0O6k=; b=qOamX0H6W0/LtWngBlVI9RDlsuVSo6SydJPxCHRim08IHtM8Q+fuqZ0lX1gPymVlYk JnmuE01tdB54VqH2SqQfiscX9KcCpfv7qR9LP9jWx5W6h612Y0gOCYCPni9bBad2xynW VrIaYozpkA+lF6Wxe05q9r9pJJ4E+/OHFCWNSaFKNRmSsajv8o/r/dLPLyLvUY4BrEIz fOHjbULzLQ0zLNQGHWbtf0ZLCLU26MvchOaeOrM9vdVmiCTnuN5TZ1kTkQhxGc8XjZ6a UY5IRJZir71Q849fX7TPxH8rCpDPPuteyHFSj+qwRTmF/pXTW5letyKyCFEG+cBAm9g+ TpoQ== X-Gm-Message-State: AJIora/Qcj092rm3Brm6X+bztlJP4yUVep3ib7di935jjI5oDp2Bk1gW saR+NqmOd+M5l4xGvkLbYWUtpfBO8KdNCg== X-Google-Smtp-Source: AGRyM1vTqMC4BaIXCbmgkvgKqYM8sP94KhlKM+4VxQKqRM+90d/WbqjzN1CA8kTgr9JeO4ZGXqAqGg== X-Received: by 2002:a5d:6084:0:b0:21e:41d5:21 with SMTP id w4-20020a5d6084000000b0021e41d50021mr6399652wrt.612.1658336398648; Wed, 20 Jul 2022 09:59:58 -0700 (PDT) Received: from sjg1.roam.corp.google.com ([62.48.169.138]) by smtp.gmail.com with ESMTPSA id u16-20020a05600c00d000b003a31c4f6f74sm3690906wmm.32.2022.07.20.09.59.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 09:59:57 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Alexandru Gagniuc , Anatolij Gustschin , Andrew Scull , Artem Lapkin , Ashok Reddy Soma , Bin Meng , Chris Morgan , Daniel Golle , Etienne Carriere , Heinrich Schuchardt , Huang Jianan , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Marek Vasut , Masahisa Kojima , Michal Simek , Nandor Han , Ovidiu Panait , Patrick Delaunay , Pavel Herrmann , Philippe Reynes , Ramon Fried , Roland Gaudig , Sean Anderson , Steffen Jaeckel , Thomas Huth Subject: [PATCH 00/19] vbe: Verified Boot for Embedded initial support Date: Wed, 20 Jul 2022 10:59:28 -0600 Message-Id: <20220720165947.12728-1-sjg@chromium.org> X-Mailer: git-send-email 2.37.0.170.g444d1eabd0-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean This adds the concept of a VBE method to U-Boot, along with an implementation of the 'VBE simple' method, basically a simple way of updating firmware in MMC from userspace and monitoring it from U-Boot. VBE simple is implemented in fwupd. U-Boot's role is to set up the device tree with the required firmware-update properties and provide the developer with information about the current VBE state. To that end this series includes a new 'vbe' command that allows VBE methods to be listed and examined. As part of this work, support for doing FDT fixups via the event interface is provided, along with the ability to write to the device tree via the ofnode interface. Further work is needed to pull everything together, but this is a step along the way. Simon Glass (19): video: Renname vbe.h to vesa.h video: Rename structs and functions to avoid VBE dm: core: Split out the declaration of ofnode ofnode: Add a note about how livetree updates work ofnode: Introduce support for multiple trees dm: core: Move ofnode-writing test to ofnode dm: core: Swap parameters of ofnode_write_prop() dm: core: Tidy up ofnode-writing test dm: core: Prepare for updating the device tree with ofnode ofnode: Allow writing to a flat tree dm: core: Add support for writing u32 with ofnode event: Add an event for device tree fixups read: Support sandbox bootstd: Fix comment in bootmeth test bootstd: Detect empty bootmeth ordering bootstd: Provide a bootmeth method to obtain state info vbe: Add initial support for VBE vbe: Support VBE simple vbe: Add a new vbe command arch/sandbox/dts/sandbox.dtsi | 13 ++ arch/sandbox/dts/test.dts | 15 ++ arch/x86/lib/bios.c | 12 +- arch/x86/lib/coreboot_table.c | 2 +- arch/x86/lib/fsp/fsp_graphics.c | 4 +- boot/Kconfig | 21 ++ boot/Makefile | 3 + boot/bootmeth-uclass.c | 12 + boot/bootmeth_distro.c | 14 ++ boot/image-fdt.c | 11 + boot/vbe.c | 119 ++++++++++ boot/vbe_simple.c | 304 ++++++++++++++++++++++++++ cmd/Kconfig | 10 + cmd/Makefile | 1 + cmd/elf.c | 2 +- cmd/read.c | 3 +- cmd/vbe.c | 87 ++++++++ common/event.c | 3 + doc/develop/driver-model/livetree.rst | 60 ++++- drivers/bios_emulator/atibios.c | 18 +- drivers/core/of_access.c | 57 ++++- drivers/core/ofnode.c | 81 +++---- drivers/pci/pci_rom.c | 14 +- drivers/video/broadwell_igd.c | 4 +- drivers/video/coreboot.c | 4 +- drivers/video/efi.c | 4 +- drivers/video/ivybridge_igd.c | 4 +- drivers/video/vesa.c | 4 +- include/bios_emul.h | 6 +- include/bootmeth.h | 38 +++- include/bootstd.h | 2 + include/dm/of_access.h | 22 +- include/dm/ofnode.h | 122 +++++------ include/dm/ofnode_decl.h | 85 +++++++ include/event.h | 14 ++ include/of_live.h | 16 ++ include/test/test.h | 2 + include/vbe.h | 146 ++++--------- include/vesa.h | 116 ++++++++++ lib/elf.c | 2 +- lib/of_live.c | 14 +- test/boot/Makefile | 4 + test/boot/bootflow.c | 53 +++-- test/boot/bootmeth.c | 31 ++- test/boot/vbe_simple.c | 115 ++++++++++ test/dm/ofnode.c | 132 +++++++++++ test/dm/test-fdt.c | 53 ----- test/py/tests/test_event_dump.py | 1 + test/test-main.c | 3 +- 49 files changed, 1503 insertions(+), 360 deletions(-) create mode 100644 boot/vbe.c create mode 100644 boot/vbe_simple.c create mode 100644 cmd/vbe.c create mode 100644 include/dm/ofnode_decl.h create mode 100644 include/vesa.h create mode 100644 test/boot/vbe_simple.c -- 2.37.0.170.g444d1eabd0-goog