From patchwork Sun Feb 7 21:27:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1437263 X-Patchwork-Delegate: xypron.glpk@gmx.de Return-Path: 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=) 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=TDXgg62T; 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 4DYj186Kwnz9s1l for ; Mon, 8 Feb 2021 08:27:37 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 490B0827C5; Sun, 7 Feb 2021 22:27:21 +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="TDXgg62T"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8DD5F82731; Sun, 7 Feb 2021 22:27:16 +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.4 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-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) (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 D68E282731 for ; Sun, 7 Feb 2021 22:27:12 +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-il1-x12f.google.com with SMTP id o7so6475252ils.2 for ; Sun, 07 Feb 2021 13:27:12 -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=cBFqc4jzqDUKLViVEt1zME9unjup5fTAgxg2erqhCRc=; b=TDXgg62T3M7VKt/PdcF6gVfEGll+O97h9xTupLMLj1UbwUQF/QTbAzMNG933vQqTeZ bJXGOD4Rs2UZu8yHbsT3vsS3jRox8vOxIexfIEUL4SMB3BZDcPsvM2Qt3Du1tuejQxi0 NTvpFpfcwYMSln4rFMepY69s/APwmUUHU2g7k= 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=cBFqc4jzqDUKLViVEt1zME9unjup5fTAgxg2erqhCRc=; b=pZdFbGo5QGEjAN4MjKgX4J4uA4jw5rTL2DuGYaO3eA1JXYfIQvF7WsxtNCSUw8AAlk /48p+0Zwj8QrcqsmlEY1weBVXMCeYC7q1Xl24slbRArh2gSUaAxlfg5mMkgbX472XDhV YzYuoZOl8Rlx3EaMhoFfHwervATxNw6JbNI78/zShYtTHoe15fWLf+RMYVtIq4b98Ap7 RxCfgz1vlvvhdTMVFHO3GfH0POLC1e15xeaAEGvM5QSqqrbMMjSraZUnqJJhlyajicDT PsZcgLEOHCMKyoDprTHC8WBiTWYGxk7pxUNUxC+9gja3lB0sDJ6bKvTWzQFs/JrTGVJ5 610g== X-Gm-Message-State: AOAM531ddRnzCJkkpXXB6osyggVjGg+4t3uwavd4bYbuUlVL/XwPfVzv A0nN4zMTRbnl5fHqtqCg1VG/uhQYvh/ENaqF X-Google-Smtp-Source: ABdhPJwUz6TLx9xACFJiwmaldqiHc5DmI8raLNnIjaAoXFDZcm/PaUFgEJbiYmOLj3d6rjX5n0Aclw== X-Received: by 2002:a05:6e02:1aa9:: with SMTP id l9mr13153518ilv.108.1612733231167; Sun, 07 Feb 2021 13:27:11 -0800 (PST) Received: from localhost.localdomain (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id y11sm7641555ilv.64.2021.02.07.13.27.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Feb 2021 13:27:10 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Heinrich Schuchardt , Simon Glass , AKASHI Takahiro , Sughosh Ganu Subject: [PATCH 1/7] mkeficapsule: Correct printf() strings Date: Sun, 7 Feb 2021 14:27:01 -0700 Message-Id: <20210207212707.3958570-2-sjg@chromium.org> X-Mailer: git-send-email 2.30.0.478.g8a0d178c01-goog In-Reply-To: <20210207212707.3958570-1-sjg@chromium.org> References: <20210207212707.3958570-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean Use %z when printing size_t values. This avoids errors on 32-bit machines. Signed-off-by: Simon Glass --- tools/mkeficapsule.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/mkeficapsule.c b/tools/mkeficapsule.c index 162494907a8..ea6151989e9 100644 --- a/tools/mkeficapsule.c +++ b/tools/mkeficapsule.c @@ -278,7 +278,7 @@ static int create_fwbin(char *path, char *bin, efi_guid_t *guid, } data = malloc(bin_stat.st_size); if (!data) { - printf("cannot allocate memory: %lx\n", bin_stat.st_size); + printf("cannot allocate memory: %lx\n", (ulong)bin_stat.st_size); goto err_1; } f = fopen(path, "w"); @@ -297,7 +297,7 @@ static int create_fwbin(char *path, char *bin, efi_guid_t *guid, size = fwrite(&header, 1, sizeof(header), f); if (size < sizeof(header)) { - printf("write failed (%lx)\n", size); + printf("write failed (%zx)\n", size); goto err_3; } @@ -306,13 +306,13 @@ static int create_fwbin(char *path, char *bin, efi_guid_t *guid, capsule.payload_item_count = 1; size = fwrite(&capsule, 1, sizeof(capsule), f); if (size < (sizeof(capsule))) { - printf("write failed (%lx)\n", size); + printf("write failed (%zx)\n", size); goto err_3; } offset = sizeof(capsule) + sizeof(u64); size = fwrite(&offset, 1, sizeof(offset), f); if (size < sizeof(offset)) { - printf("write failed (%lx)\n", size); + printf("write failed (%zx)\n", size); goto err_3; } @@ -329,17 +329,17 @@ static int create_fwbin(char *path, char *bin, efi_guid_t *guid, size = fwrite(&image, 1, sizeof(image), f); if (size < sizeof(image)) { - printf("write failed (%lx)\n", size); + printf("write failed (%zx)\n", size); goto err_3; } size = fread(data, 1, bin_stat.st_size, g); if (size < bin_stat.st_size) { - printf("read failed (%lx)\n", size); + printf("read failed (%zx)\n", size); goto err_3; } size = fwrite(data, 1, bin_stat.st_size, f); if (size < bin_stat.st_size) { - printf("write failed (%lx)\n", size); + printf("write failed (%zx)\n", size); goto err_3; } From patchwork Sun Feb 7 21:27:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1437265 X-Patchwork-Delegate: xypron.glpk@gmx.de Return-Path: 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=) 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=ZNt1LBbf; 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 4DYj1L4pLbz9s1l for ; Mon, 8 Feb 2021 08:27:50 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A4E69827F6; Sun, 7 Feb 2021 22:27:27 +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="ZNt1LBbf"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 49A96827D2; Sun, 7 Feb 2021 22:27:19 +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.4 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-il1-x130.google.com (mail-il1-x130.google.com [IPv6:2607:f8b0:4864:20::130]) (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 8F5908278B for ; Sun, 7 Feb 2021 22:27:13 +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-il1-x130.google.com with SMTP id y17so10952114ili.12 for ; Sun, 07 Feb 2021 13:27:13 -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=aSfqmSRnYXAZVHqfOFGA2VTnbNn5uYxoF6Pw4kEVJkg=; b=ZNt1LBbfV3kaHQtFP9IIxcWWd6cssvhnnBSOFFcABCjqwpDdWxykqjX5ktGSwLwq5r 2FK3c/VBWLuANKBapE0GkkcA1/G6c+oUj0gbwvFKw6/rWzyt6bdJQdmwC7BE+21J89bH NA6dEaVSor503vC8n39OA3afwa1qQGHnp4RAQ= 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=aSfqmSRnYXAZVHqfOFGA2VTnbNn5uYxoF6Pw4kEVJkg=; b=PqLGA9EE40XL/jodnK52ROXFwSfVWi2IwGj7B3oRPNQ8y4dUOeuosjBTp2WS9ZkNKT D5weuAzFl6VIZ63qPg9vaaL+QrmDvAwKzf+88t/aUH2yEnnsqX7UtCWhJM/Z7n4ioMY6 mkIi2R+vf3ySuoX/+iTHZ4882iPvxHoRgmeb3XLYA3DVv6rLNx05MNcXlgNRiiJQmsxe /atgEdL5/UshOO4qFjhGhXjmq/h0VXQq7nl7/xQpRz7OMnT99avQqR5Yrdm5sc/n0UbY F0ixeysN0vDxdlQq+hebF75aJmBJaMltStREbEvH34svnIbUdHlIzth01q0LzAqXXG0w XWVw== X-Gm-Message-State: AOAM530kiAY12IhdyBaGGAPdqkuXN3z5tktysXbw56S8vvbUd4O6/wGq +d5lmTkNV0pBVA0GG3ZqS2aR4x9RdLoQJz0k X-Google-Smtp-Source: ABdhPJype1gUU+jbu26kiXTQqmPNAro/arv8mjLBBMY5H7wYXfUKX5xLnoqrw0+GZiTC0ID5OtryCA== X-Received: by 2002:a05:6e02:1b84:: with SMTP id h4mr12517242ili.196.1612733232140; Sun, 07 Feb 2021 13:27:12 -0800 (PST) Received: from localhost.localdomain (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id y11sm7641555ilv.64.2021.02.07.13.27.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Feb 2021 13:27:11 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Heinrich Schuchardt , Simon Glass , Alexander Graf Subject: [PATCH 2/7] efi: Fix compiler warnings Date: Sun, 7 Feb 2021 14:27:02 -0700 Message-Id: <20210207212707.3958570-3-sjg@chromium.org> X-Mailer: git-send-email 2.30.0.478.g8a0d178c01-goog In-Reply-To: <20210207212707.3958570-1-sjg@chromium.org> References: <20210207212707.3958570-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean This occur when building on Raspberry Pi 400 (32-bit ARM). Fix them. Examples: cmd/efidebug.c: In function ‘do_efi_capsule_update’: cmd/efidebug.c:75:49: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ret = EFI_CALL(RT->update_capsule(&capsule, 1, (u64)NULL)); ^ include/efi_loader.h:104:9: note: in definition of macro ‘EFI_CALL’ typeof(exp) _r = exp; \ ^~~ cmd/efidebug.c:75:49: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ret = EFI_CALL(RT->update_capsule(&capsule, 1, (u64)NULL)); ^ include/efi_loader.h:104:19: note: in definition of macro ‘EFI_CALL’ typeof(exp) _r = exp; \ ^~~ In file included from include/common.h:20, from lib/efi_loader/efi_capsule.c:9: lib/efi_loader/efi_capsule.c: In function ‘efi_update_capsule’: include/efi_loader.h:83:8: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 10 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=] debug("%sEFI: Entry %s(" format ")\n", __efi_nesting_inc(), \ ^~~~~~~~~~~~~~~~~~ include/linux/printk.h:37:21: note: in definition of macro ‘pr_fmt’ #define pr_fmt(fmt) fmt ^~~ include/log.h:229:2: note: in expansion of macro ‘log’ log(LOG_CATEGORY, LOGL_DEBUG, fmt, ##args); \ ^~~ include/log.h:249:2: note: in expansion of macro ‘debug_cond’ debug_cond(_DEBUG, fmt, ##args) ^~~~~~~~~~ include/efi_loader.h:83:2: note: in expansion of macro ‘debug’ debug("%sEFI: Entry %s(" format ")\n", __efi_nesting_inc(), \ ^~~~~ lib/efi_loader/efi_capsule.c:444:2: note: in expansion of macro ‘EFI_ENTRY’ EFI_ENTRY("%p, %lu, %llu\n", capsule_header_array, capsule_count, ^~~~~~~~~ lib/efi_loader/efi_capsule.c:444:19: note: format string is defined here EFI_ENTRY("%p, %lu, %llu\n", capsule_header_array, capsule_count, ~~^ %u Signed-off-by: Simon Glass Reviewed-by: Heinrich Schuchardt --- cmd/efidebug.c | 2 +- lib/efi_loader/efi_capsule.c | 4 ++-- lib/efi_loader/efi_firmware.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/efidebug.c b/cmd/efidebug.c index bbbcb0a5464..09c41c950f7 100644 --- a/cmd/efidebug.c +++ b/cmd/efidebug.c @@ -72,7 +72,7 @@ static int do_efi_capsule_update(struct cmd_tbl *cmdtp, int flag, capsule->capsule_image_size); } - ret = EFI_CALL(RT->update_capsule(&capsule, 1, (u64)NULL)); + ret = EFI_CALL(RT->update_capsule(&capsule, 1, (uintptr_t)NULL)); if (ret) { printf("Cannot handle a capsule at %p", capsule); return CMD_RET_FAILURE; diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c index 0d5a7b63ec8..1c0462ceb21 100644 --- a/lib/efi_loader/efi_capsule.c +++ b/lib/efi_loader/efi_capsule.c @@ -441,7 +441,7 @@ efi_status_t EFIAPI efi_update_capsule( unsigned int i; efi_status_t ret; - EFI_ENTRY("%p, %lu, %llu\n", capsule_header_array, capsule_count, + EFI_ENTRY("%p, %zu, %llu\n", capsule_header_array, capsule_count, scatter_gather_list); if (!capsule_count) { @@ -501,7 +501,7 @@ efi_status_t EFIAPI efi_query_capsule_caps( unsigned int i; efi_status_t ret; - EFI_ENTRY("%p, %lu, %p, %p\n", capsule_header_array, capsule_count, + EFI_ENTRY("%p, %zu, %p, %p\n", capsule_header_array, capsule_count, maximum_capsule_size, reset_type); if (!maximum_capsule_size) { diff --git a/lib/efi_loader/efi_firmware.c b/lib/efi_loader/efi_firmware.c index 5e401bbca2b..7a3cca27936 100644 --- a/lib/efi_loader/efi_firmware.c +++ b/lib/efi_loader/efi_firmware.c @@ -299,7 +299,7 @@ efi_status_t EFIAPI efi_firmware_fit_set_image( efi_status_t (*progress)(efi_uintn_t completion), u16 **abort_reason) { - EFI_ENTRY("%p %d %p %ld %p %p %p\n", this, image_index, image, + EFI_ENTRY("%p %d %p %zd %p %p %p\n", this, image_index, image, image_size, vendor_code, progress, abort_reason); if (!image || image_index != 1) @@ -414,7 +414,7 @@ efi_status_t EFIAPI efi_firmware_raw_set_image( efi_status_t status; efi_uintn_t capsule_payload_size; - EFI_ENTRY("%p %d %p %ld %p %p %p\n", this, image_index, image, + EFI_ENTRY("%p %d %p %zd %p %p %p\n", this, image_index, image, image_size, vendor_code, progress, abort_reason); if (!image) From patchwork Sun Feb 7 21:27:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1437266 X-Patchwork-Delegate: trini@ti.com Return-Path: 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=) 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=WhI1fYH0; 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 4DYj1X3922z9sVv for ; Mon, 8 Feb 2021 08:28:00 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 78B36827EA; Sun, 7 Feb 2021 22:27:30 +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="WhI1fYH0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AEC1B827EF; Sun, 7 Feb 2021 22:27:18 +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.4 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-il1-x134.google.com (mail-il1-x134.google.com [IPv6:2607:f8b0:4864:20::134]) (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 736818279C for ; Sun, 7 Feb 2021 22:27:14 +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-il1-x134.google.com with SMTP id e1so11033578ilu.0 for ; Sun, 07 Feb 2021 13:27:14 -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=5A1BQIJLj4+kJifCA+ADXNmZFJzjzwAjV/lTAMfyuis=; b=WhI1fYH0YDVNX3GFHFlCFr8v83ywCSm/aHBVkXYpoIsZLOXLAP1pdKbB1pn9KWMWhv +SaMCnJ/qTqceg5JsAhnFvSn6RKuwXCBIcb6nzuCsvkkHYKZ8tTS+tnLZSKEefiVU0zY qWtppc5WhXqvk7FjtldwFpySKq8v+z0bgJigY= 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=5A1BQIJLj4+kJifCA+ADXNmZFJzjzwAjV/lTAMfyuis=; b=LODvMH2/jGym5OsptQLX4vr/eA2E7p64kfIRAInj53Xs8FXjjyccaCLF3iuzJ6fV+S SClg7bNBP2HcIG+lV59s9sC3P6SSt9cgZZMRyFhRj1sb6Rve3CbHiWeaiicac4Yk/kEx q4yUIeO3FBfFZawL79m71WXH4cgFksu/tYtE6Y8VJ2LHEj80Dm9PHHGJXga8jliIr4JB N73HRM7q5nfxvtqxzl9NsCUc1CQTZABShh3G1XYRX4xgsYPlbhWZXMm2eyLpixXiIFdX cbS4TZL234Ce4ZNzn3HJEDp7+HNemvW6igy/PhAL+v9DThsUUAPKKnTzJ57zwsqE52GY DqrA== X-Gm-Message-State: AOAM531Z+qZkCGO3FXFYZHcsQsEK1mv7gd7RvSNONyotdwsePcWJp7vu GGkLPPYNt9hLkvX/EYIxuS+wkaLqtHDhkk4r X-Google-Smtp-Source: ABdhPJwsPhehtTQzuRXy7pHonqylgzqk+57SGI96wkV9Av+MkfwlZ8Cu6nZNorWcMYm5CiOYgnGO7g== X-Received: by 2002:a92:c5c5:: with SMTP id s5mr12942070ilt.111.1612733233120; Sun, 07 Feb 2021 13:27:13 -0800 (PST) Received: from localhost.localdomain (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id y11sm7641555ilv.64.2021.02.07.13.27.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Feb 2021 13:27:12 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Heinrich Schuchardt , Simon Glass Subject: [PATCH 3/7] pci: swap_case: Allow compilation on 32-bit machines Date: Sun, 7 Feb 2021 14:27:03 -0700 Message-Id: <20210207212707.3958570-4-sjg@chromium.org> X-Mailer: git-send-email 2.30.0.478.g8a0d178c01-goog In-Reply-To: <20210207212707.3958570-1-sjg@chromium.org> References: <20210207212707.3958570-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean At present this driver assumes that ulong is 64-bits long. On 32-bit machines it is not. Use the 64-bit code only on 64-bit machines. Signed-off-by: Simon Glass --- drivers/misc/swap_case.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/misc/swap_case.c b/drivers/misc/swap_case.c index 3cbc8f37ec5..7093ad1cd4f 100644 --- a/drivers/misc/swap_case.c +++ b/drivers/misc/swap_case.c @@ -302,7 +302,6 @@ static int sandbox_swap_case_write_io(struct udevice *dev, unsigned int addr, } static int pci_ea_bar2_magic = PCI_EA_BAR2_MAGIC; -static int pci_ea_bar4_magic = PCI_EA_BAR4_MAGIC; static int sandbox_swap_case_map_physmem(struct udevice *dev, phys_addr_t addr, unsigned long *lenp, void **ptrp) @@ -332,12 +331,22 @@ static int sandbox_swap_case_map_physmem(struct udevice *dev, *ptrp = &pci_ea_bar2_magic; *lenp = PCI_CAP_EA_SIZE_LO; break; +#ifdef CONFIG_HOST_64BIT + /* + * This cannot be work on a 32-bit machine since *lenp is ulong + * which is 32-bits, but it needs to have a 64-bit value + * assigned + */ case (phys_addr_t)((PCI_CAP_EA_BASE_HI4 << 32) | - PCI_CAP_EA_BASE_LO4): + PCI_CAP_EA_BASE_LO4): { + static int pci_ea_bar4_magic = PCI_EA_BAR4_MAGIC; + *ptrp = &pci_ea_bar4_magic; *lenp = (PCI_CAP_EA_SIZE_HI << 32) | PCI_CAP_EA_SIZE_LO; break; + } +#endif default: return -ENOENT; } From patchwork Sun Feb 7 21:27:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1437267 X-Patchwork-Delegate: trini@ti.com Return-Path: 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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) 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=UT58iCQG; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4DYj1l29qnz9s1l for ; Mon, 8 Feb 2021 08:28:11 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 70D44827FD; Sun, 7 Feb 2021 22:27:33 +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="UT58iCQG"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5896C827D2; Sun, 7 Feb 2021 22:27:20 +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.4 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-il1-x131.google.com (mail-il1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) (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 6643C82730 for ; Sun, 7 Feb 2021 22:27:15 +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-il1-x131.google.com with SMTP id y17so10952158ili.12 for ; Sun, 07 Feb 2021 13:27:15 -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=cSTPGbOhphfqZ4ZtlyWJdBvzW40YHDOvmLxdmhRDvyw=; b=UT58iCQGQx48eGCyajGrUBvjFbvUqo0Jfm8l1O9XLriDHjpc0N+S2cd+zD0MYjT6Mm U3+2x0O9h0raFfyPT256wG3OqaprVPTm8RBqwzgziFS7qeVe6NNlqq5thmoBamG8Nhlx 3He9Dnp8m6eicNy93Vku19o1vnKrWTpisiNss= 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=cSTPGbOhphfqZ4ZtlyWJdBvzW40YHDOvmLxdmhRDvyw=; b=jOdDSQz7taxnn63DAESTGIQYNSEZj220YMiAuwm9z1+/vPoTj4NaeoPGvLoUDHpIFb NiS3d/pd7zHT2rHGKoh8Ui7QY46d7Dg1a61rOcqsI4F85Ns4oa7GKYIIj45L8g+6Dgbf dlcHdxJL7DoSd3mCCZeZU9x5m7AptWiFa+1PAKHn8AP9mxErRAl6Lnj+6j9msyuoOnRm Q7Qv9qsZxf/v2kf2uerF+KHU7ZNrjGwutEFtiK/WCafFs3zz+lY3RxLmV+tAkLKt4+i6 JarIa/KYO7CPuI2beZCnwMUoRlzDMsBUu/bO5EG/mIZ5rr6SzOi2NVEVh9DwPP9/IM+1 edKA== X-Gm-Message-State: AOAM5318uz7wRpQ84FUi8lL4KhwNqnsMjaCz9g3Eqiq8ZMRyEsbMxOTC 2cclinaBOe+YOHv7j/nGBI56P0ELdq0lJC7p X-Google-Smtp-Source: ABdhPJwoqspuo7I+vsBWpmRZezaSbOBXfOLExyC0O3WV3qe4dcBkf+39b8EV9EE+KcU0jxRqrZa5AA== X-Received: by 2002:a05:6e02:b2e:: with SMTP id e14mr12488993ilu.164.1612733234012; Sun, 07 Feb 2021 13:27:14 -0800 (PST) Received: from localhost.localdomain (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id y11sm7641555ilv.64.2021.02.07.13.27.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Feb 2021 13:27:13 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Heinrich Schuchardt , Simon Glass Subject: [PATCH 4/7] tpm: Correct warning on 32-bit build Date: Sun, 7 Feb 2021 14:27:04 -0700 Message-Id: <20210207212707.3958570-5-sjg@chromium.org> X-Mailer: git-send-email 2.30.0.478.g8a0d178c01-goog In-Reply-To: <20210207212707.3958570-1-sjg@chromium.org> References: <20210207212707.3958570-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean Fix the warning: drivers/tpm/tpm2_tis_sandbox.c: In function ‘sandbox_tpm2_xfer’: drivers/tpm/tpm2_tis_sandbox.c:288:48: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=] printf("TPM2: Unmatching length, received: %ld, expected: %d\n", ~~^ %d send_size, length); ~~~~~~~~~ Signed-off-by: Simon Glass Reviewed-by: Heinrich Schuchardt --- drivers/tpm/tpm2_tis_sandbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tpm/tpm2_tis_sandbox.c b/drivers/tpm/tpm2_tis_sandbox.c index c74bacfd719..24c804a5645 100644 --- a/drivers/tpm/tpm2_tis_sandbox.c +++ b/drivers/tpm/tpm2_tis_sandbox.c @@ -285,7 +285,7 @@ static int sandbox_tpm2_xfer(struct udevice *dev, const u8 *sendbuf, length = get_unaligned_be32(sent); sent += sizeof(length); if (length != send_size) { - printf("TPM2: Unmatching length, received: %ld, expected: %d\n", + printf("TPM2: Unmatching length, received: %zd, expected: %d\n", send_size, length); rc = TPM2_RC_SIZE; sandbox_tpm2_fill_buf(recv, recv_len, tag, rc); From patchwork Sun Feb 7 21:27:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1437268 X-Patchwork-Delegate: trini@ti.com Return-Path: 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=) 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=T4t+F4C8; 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 4DYj1w3FyJz9sVv for ; Mon, 8 Feb 2021 08:28:20 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AED958280F; Sun, 7 Feb 2021 22:27:35 +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="T4t+F4C8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DB1538279C; Sun, 7 Feb 2021 22:27:20 +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.4 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-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) (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 50EDB827C5 for ; Sun, 7 Feb 2021 22:27:16 +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-io1-xd29.google.com with SMTP id q7so13065446iob.0 for ; Sun, 07 Feb 2021 13:27:16 -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=ZOAVov5icyH28OgP/W/cGxWmo3aO8DGP5QGglQtr1zU=; b=T4t+F4C843RenoJdJBKdWjVrDudwT1c+JmBEiH1TFxDH/pbNsIzT8xmBEtHVNrYzk2 9Cxw50Amt2hzQfLKtaBtsB9LviypPRSDPOoUDAvGqwDea2MP6M+X6d2ORAfDuXYeDHg7 x8zQyKzxpb9XK09UQjZ2SzryP91x8C6dr2jNk= 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=ZOAVov5icyH28OgP/W/cGxWmo3aO8DGP5QGglQtr1zU=; b=HGwVnnieIPSlyy2xxzLPN+yHt8eyf+dO+NV8UuMz/TfHKdRyxQgcIHdRiSROMmX7Zy cX7RaWpERnUE+kTUyTPpY/6gm3NWVfLKfOe330rPl+qlbxWDlZv3ETh1ShF1GlTpYLr0 13py0O8efds8aajS2ZBgObX835kk7YPbQq7qC0ll1uMf+dq1XmSxL3Dw8RpZ4hCwjkK4 zPzvA/LYrd32+WDthIz2zYYFCpKbO2RDM5fyOtyJ8AgabuYEBNVQrqxeS0rVdK3Rinx+ yCD+H1/5QKX2PfjjK9JRUxlQhQOAkgmM6RLnAj5BNu9pYTTeBe8YJ/UQ6rUSUZGzNucR QUWA== X-Gm-Message-State: AOAM53101fEn0bxeg3TpUAAUrp26SESjd381i/hZmKIJclTKZq/qBkRY XFvbS3E6kGL04Ks6IPYiOmWgTKpuL6VOtRnx X-Google-Smtp-Source: ABdhPJzgBacD8z9JmOEXta+0UY5S1lw53TLGzMfKTrEYYiTfi2AfOgtaouj1sIZOHfw4L6t6IKAHJw== X-Received: by 2002:a02:7419:: with SMTP id o25mr14652832jac.100.1612733234909; Sun, 07 Feb 2021 13:27:14 -0800 (PST) Received: from localhost.localdomain (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id y11sm7641555ilv.64.2021.02.07.13.27.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Feb 2021 13:27:14 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Heinrich Schuchardt , Simon Glass Subject: [PATCH 5/7] test: acpi: Fix warnings on 32-bit build Date: Sun, 7 Feb 2021 14:27:05 -0700 Message-Id: <20210207212707.3958570-6-sjg@chromium.org> X-Mailer: git-send-email 2.30.0.478.g8a0d178c01-goog In-Reply-To: <20210207212707.3958570-1-sjg@chromium.org> References: <20210207212707.3958570-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean Some format strings use the wrong type. Fix them. Example warnings: In file included from test/dm/acpi.c:22: test/dm/acpi.c: In function ‘dm_test_acpi_cmd_list’: test/dm/acpi.c:362:21: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Wformat=] ut_assert_nextline("RSDP %08lx %06lx (v02 U-BOOT)", addr, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sizeof(struct acpi_rsdp)); ~~~~~~~~~~~~~~~~~~~~~~~~ include/test/ut.h:282:33: note: in definition of macro ‘ut_assert_nextline’ if (ut_check_console_line(uts, fmt, ##args)) { \ ^~~ Signed-off-by: Simon Glass --- test/dm/acpi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/dm/acpi.c b/test/dm/acpi.c index e0a323ecd40..9dc9950eddc 100644 --- a/test/dm/acpi.c +++ b/test/dm/acpi.c @@ -359,24 +359,24 @@ static int dm_test_acpi_cmd_list(struct unit_test_state *uts) run_command("acpi list", 0); addr = (ulong)map_to_sysmem(buf); ut_assert_nextline("ACPI tables start at %lx", addr); - ut_assert_nextline("RSDP %08lx %06lx (v02 U-BOOT)", addr, + ut_assert_nextline("RSDP %08lx %06zx (v02 U-BOOT)", addr, sizeof(struct acpi_rsdp)); addr = ALIGN(addr + sizeof(struct acpi_rsdp), 16); - ut_assert_nextline("RSDT %08lx %06lx (v01 U-BOOT U-BOOTBL %x INTL 0)", + ut_assert_nextline("RSDT %08lx %06zx (v01 U-BOOT U-BOOTBL %x INTL 0)", addr, sizeof(struct acpi_table_header) + 3 * sizeof(u32), U_BOOT_BUILD_DATE); addr = ALIGN(addr + sizeof(struct acpi_rsdt), 16); - ut_assert_nextline("XSDT %08lx %06lx (v01 U-BOOT U-BOOTBL %x INTL 0)", + ut_assert_nextline("XSDT %08lx %06zx (v01 U-BOOT U-BOOTBL %x INTL 0)", addr, sizeof(struct acpi_table_header) + 3 * sizeof(u64), U_BOOT_BUILD_DATE); addr = ALIGN(addr + sizeof(struct acpi_xsdt), 64); - ut_assert_nextline("DMAR %08lx %06lx (v01 U-BOOT U-BOOTBL %x INTL 0)", + ut_assert_nextline("DMAR %08lx %06zx (v01 U-BOOT U-BOOTBL %x INTL 0)", addr, sizeof(struct acpi_dmar), U_BOOT_BUILD_DATE); addr = ALIGN(addr + sizeof(struct acpi_dmar), 16); - ut_assert_nextline("DMAR %08lx %06lx (v01 U-BOOT U-BOOTBL %x INTL 0)", + ut_assert_nextline("DMAR %08lx %06zx (v01 U-BOOT U-BOOTBL %x INTL 0)", addr, sizeof(struct acpi_dmar), U_BOOT_BUILD_DATE); addr = ALIGN(addr + sizeof(struct acpi_dmar), 16); - ut_assert_nextline("DMAR %08lx %06lx (v01 U-BOOT U-BOOTBL %x INTL 0)", + ut_assert_nextline("DMAR %08lx %06zx (v01 U-BOOT U-BOOTBL %x INTL 0)", addr, sizeof(struct acpi_dmar), U_BOOT_BUILD_DATE); ut_assert_console_end(); From patchwork Sun Feb 7 21:27:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1437270 X-Patchwork-Delegate: xypron.glpk@gmx.de Return-Path: 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=) 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=fksr7Skt; 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 4DYj2H2zfGz9s1l for ; Mon, 8 Feb 2021 08:28:39 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 04B6382838; Sun, 7 Feb 2021 22:27:44 +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="fksr7Skt"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 94330827F6; Sun, 7 Feb 2021 22:27:23 +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.4 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-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) (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 5BF6582731 for ; Sun, 7 Feb 2021 22:27:17 +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-il1-x136.google.com with SMTP id e1so11033632ilu.0 for ; Sun, 07 Feb 2021 13:27:17 -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=nHJ3fXTacUP0m0RNJaTm8jQXgpNqESEt//VVnujHcdQ=; b=fksr7SktqWWcM8M3dPMfzB0P1Fi3SoYcH4YB2eXcfw/baXymC7+d84WiA2gV0SazNb ElR1C3R7t6rNXMcfCq6DyVe8xlB/BAMUJ7l17NxcPg65lRPp3V0uY9XuMLqu1H+jSgB5 CaDrBA/n4mMs/OL1J0hWFNXnc3y7MwYJN+6Zo= 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=nHJ3fXTacUP0m0RNJaTm8jQXgpNqESEt//VVnujHcdQ=; b=Xbu7WSylWfAX3YA9zY/zHES5UbpQNTIRBffGX/3c7nom+LasbUnhFjK1Dgvy+QyG8o F1z2Hosk/731DgnQk9+JAt/bbJ4BD8m1rwVROV4K2HkZRpdi4ErUsL4qNDd+KiwFtK/h jb9VeiqEbejrAScGqj/faw/PVeGcLti3hVoJ7/RhgDRn2SmRsPzAgFSdVN3SyXxRSgsM jWCunjqEtwF2EY1oaugxJKZdTmMP/VqOniaYJcATN0+XNbwLqY7Xk0NCKrbz+0608lAU eUeaYZxQXpkaCZzIwVoionaIa6MohjFLi12WBhs6BWvvYh3VS6AxK+vBeT4AKgHKuntr n/6g== X-Gm-Message-State: AOAM5321LZgPipOD4iWiGbUpCqx7VBhgqPGyys5edDjXvw0kxbPgLnC8 V51sx4WhjTQfg6jAoungF2ssFgQ7cEpVt9a0 X-Google-Smtp-Source: ABdhPJzaBYA3scjksWgB7rqybWKnvPkas6+yDU5ptgPOuvizC5igLn62rlmGkz34Ie8WK2U3FEjbbQ== X-Received: by 2002:a05:6e02:1407:: with SMTP id n7mr12717891ilo.242.1612733235934; Sun, 07 Feb 2021 13:27:15 -0800 (PST) Received: from localhost.localdomain (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id y11sm7641555ilv.64.2021.02.07.13.27.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Feb 2021 13:27:15 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Heinrich Schuchardt , Simon Glass Subject: [PATCH 6/7] doc: sandbox: Fix up dependencies Date: Sun, 7 Feb 2021 14:27:06 -0700 Message-Id: <20210207212707.3958570-7-sjg@chromium.org> X-Mailer: git-send-email 2.30.0.478.g8a0d178c01-goog In-Reply-To: <20210207212707.3958570-1-sjg@chromium.org> References: <20210207212707.3958570-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean These are out of date. Update them and point to the existing build instructions to avoid duplication. Signed-off-by: Simon Glass --- doc/arch/sandbox.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/arch/sandbox.rst b/doc/arch/sandbox.rst index 60ee1e0741a..61b5872e274 100644 --- a/doc/arch/sandbox.rst +++ b/doc/arch/sandbox.rst @@ -37,11 +37,12 @@ Note that standalone/API support is not available at present. Prerequisites ------------- -Here are some packages that are worth installing if you are doing sandbox or -tools development in U-Boot: +First install the dependencies noted in :doc:`../build/gcc`. - python3-pytest lzma lzma-alone lz4 python3 python3-virtualenv - libssl1.0-dev +Here are some extra packages that are worth installing if you are doing sandbox +or tools development in U-Boot: + + lzma lz4 python3-virtualenv Basic Operation From patchwork Sun Feb 7 21:27:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1437269 X-Patchwork-Delegate: trini@ti.com Return-Path: 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=) 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=HeSYxfAd; 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 4DYj265Wrbz9s1l for ; Mon, 8 Feb 2021 08:28:30 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 19BA98282D; Sun, 7 Feb 2021 22:27:38 +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="HeSYxfAd"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C49CD827E3; Sun, 7 Feb 2021 22:27:23 +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.4 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-io1-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) (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 4E0F3827EA for ; Sun, 7 Feb 2021 22:27:18 +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-io1-xd31.google.com with SMTP id n2so13011952iom.7 for ; Sun, 07 Feb 2021 13:27:18 -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=7AkGgXIXpBWk6wC9+gcT+SUeS/gxIIliZD954Qz0g+g=; b=HeSYxfAdDEc/s+xxfGcA0nRbu9DGTAxkyqi9msMn3aCTyEkwchvrvwK0bzG4N/6yVL 0Q4xmmRbkXtV8dJarDFL7OrM6Phe81iE0v4mDURIzRnJn2FNK1kG4VIHc6+B5KCRyZ5w LUJ0DWshyB4MFiAKkW+7eu1EDCFy/dvFRZGnw= 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=7AkGgXIXpBWk6wC9+gcT+SUeS/gxIIliZD954Qz0g+g=; b=i1dTAU8Uds2htz3DVdpj/NilnpjOJtTQcSnUggh/zQVtO3qfeALgRCuP+Gbh4dldT+ U64ib2m76SSdWKdkHTDGr8Y0ja66gqt3u+qhwPI/3Y8//NndsK9hNLZaZgCOoPyK6UpD FybKk9NlGXwLdRyA9AvrE1T5BYhcrZ28LeYVpkGNiszhtqdFqE+TWIVmpwkRkI1v7v7x JfAumIW+NkxKegejhK1oIqc8WMcVJ2cOBlgtWf1BDaHEdC0idtoKTExYn2sJ1yoxyQbz 4fXBsJfgU+M5DIWfFMVpC9JlwWgGqzR4Jqh7s5hKdnaLGZx7sWhe7FhB4xKruoTYiNGb V/Aw== X-Gm-Message-State: AOAM532xB/d+uOD4qr/WRZWgxSpHWqJzPReixOBVf6LC3inXQAM8ff8W Ypd8JSDF+jxZMX4XpYRGkakk5nobs5m5eH+J X-Google-Smtp-Source: ABdhPJx/YNUXp5wi1/00URO0Qa7aBsO0LBozV/eCM09ZFxYmdvih60QXkMstPLKcz9yMhMyiKq10ng== X-Received: by 2002:a05:6638:a1b:: with SMTP id 27mr14817778jan.144.1612733236946; Sun, 07 Feb 2021 13:27:16 -0800 (PST) Received: from localhost.localdomain (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id y11sm7641555ilv.64.2021.02.07.13.27.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Feb 2021 13:27:16 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Heinrich Schuchardt , Simon Glass Subject: [PATCH 7/7] doc: sandbox: Update instructions on quitting Date: Sun, 7 Feb 2021 14:27:07 -0700 Message-Id: <20210207212707.3958570-8-sjg@chromium.org> X-Mailer: git-send-email 2.30.0.478.g8a0d178c01-goog In-Reply-To: <20210207212707.3958570-1-sjg@chromium.org> References: <20210207212707.3958570-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean The 'reset' command now resets sandbox but does not quit it. Fix the instructions. Fixes: 329dccc0675 ("sandbox: implement reset") Signed-off-by: Simon Glass --- doc/arch/sandbox.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/arch/sandbox.rst b/doc/arch/sandbox.rst index 61b5872e274..59929319026 100644 --- a/doc/arch/sandbox.rst +++ b/doc/arch/sandbox.rst @@ -77,7 +77,7 @@ console:: You can issue commands as your would normally. If the command you want is not supported you can add it to include/configs/sandbox.h. -To exit, type 'reset' or press Ctrl-C. +To exit, type 'poweroff' or press Ctrl-C. Console / LCD support