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 B98D2C433EF for ; Wed, 20 Jul 2022 17:02:31 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 08C9684114; Wed, 20 Jul 2022 19:00:54 +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="f66ugjC1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1673B84079; Wed, 20 Jul 2022 19:00:35 +0200 (CEST) Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) (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 47D50839F6 for ; Wed, 20 Jul 2022 19:00:29 +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-x436.google.com with SMTP id h8so4276903wrw.1 for ; Wed, 20 Jul 2022 10:00:29 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=UXgN1tkV2qd6951qYUpkKmEC07ZOfU2YEdfpJxlzhbM=; b=f66ugjC1LAvlMPNkRF0zDlwmnXUAUoMKUUTiDsKf2c5pWNKXa8P0fO7GSpYpBNf8LS Q20H7HbPqHBRxe9+f5gBg0JqFCuoRIJ/PnZ8EeVpKR/90vgjXjoCkbqGmrzJRawtqwoi zBNg46xdCKkzCI7Nev+a71K022OxYBl7GAPv4= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=UXgN1tkV2qd6951qYUpkKmEC07ZOfU2YEdfpJxlzhbM=; b=oyvawyDVF8hcmJkVWUEDv1MwRTc3FoGAfleYbGlPC8zbbKYK4a547S90pt7CAAuNRB UU7ry5LmTYd6kbkKwMH/eXLjQ/pneSfChAo0fODbjY1IvmczfjWsHrUSIAZMEZHwOC5M PGpPdqnWkTvGFOXpLxD48cYzEx+L8mJgkBBAoDxtXfUCMphL+Yt7l1ddLEKxMtXd5+Gp rujOz2jSNcafughyUFbkUL98epXFcZkn0ZJ1r0LoXnuL4W8RG1v89U1R0Yowmi/i35kS wgi1KDy7eL5hjLzqpYbVU1fs1bYdfCLAzEtsF6sForyhVyazpVrmFocyJPXKDIHAUw6E T2Qw== X-Gm-Message-State: AJIora8PZf9kYAPMEeRUlKKf7330OcH5O4p7HoWBdeRCoWHx0rhOzAeT AkZwZnImnjwht+4bGM9yDiOiTIjch7CrWUUE X-Google-Smtp-Source: AGRyM1vr3RtfQ5UkMHDEmug+y0W1EklLw4ZRuDflrGG4Hm83k02QeacJVFhTzZcmDTRKcQRFRBHvkg== X-Received: by 2002:a5d:6f11:0:b0:21e:3fef:8dfd with SMTP id ay17-20020a5d6f11000000b0021e3fef8dfdmr6335057wrb.401.1658336428801; Wed, 20 Jul 2022 10:00:28 -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.10.00.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 10:00:28 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH 13/19] read: Support sandbox Date: Wed, 20 Jul 2022 10:59:41 -0600 Message-Id: <20220720165947.12728-12-sjg@chromium.org> X-Mailer: git-send-email 2.37.0.170.g444d1eabd0-goog In-Reply-To: <20220720165947.12728-1-sjg@chromium.org> References: <20220720165947.12728-1-sjg@chromium.org> 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 Update the 'read' command to work correctly with sandbox. Signed-off-by: Simon Glass --- cmd/read.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/read.c b/cmd/read.c index 99c7e3854e1..fecfadaa1fa 100644 --- a/cmd/read.c +++ b/cmd/read.c @@ -10,6 +10,7 @@ #include #include +#include #include int do_read(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) @@ -45,7 +46,7 @@ int do_read(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) return 1; } - addr = (void *)hextoul(argv[3], NULL); + addr = map_sysmem(hextoul(argv[3], NULL), 0); blk = hextoul(argv[4], NULL); cnt = hextoul(argv[5], NULL); -- 2.37.0.170.g444d1eabd0-goog