From patchwork Fri Jan 27 17:31:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 1732983 X-Patchwork-Delegate: xypron.glpk@gmx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=KombKlM+; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4P3PlG0XTrz23hg for ; Sat, 28 Jan 2023 04:31:52 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7FCD2856E7; Fri, 27 Jan 2023 18:31:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.b="KombKlM+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0FA3585711; Fri, 27 Jan 2023 18:31:41 +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.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from smtp-relay-canonical-0.canonical.com (smtp-relay-canonical-0.canonical.com [185.125.188.120]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3F8F585725 for ; Fri, 27 Jan 2023 18:31:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=heinrich.schuchardt@canonical.com Received: from LT2ubnt.fritz.box (ip-088-152-145-137.um26.pools.vodafone-ip.de [88.152.145.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id 3753B3F306; Fri, 27 Jan 2023 17:31:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1674840695; bh=4NazlEFIdwXmT/EbmJMN6GPuPN+JwgH/5uuf4TdBwuU=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=KombKlM+aM6n6p4iUlqDny+PC+jY+EQAn0tuE6IaKZZR2ygje/t85QaoRqUK4CFBs RQMkWCDf9EjjrGTTI14xJj0CwXAvRKyeRTAVgS3JSpX6n1zgF+KeJO3ZkUSzaADGIw IaUDI+By2pF2EO1SU16KjpSsaYURhDvOdbOLiiBkCpJFAaFKb0YXi4Ym2S4jfctI/W ShjqFTz3EE5JMUYkP1WCnV4CuVaI65LBjPi+qBD0TvctRYXqaWBkwlgyH7ZzHLKKyL NGeOITpIkcm+khv1gVrcTofCD8jwFyjuIZ02OcImInFvbMfGt3df0OI+MkR3FfBdp2 Tf36C4n2CxV0w== From: Heinrich Schuchardt To: u-boot@lists.denx.de Cc: Stefan Roese , Simon Glass , Heinrich Schuchardt Subject: [PATCH 1/1] doc: man-page for mtest Date: Fri, 27 Jan 2023 18:31:24 +0100 Message-Id: <20230127173124.30549-1-heinrich.schuchardt@canonical.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 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 Provide a man-page for the mtest command. Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- doc/usage/cmd/mtest.rst | 66 +++++++++++++++++++++++++++++++++++++++++ doc/usage/index.rst | 1 + 2 files changed, 67 insertions(+) create mode 100644 doc/usage/cmd/mtest.rst diff --git a/doc/usage/cmd/mtest.rst b/doc/usage/cmd/mtest.rst new file mode 100644 index 0000000000..b805334c61 --- /dev/null +++ b/doc/usage/cmd/mtest.rst @@ -0,0 +1,66 @@ +.. SPDX-License-Identifier: GPL-2.0+ +.. Copyright 2022, Heinrich Schuchardt + +mtest command +============= + +Synopsis +-------- + +:: + + mtest [start [end [pattern [iterations]]]] + +Description +----------- + +The *mtest* command tests the random access memory. It writes long values, reads +them back and checks for differences. The test can be interrupted with CTRL+C. + +The default test uses *pattern* as first value to be written and varies it +between memory addresses. + +An alternative test can be selected with CONFIG_SYS_ALT_MEMTEST=y. It uses +multiple hard coded bit patterns. + +With CONFIGSYS_ALT_MEMTEST_BITFLIP=y a further test is executed. It writes long +values offset by half the size of long and checks if writing to the one address +causes bit flips at the other address. + +start + start address of the memory range tested, defaults to + CONFIG_SYS_MEMTEST_START + +end + end address of the memory range tested, defaults to + CONFIG_SYS_MEMTEST_END. If CONFIGSYS_ALT_MEMTEST_BITFLIP=y, a value will + be written to this address. Otherwise it is excluded from the range. + +pattern + pattern to be written to memory. This is a 64bit value on 64bit systems + and a 32bit value on 32bit systems. It defaults to 0. The value is + ignored if CONFIG_SYS_ALT_MEMTEST=y. + +iterations + number of test repetitions. If the value is not provided the test will + not terminate automatically. Enter CTRL+C instead. + +Examples +-------- + +:: + + => mtest 1000 2000 0x55aa55aa55aa55aa 10 + Testing 00001000 ... 00002000: + Pattern AA55AA55AA55AA55 Writing... Reading... + Tested 16 iteration(s) with 0 errors. + +Configuration +------------- + +The mtest command is enabled by CONFIG_CMD_MEMTEST=y. + +Return value +------------ + +The return value $? is 0 (true) if the command succeeds, 1 (false) otherwise. diff --git a/doc/usage/index.rst b/doc/usage/index.rst index 7d4a1cbc10..5b36cda92f 100644 --- a/doc/usage/index.rst +++ b/doc/usage/index.rst @@ -63,6 +63,7 @@ Shell commands cmd/mbr cmd/md cmd/mmc + cmd/mtest cmd/part cmd/pause cmd/pinmux