Message ID | 20210123173627.2916025-6-sjg@chromium.org |
---|---|
State | Superseded |
Delegated to: | Tom Rini |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=RIYL6TQo; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DNNd33TT0z9sVw for <incoming@patchwork.ozlabs.org>; Sun, 24 Jan 2021 04:37:59 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0BA3C82AAE; Sat, 23 Jan 2021 18:37:05 +0100 (CET) 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="RIYL6TQo"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E897982A7B; Sat, 23 Jan 2021 18:36:50 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) (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 C020F82799 for <u-boot@lists.denx.de>; Sat, 23 Jan 2021 18:36:47 +0100 (CET) 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-pf1-x435.google.com with SMTP id 11so5892915pfu.4 for <u-boot@lists.denx.de>; Sat, 23 Jan 2021 09:36:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wV4m6PrkWPqx79/eiB6OCuTVr+ukuzgykzXtXsVreDI=; b=RIYL6TQoXiN2ImuEzlCGDmbQhmffIvC5zINp0ZDUsNi8hRJZIkz0v4oK1pS3uvXcdx 5bUprLaNWcP352o/PkZ/kOWenzpBvgtD43KYSFpWnqPgrmSv6kG/mwkWQDkbINWfr5Jw i0kUjvNBYCweNDQMeWHjjJVYuOu6NODxdHycI= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=wV4m6PrkWPqx79/eiB6OCuTVr+ukuzgykzXtXsVreDI=; b=dcdwn+OPLQf57u/5gM+5nikG95vAuPG+ldcGd1c4g+2iR0eTfa6cQJMjahL9yIGe3z XPmPNlTzGyThIuMHiLmOjepwyuLX6HUUyv4ZcELFONDqxnd2eJ+m/Q1UYglCkMOCcq1V yjwhjgi+5tFsAAXWCa8kA0Aw/NT4jRMMFbWgcVz+DU7nrbyi5OT6filkJOlkqJu5JUjZ +gr+UF77FQYkGc1lEZKkgapCC4viF//M2TxG4zaPVVjomdslnxZy3uvTTio2Vhu5JB+z +qBNpQZCJrx3xUs/Dl4gtsYHs5J+yo6MSfPa8ZZctZp5o+j52jFbOrO7cBdR0tIR7B4M 1+WA== X-Gm-Message-State: AOAM533VS5bOMpDgtYLheR0a0cKkHV7ZxPlrUnBbgOcWcNFwJMDqUKxv mxp3q4wqhcYr3+HQStY8ZOwiF9zViWMxg6rO X-Google-Smtp-Source: ABdhPJySPW6q7J0YcWPz6K0XPAfFt8fG8krhNh2G0DRn5q0TK07204MnKASQVSZ0PYgcrUzCaFoF0g== X-Received: by 2002:a63:4563:: with SMTP id u35mr10291561pgk.162.1611423406129; Sat, 23 Jan 2021 09:36:46 -0800 (PST) Received: from sjg1.home ([2600:6c4c:507f:f8e5:0:ec6e:a61e:6ad]) by smtp.gmail.com with ESMTPSA id t8sm12408250pjm.45.2021.01.23.09.36.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Jan 2021 09:36:45 -0800 (PST) From: Simon Glass <sjg@chromium.org> To: U-Boot Mailing List <u-boot@lists.denx.de> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>, Simon Glass <sjg@chromium.org> Subject: [PATCH v2 7/8] sandbox: Write out bloblist when existing Date: Sat, 23 Jan 2021 10:36:26 -0700 Message-Id: <20210123173627.2916025-6-sjg@chromium.org> X-Mailer: git-send-email 2.30.0.280.ga3ce27912f-goog In-Reply-To: <20210123173627.2916025-1-sjg@chromium.org> References: <20210123173627.2916025-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean |
Series |
Various minor fixes
|
expand
|
diff --git a/arch/sandbox/cpu/state.c b/arch/sandbox/cpu/state.c index 4ffaf163789..f63cfd38ee4 100644 --- a/arch/sandbox/cpu/state.c +++ b/arch/sandbox/cpu/state.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <bloblist.h> #include <errno.h> #include <fdtdec.h> #include <log.h> @@ -398,8 +399,12 @@ int state_uninit(void) { int err; + log_info("Writing sandbox state\n"); state = &main_state; + /* Finish the bloblist, so that it is correct before writing memory */ + bloblist_finish(); + if (state->write_ram_buf) { err = os_write_ram_buf(state->ram_buf_fname); if (err) {
Sandbox provides a way to write out its emulated memory on exit. This makes it possible to pass a bloblist from one phase (e.g. SPL) to the next. However the bloblist is not closed off, so the checksum is generally invalid. Fix this by finishing up the bloblist before writing the memory file. Signed-off-by: Simon Glass <sjg@chromium.org> --- (no changes since v1) arch/sandbox/cpu/state.c | 5 +++++ 1 file changed, 5 insertions(+)