From patchwork Tue Oct 2 11:22:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 977793 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42PdGm4SxBz9sj0 for ; Tue, 2 Oct 2018 22:08:48 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 32FFFC22108; Tue, 2 Oct 2018 11:32:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 1ACF3C220E6; Tue, 2 Oct 2018 11:24:08 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 253C8C220D3; Tue, 2 Oct 2018 11:23:16 +0000 (UTC) Received: from mail-io1-f73.google.com (mail-io1-f73.google.com [209.85.166.73]) by lists.denx.de (Postfix) with ESMTPS id 0AB62C22056 for ; Tue, 2 Oct 2018 11:23:13 +0000 (UTC) Received: by mail-io1-f73.google.com with SMTP id p22-v6so2012770ioh.7 for ; Tue, 02 Oct 2018 04:23:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=mCk6Dn715sUj6QwAqr88WKOrt3acicZNL6Z7f5wAE38=; b=KAIR6s5z29f5K1d+D8URKPWuay+0qadXG3xuOZ8nQW32r47XqiyiJQlTz04EK3zOP8 Ojw0sAEvCNeMVH+W6U7MH2RfTtmILTnNC/xvn8XDzRex55sSMRJQ2vqOIhaZSZR86RRC g/AbwEvE0RbFub7C1U+UPR1fs34oGnf5nA3Eg3sgdRTzk5aoXz+UqmyQWoDJFOI21be+ b4P1jTrSgz3ZLrWcdBE7gvxzfXiXUh8GqwymabXJ3o5yMWYyRGLw8Fe4s2GKxESvs6b4 SRrXsZdJiPXUfjt/uBecj7vtlPPIqNeYlFuUB73C5tULVypHuNW86bn6aS+n9z3XC4C9 ZH3A== X-Gm-Message-State: ABuFfohuluWxmtXURDUOPMir0Fw+gQOtyTXAV6Cq9hR8iJm7iQs5zf3g PI6ZAdXztYvSsd+X2zVN7M7GOvI= X-Google-Smtp-Source: ACcGV61m3qRIkjtmLW1qQPiGCJJY+iIE7OQ/hJs1UFkCMlHsHQwUuTtIA17idlHyTsYYJGpD9vwM6sQ= X-Received: by 2002:a24:ee43:: with SMTP id b64-v6mr1417405iti.3.1538479391925; Tue, 02 Oct 2018 04:23:11 -0700 (PDT) Date: Tue, 2 Oct 2018 05:22:30 -0600 Message-Id: <20181002112253.202931-1-sjg@chromium.org> Mime-Version: 1.0 X-Mailer: git-send-email 2.19.0.605.g01d371f741-goog From: Simon Glass To: U-Boot Mailing List Cc: Stephen Warren Subject: [U-Boot] [PATCH v2 00/23] spl: Add features for passing info from SPL to U-Boot proper X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" At present we have no standard way of passing information from SPL to U-Boot. Such information may be the size of DRAM banks or some information about the reset state of the machine,for example. This series first adds a bloblist, which allows a list of 'blobs' to be created, each with a tag so that subsystems can store data and retrieve it later. Then it adds the SPL 'handoff' information, which uses bloblist. Various minor sandbox enhancements are provided to make this easier, or to support testing. Changes in v2: - Fix several typos - Add back a blank line, and put one in the new function too - Drop the wildcard in the .lds file as it is not needed Simon Glass (23): log: Correct definition of log_msg_ret() spl: Add support for logging in SPL and TPL Add core support for a bloblist to convey data from SPL spl: Set up the bloblist in SPL bloblist: Locate bloblist in U-Boot test: Add a simple test for bloblist Add bloblist documentation spl: Support hash, input, pch, pci, rtc, tpm in SPL spl: Add a define for SPL_TPL_PROMPT spl: Make SPL_DISABLE_BANNER_PRINT a positive option spl: Add a comment to spl_set_bd() spl: Print a message if we are unable to load an image sandbox: Add a memory map to the sandbox README test/py: Add a way to pass flags to sandbox sandbox: Add an option to display of-platdata in SPL sandbox: Drop the deprecated 'sb' command sandbox: Add a new 'sb' command sandbox: Allow puts() output before global_data is set up sandbox: Refactor code to create os_jump_to_file() sandbox: Use malloc() and free() from os layer sandbox: Filter arguments when starting U-Boot sandbox: Boot in U-Boot through the standard call spl: Add support for passing handoff info to U-Boot proper arch/Kconfig | 1 + arch/powerpc/include/asm/spl.h | 3 - arch/sandbox/cpu/eth-raw-os.c | 9 +- arch/sandbox/cpu/os.c | 115 +++++++++----- arch/sandbox/cpu/spl.c | 31 +++- arch/sandbox/cpu/start.c | 19 +++ arch/sandbox/cpu/u-boot-spl.lds | 2 +- arch/sandbox/include/asm/handoff.h | 18 +++ arch/sandbox/include/asm/state.h | 8 + board/sandbox/README.sandbox | 14 +- cmd/Makefile | 1 + cmd/host.c | 5 - cmd/sb.c | 65 ++++++++ common/Kconfig | 84 +++++++++- common/Makefile | 5 +- common/bloblist.c | 239 +++++++++++++++++++++++++++++ common/board_f.c | 49 ++++++ common/console.c | 7 + common/init/Makefile | 1 + common/init/handoff.c | 47 ++++++ common/spl/Kconfig | 95 +++++++++++- common/spl/spl.c | 142 +++++++++++++---- configs/sandbox_spl_defconfig | 1 + doc/README.bloblist | 82 ++++++++++ doc/README.trace | 2 +- drivers/Makefile | 11 +- include/asm-generic/global_data.h | 7 + include/bloblist.h | 195 +++++++++++++++++++++++ include/handoff.h | 36 +++++ include/log.h | 10 +- include/spl.h | 41 +++++ include/test/suites.h | 1 + test/Makefile | 1 + test/bloblist.c | 187 ++++++++++++++++++++++ test/cmd_ut.c | 3 + test/dm/sf.c | 2 +- test/py/tests/test_fit.py | 12 +- test/py/tests/test_handoff.py | 14 ++ test/py/tests/test_ofplatdata.py | 31 +++- test/py/tests/test_vboot.py | 2 +- test/py/u_boot_console_base.py | 2 +- test/py/u_boot_console_sandbox.py | 18 +++ test/run | 2 +- 43 files changed, 1510 insertions(+), 110 deletions(-) create mode 100644 arch/sandbox/include/asm/handoff.h create mode 100644 cmd/sb.c create mode 100644 common/bloblist.c create mode 100644 common/init/handoff.c create mode 100644 doc/README.bloblist create mode 100644 include/bloblist.h create mode 100644 include/handoff.h create mode 100644 test/bloblist.c create mode 100644 test/py/tests/test_handoff.py