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 4222BC433FE for ; Tue, 11 Oct 2022 15:47:55 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BE6B784F0B; Tue, 11 Oct 2022 17:47:52 +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="f87qOrGh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2862484F0C; Tue, 11 Oct 2022 17:47:51 +0200 (CEST) Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) (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 1FE8684F00 for ; Tue, 11 Oct 2022 17:47:48 +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-io1-xd2e.google.com with SMTP id h203so3497066iof.1 for ; Tue, 11 Oct 2022 08:47:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=eg7NZ/gvF36cOS9+OajFvVi8wwVoxnQgu+EK7dzNVOc=; b=f87qOrGhU0qVZayOTG0AVB6wo4cH38tdD0T1DPAOyhQh+XGygouQEgyFye8nL71C3Z GeaJL0qCHje7gLmnX9aRGQKwKx8SVJTywHK1PytEVyskDm6ya8I0r7i299Fa+noDw99N FYUUsylKPt3DZ3Ub8JLxKAhTD4ur8vLaClhhM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=eg7NZ/gvF36cOS9+OajFvVi8wwVoxnQgu+EK7dzNVOc=; b=HSm20oDYo0x3q6uhANoe8vmricxNXvvZMmHJJ9Hucdvc8a9JrOQ0KqUEbuT+/pdgpf WifSwr5IvV6V6zSm4nZkd5puRPREAczLggFeenMoXG1a92AIblWtql5ymRhJmK/40iOZ f2kmXTWxkSVsg8hg/NALRb3lI4usNFNNtjzID+5CqU8arMTDeVO3JKAMiFk+KhrFtuO7 qRrpBH50TL03IQnmCnWDn3vW1P4M231Fv70GpkdSs2YCHvlIMLGUenlNfE1H4G+isAXc VR50uKTAtMfie8FFesbadSmbo3nWTdkbw1y73HjaBcpmcZVPaFv9dlEz7jRKQrYNmjjL uPrg== X-Gm-Message-State: ACrzQf1hVqYAqT+uBLd+0gcPFKms4z+PRwrtit+2Sz1uiA3tqG+Pzti4 wPTzWY9Ytpc0mAvsSBIbzIhuwtGjsVDtYA== X-Google-Smtp-Source: AMsMyM6KAFSMVdq1HEUo+Ua9Le3UYuS8JkiiBH3iaOwbivmWIIzpArnmNC4BY8CcMzJ3R6z2aua/Bg== X-Received: by 2002:a05:6638:3492:b0:363:b821:3831 with SMTP id t18-20020a056638349200b00363b8213831mr6038497jal.157.1665503266342; Tue, 11 Oct 2022 08:47:46 -0700 (PDT) Received: from sjg1.roam.corp.google.com (c-67-190-102-125.hsd1.co.comcast.net. [67.190.102.125]) by smtp.gmail.com with ESMTPSA id r12-20020a922a0c000000b002f9b55e7e92sm4988680ile.0.2022.10.11.08.47.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Oct 2022 08:47:45 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Simon Glass , Artem Lapkin , Daniel Golle , Heinrich Schuchardt , Jerry Van Baren , John Keeping , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Marek Vasut , =?UTF-8?q?Pali=20Roh=C3=A1r?= , Patrick Delaunay , Pavel Herrmann , Philippe Reynes , Qu Wenruo , Ramon Fried , Stefan Roese , linux-btrfs@vger.kernel.org Subject: [PATCH v2 00/14] vbe: Support device tree fixups for OS requests Date: Tue, 11 Oct 2022 09:47:06 -0600 Message-Id: <20221011154720.550320-1-sjg@chromium.org> X-Mailer: git-send-email 2.38.0.rc1.362.ged0d419d3c-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 VBE provides the ability for an OS to request that information be passed to it when it is booted. This is added into the /chosen node, in addition to things like the bootargs for Linux, for example. VBE's OS requests are intended to replace the need for the EFI 'boot-time services'. This works via a 'stub' which runs before Linux, collects the information from U-Boot, writes it to the device tree (mostly) and then jumps to Linux with the updated device tree. Rather than just jumping into Linux and waiting for it to request things from U-Boot, we can look at the requests in the FIT and process them before jumping to Linux. This is simpler and easier to test. It is also more deterministic, since we can tell whether we might lack something needed by Linux, before jumping to it. This series adds initial support for OS requests, with just a few simple ones provided. Further work will expand these out. Changes in v2: - Add new patch to update docs about oftree_from_fdt() Simon Glass (14): bootm: Change incorrect 'unsupported' error bootm: Avoid returning error codes from command bootm: Drop #ifdef from do_bootm() boot: Correct handling of addresses in boot_relocate_fdt() fs: Quieten down the filesystems more fdt: Show a message when the working FDT changes bootstd: Move VBE setup into a shared function sandbox: Support FDT fixups boot: Pass the correct FDT to the EVT_FT_FIXUP event boot: Tidy up logging and naming in vbe_simple test: Move common FIT code into a separate fit_util file vbe: Add fixups for a basic set of OS requests dm: core: Update docs about oftree_from_fdt() vbe: Add a test for VBE device tree fixups arch/sandbox/lib/bootm.c | 17 ++ boot/Makefile | 2 +- boot/bootm.c | 2 +- boot/image-fdt.c | 37 ++-- boot/vbe_fixup.c | 233 ++++++++++++++++++++++++++ boot/vbe_simple.c | 16 +- cmd/bootm.c | 25 +-- cmd/fdt.c | 1 + configs/sandbox_flattree_defconfig | 2 +- disk/part_efi.c | 15 +- doc/develop/driver-model/livetree.rst | 2 +- doc/develop/vbe.rst | 3 +- doc/usage/cmd/fdt.rst | 1 + fs/btrfs/disk-io.c | 7 +- fs/ext4/ext4_common.c | 2 +- fs/fs_internal.c | 3 +- include/dm/ofnode.h | 3 + test/boot/Makefile | 1 + test/boot/bootflow.c | 2 + test/boot/bootstd_common.c | 49 ++++++ test/boot/bootstd_common.h | 16 ++ test/boot/vbe_fixup.c | 59 +++++++ test/boot/vbe_simple.c | 34 +--- test/cmd/fdt.c | 11 +- test/py/tests/fit_util.py | 93 ++++++++++ test/py/tests/test_event_dump.py | 1 + test/py/tests/test_fit.py | 79 +-------- test/py/tests/test_vbe.py | 123 ++++++++++++++ 28 files changed, 684 insertions(+), 155 deletions(-) create mode 100644 boot/vbe_fixup.c create mode 100644 test/boot/vbe_fixup.c create mode 100644 test/py/tests/fit_util.py create mode 100644 test/py/tests/test_vbe.py -- 2.38.0.rc1.362.ged0d419d3c-goog