From patchwork Thu Jan 2 10:58:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 854649 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp7715927wrq; Thu, 2 Jan 2025 03:00:22 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCU7vaOrBGpxMJxediiANdh0UCwy8D18Zt/LAFxCQb0tRwZc+XOjhzbWGv0MkCzX/8Kiwx7wsw==@linaro.org X-Google-Smtp-Source: AGHT+IE/YlG8I3mHJY9Xrr9GPBFzkIcmoXkpVgnwOsu/f9izx6Aty/QzlMI48mZiAUoXkjR3Qgjm X-Received: by 2002:a05:620a:4688:b0:7b8:53dc:58fd with SMTP id af79cd13be357-7b9bac73a14mr7202282085a.13.1735815622647; Thu, 02 Jan 2025 03:00:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1735815622; cv=none; d=google.com; s=arc-20240605; b=faUNKX+RlwfAe/cZQDn32esJTgAY1VeIBuj4Q1iFAmAXD6WVUC93hYxbarNYYi0G2v ytjIT98gVrCasXRUOZPlHiwQpCMhaFvrXw5WUJeJEWIabmiUEdvFYFXT1KNvTVe7rapJ Io0kgRikqijJSI+XcL80WHHPA96HWCcJvL/FDrsgOiImuRCCzVxnuBoP6gUmdl84cC+c 5BjAa+WI8A025l8pKAY8FOqQBJIqZ9yOtLVhBgc3u2129avE9riAoU0hz6Lia7HKWsSY ljsmXLyTQ+M2zHXNLUo/WEXyZzfZl/KG2ngmMB/eobmixeX1T4bmTo+AbRoLq40haQVF d0Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zX7tyC+IoyNuHMxTftdexw4ZA/q9//BvhZNltMexCoQ=; fh=6u5IHTDZ/iti019H2iRBSitBodweBjprxFJ3kMKpc7U=; b=LdXTd4wNstCvRxFgmc/g5Ksb+n4JyqPffxOI5OKff07FworDcleKgzVBrqFlEokZNN oTGIsE9QfMjCuoSGWsMO533Qsa/XsqBJdBfp47h6SNmGQ3LukaCXM+BrY1ebwOHGGr9M b1sbqFCtrWZ71qmC9J2i1Oew9PR6RuLrwtruXEATp48EgQ5ozO9WMLMMZeiB/GJcK5Dh wZnQLkt2AzM4ujzTiaTSIocIAc9vqKQDHA9WeMbpXyTU0FjSjbQd8wRgbEWFWsAizkjf x9ZQBSx98vxKwqpeEl1xlaTRCHC3xIzLZsrIr9TDrziiqF6HtyVW4I11GKF8jmtMiBFX S5bg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xPYNw20s; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b9ac4ccc61si3344083485a.381.2025.01.02.03.00.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Jan 2025 03:00:22 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xPYNw20s; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTIuU-0005Dw-35; Thu, 02 Jan 2025 05:58:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tTIuR-0005DU-Gy for qemu-devel@nongnu.org; Thu, 02 Jan 2025 05:58:35 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tTIuQ-0000Mk-0V for qemu-devel@nongnu.org; Thu, 02 Jan 2025 05:58:35 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-436202dd7f6so127607045e9.0 for ; Thu, 02 Jan 2025 02:58:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735815512; x=1736420312; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zX7tyC+IoyNuHMxTftdexw4ZA/q9//BvhZNltMexCoQ=; b=xPYNw20s+MGDHaFG6UvUVaiZ3FBoKWKb0lchbwKENNyZ7kUK8uAXBC4GTrdlltWBLe xWCH0PkRLnOFwZpcuZ/3FDGfZjS9RsOemguvsWqD1ulddmkzHf350D1WQYuVoCgPrt+z j5NTs5piZQjkQEDghc5e77HTfMbN+YT/28kIMlta+o2RpfnZpNrHXHMtYTUVW1LL9MS/ GJufMuE0lq9KSL3EGfv7CoBpH3s8k62lMDaXsb5m/QjmSoonHxDWMaqOjFY7N9lbxH8I SAAhXbMx6IT/Vdh7D9y/PhFZl/wHdFh0TvrTsa/ux7K4fEDX1bi6H4awLV8YtCVv9xSL hOYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735815512; x=1736420312; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zX7tyC+IoyNuHMxTftdexw4ZA/q9//BvhZNltMexCoQ=; b=hmQaNPsevSWPtJMsNNvOnPuCWRLRAa+E+QfmHdBpFAbeVbbEtGM6f/2sCIJyq9jBMs rGyCVBmLc2TVCnr8VubXSzxRCiDA8/TYGf6yC073w0I6FZUynp19GxLqHzsZ2FjGZdrJ P3Mz87+9+hwC/ergf4nGiQng8A0CtzoS8g+K22Cb4EUisFxH0ZkX8slAGRM/IGjVTCU6 CUf0vEGW9Wa9wNSup43PogfL12H34iP8Ycu2nellQlYzbfPGE2oVAFHafCwf+IdzYV+7 R43oaPFbjen+2a19XX0xu1zNWmvlstzAYSFEHRxlKvXrgfnsE27vxPQX+V0mpKBXzl/T 1bSQ== X-Gm-Message-State: AOJu0YxDHc+87MWCxez+5JWUTgcYdoBrOe2MIi9gV6doG5gLS/u7fEvd 1ji0StkJ71f88mtouKt13xRkAEnlxd2Fuy5U8ziVY2wA5EMx6vvyL3cVTPmMVDnHpFlN5L2ZSE9 k8paaSA== X-Gm-Gg: ASbGncvcG4Hi2efA5wDfsR35pMt3DvVQcR+P4gjdgto2xUHa/BJhm2E6dmtRPXXrAH6 dXRsxfZnXT7aszGgQMkd1kxrjeh5zLCks/E/xlxdwfSeBGE3ema2hQAQbyP1hB/8DsU03/aPbBC KawB+JVzxDP/61Ub9BMWOMHITSVKKy1WQx9LGqGonjGAPKM2ALTJOvnd9WEmckPJGQlwNx+MIAp Ss4yhnGNgEabgPtft6mgZi2vpMFO3BIX4aXoz8TNd9w8jPcmjWQxPkZrf5pfrmlMjpjYv/Nwd0A p5rkrC72p2Lkx9jIcWVLX97mGTNBRw9dkXZwT1f21MCR7Q== X-Received: by 2002:a05:600c:468a:b0:436:1b96:7072 with SMTP id 5b1f17b1804b1-4366854c062mr380870555e9.5.1735815512299; Thu, 02 Jan 2025 02:58:32 -0800 (PST) Received: from localhost.localdomain (161.red-88-29-191.dynamicip.rima-tde.net. [88.29.191.161]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4366128a62asm444588155e9.44.2025.01.02.02.58.30 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 02 Jan 2025 02:58:31 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Fabiano Rosas , =?utf-8?q?Alex_Benn=C3=A9e?= , Paolo Bonzini , Laurent Vivier , Peter Maydell , qemu-arm@nongnu.org, =?utf-8?q?Ph?= =?utf-8?q?ilippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v6 1/4] tests/qtest/boot-serial-test: Improve ASM comments of PL011 tests Date: Thu, 2 Jan 2025 11:58:19 +0100 Message-ID: <20250102105822.43532-2-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250102105822.43532-1-philmd@linaro.org> References: <20250102105822.43532-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Re-indent ASM comments adding the 'loop:' label. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Fabiano Rosas --- tests/qtest/boot-serial-test.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/qtest/boot-serial-test.c b/tests/qtest/boot-serial-test.c index 3b92fa5d506..a71d2857807 100644 --- a/tests/qtest/boot-serial-test.c +++ b/tests/qtest/boot-serial-test.c @@ -70,18 +70,18 @@ static const uint8_t kernel_plml605[] = { }; static const uint8_t bios_raspi2[] = { - 0x08, 0x30, 0x9f, 0xe5, /* ldr r3,[pc,#8] Get base */ - 0x54, 0x20, 0xa0, 0xe3, /* mov r2,#'T' */ - 0x00, 0x20, 0xc3, 0xe5, /* strb r2,[r3] */ - 0xfb, 0xff, 0xff, 0xea, /* b loop */ - 0x00, 0x10, 0x20, 0x3f, /* 0x3f201000 = UART0 base addr */ + 0x08, 0x30, 0x9f, 0xe5, /* loop: ldr r3, [pc, #8] Get &UART0 */ + 0x54, 0x20, 0xa0, 0xe3, /* mov r2, #'T' */ + 0x00, 0x20, 0xc3, 0xe5, /* strb r2, [r3] *TXDAT = 'T' */ + 0xfb, 0xff, 0xff, 0xea, /* b -12 (loop) */ + 0x00, 0x10, 0x20, 0x3f, /* UART0: 0x3f201000 */ }; static const uint8_t kernel_aarch64[] = { - 0x81, 0x0a, 0x80, 0x52, /* mov w1, #0x54 */ - 0x02, 0x20, 0xa1, 0xd2, /* mov x2, #0x9000000 */ - 0x41, 0x00, 0x00, 0x39, /* strb w1, [x2] */ - 0xfd, 0xff, 0xff, 0x17, /* b -12 (loop) */ + 0x81, 0x0a, 0x80, 0x52, /* loop: mov w1, #'T' */ + 0x02, 0x20, 0xa1, 0xd2, /* mov x2, #0x9000000 Load UART0 */ + 0x41, 0x00, 0x00, 0x39, /* strb w1, [x2] *TXDAT = 'T' */ + 0xfd, 0xff, 0xff, 0x17, /* b -12 (loop) */ }; static const uint8_t kernel_nrf51[] = { From patchwork Thu Jan 2 10:58:20 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 854647 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp7715915wrq; Thu, 2 Jan 2025 03:00:21 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVzFggb8Eoat1u7boWtjbfTzpxn7kSuMui7qUcvpuGcKB6cWDZ+kx904vj78L1r1IcyLsnz0A==@linaro.org X-Google-Smtp-Source: AGHT+IFp6iIwaVYx32P29X/IuvDuD3lRK+VGeDLcvA7pEH8MuMeHOyLC8qTcMSpkrVNvcrxzLMGm X-Received: by 2002:a05:6214:29cd:b0:6d8:8f3d:4d82 with SMTP id 6a1803df08f44-6dd233a2b9amr675756836d6.46.1735815621500; Thu, 02 Jan 2025 03:00:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1735815621; cv=none; d=google.com; s=arc-20240605; b=H0V0ikgma1nDEB3hIPNSMxZ0rrXVR8yFfZInmhoCbVwUj6jLnhcm0I6ImmXotf/rbO bHL80bCRunom7LOGgWfF2r73sJe8pQ3Tnc73FOnhwWqSGvYyN+0+MGwZux33o39JMCc2 NYgNLt7GA3PrgaklEUDPpdQiO42j4LKikXqfC+l3z+/k8OXSoSIv5og3JQw2sBasZAKm ATACJ2HQyDG3SRduHdMAhYlPquJm/juSHtBMXVMIEuHhX/70zHXpZlylELG1prqXO1zP gKFaGCrYkmN6fdJDcDdio3CHC+Xx1bDTB7oof/sp8Xpll9fhMyd4UjRMi8l0K8IvHhLP 9Zlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BHcoHA/RQIZe+ped96wKcqmPBxHPHj0rhc9qRvCdUxE=; fh=6u5IHTDZ/iti019H2iRBSitBodweBjprxFJ3kMKpc7U=; b=D7WONVAEy8HWWMaNbWX6/ZPBHRdsnMy3seZls74LNKNPzfaLCKyeI3zXDRdlPDp8b7 XT+jzW12GUwD+w6io8/ZKF0yFza0xsc/e/4XG9f6i2yk46Se+IEeaxpXDuTbnacwljqf Qh3spF8MUE0c52OKGRJXZ+E4FPp5uD3ZZZHaGeSHPKc4Jci15n04cGPtfQqn/LoHog41 +teQ4KPQeWg7p4yUCuVmiaC2ey485MWQtS5q008D/55LAW4boGZrr4KYVVVE71hqUGr1 /NF4IhQNejpqrjFeGhd8yadjcZtns9pwSZIYhG119aE2VdZQA6wGlSoIwlocqeIHdueW r46Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dn7lKPvy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6dd2b7e2507si323658146d6.139.2025.01.02.03.00.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Jan 2025 03:00:21 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dn7lKPvy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTIua-0005FM-7t; Thu, 02 Jan 2025 05:58:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tTIuX-0005Ec-84 for qemu-devel@nongnu.org; Thu, 02 Jan 2025 05:58:41 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tTIuV-0000NR-QB for qemu-devel@nongnu.org; Thu, 02 Jan 2025 05:58:41 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4361b6f9faeso67990505e9.1 for ; Thu, 02 Jan 2025 02:58:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735815518; x=1736420318; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BHcoHA/RQIZe+ped96wKcqmPBxHPHj0rhc9qRvCdUxE=; b=dn7lKPvymV07NQcU+g889w3jGEWrZV1+WydbxyZW9/sLCodrAJE2uiEXpuKGEYQKdt /fGsPTYqh/Cek4CoYfqsr959oOxPAOPJZcrvO2TYGQFVeVPntOiUGLtGteTADKmiDQfW YLmkwj3Sl20d0MwnQJYRsSr2wkkDGJsLee6rEo19FadkGmzFCpPzmx3ADPewk82auH0y VvSEbEZasNq+7w8QVaOSDuDs+1UqobrkdWr+ezBkjyvWGVEBySIla02cYG/YXLw53+QM BsgbXmjc0R5b+SW5iCmzoG31VkkK+JGikrnrPRMJINKWWCMs/MdQC2qYfIyDq5YU28Wj +b0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735815518; x=1736420318; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BHcoHA/RQIZe+ped96wKcqmPBxHPHj0rhc9qRvCdUxE=; b=wM3+1wm5eC+fwrQdMNZPvQQZ8KbVlFY+qJwfK6ILSeNvbkmWkzPKAopZk/ngc+PxSi i7ysyGS9OKopJ/QjXQFQcMp80wCMOL36VFl6z33Rc3YC3zK5Xo/CzxZBYsZYK7ZKpqZn r0r7exwpKwkdWP9d6vEt27PFNpe/ipfFUSVTIZ81EhnHNwpkZinW12hCdE1firyRHdyT dSLuydbWLBHTBvtAE3Sr3yaj8FuKiT2EOFigTju/aZrKCsQsiEU/dWRPbNukZN6XrKVE SxNIus2nu9/iuYFkNw32C5ZmI5aa2jQiMXZwRbfdIxcRTpYshqo3x5yw/eYZibXztE+Z Xrjg== X-Gm-Message-State: AOJu0YyX4hSM8bjjA+6ZslkH6+wtb9bSsWcMY/JXtqy4KBYYSQghL3Yo lsR+06271WLzdFfQ1MqWGz5O2M2ikXCBwKpPxrUZBayLAuJtLm+VxRvHKgc1mZ7b3+YonXq082e Z5EOIcA== X-Gm-Gg: ASbGncuDxqn+0ErVXaccPUSjd9lFqbrXpMbZJZfYm/hJeopVPgeaGBitm06AQ/cZiBn u47bhvk4DrhjDXA6c7M2Cc4/EoQQe88JaA0SMWh9kwRsrcejM+xZsnnUXqIOs2M2ZvItrtszCbp Pthb9MFWbB0ySrfi7QVUaMqIZqP3UWPEbxx40/zoZPQCUdvJNXKP0n3ZX2bHxp7+WiBIkE34Eow kSenQOdk6+IGnJA4wG6U7KO0SrqgQB+fTm/IhTgBNtL9nKe+Skp8RgDLJRWKgPJm9R1IxahpDUg oosOFbPi+yvUp1+bpaCAFsOJ+ayUBj91QBn52rVQkcGYwg== X-Received: by 2002:a05:600c:5850:b0:436:1b0b:2633 with SMTP id 5b1f17b1804b1-436699ffa24mr342304835e9.9.1735815517971; Thu, 02 Jan 2025 02:58:37 -0800 (PST) Received: from localhost.localdomain (161.red-88-29-191.dynamicip.rima-tde.net. [88.29.191.161]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656b3b2afsm493916515e9.35.2025.01.02.02.58.36 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 02 Jan 2025 02:58:37 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Fabiano Rosas , =?utf-8?q?Alex_Benn=C3=A9e?= , Paolo Bonzini , Laurent Vivier , Peter Maydell , qemu-arm@nongnu.org, =?utf-8?q?Ph?= =?utf-8?q?ilippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v6 2/4] tests/qtest/boot-serial-test: Reduce for() loop in PL011 tests Date: Thu, 2 Jan 2025 11:58:20 +0100 Message-ID: <20250102105822.43532-3-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250102105822.43532-1-philmd@linaro.org> References: <20250102105822.43532-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Since registers are not modified, we don't need to refill their values. Directly jump to the previous store instruction to keep filling the TXDAT register. The equivalent C code remains: while (true) { *UART_DATA = 'T'; } Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Fabiano Rosas --- tests/qtest/boot-serial-test.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/qtest/boot-serial-test.c b/tests/qtest/boot-serial-test.c index a71d2857807..553575ca75c 100644 --- a/tests/qtest/boot-serial-test.c +++ b/tests/qtest/boot-serial-test.c @@ -70,18 +70,18 @@ static const uint8_t kernel_plml605[] = { }; static const uint8_t bios_raspi2[] = { - 0x08, 0x30, 0x9f, 0xe5, /* loop: ldr r3, [pc, #8] Get &UART0 */ + 0x08, 0x30, 0x9f, 0xe5, /* ldr r3, [pc, #8] Get &UART0 */ 0x54, 0x20, 0xa0, 0xe3, /* mov r2, #'T' */ - 0x00, 0x20, 0xc3, 0xe5, /* strb r2, [r3] *TXDAT = 'T' */ - 0xfb, 0xff, 0xff, 0xea, /* b -12 (loop) */ + 0x00, 0x20, 0xc3, 0xe5, /* loop: strb r2, [r3] *TXDAT = 'T' */ + 0xff, 0xff, 0xff, 0xea, /* b -4 (loop) */ 0x00, 0x10, 0x20, 0x3f, /* UART0: 0x3f201000 */ }; static const uint8_t kernel_aarch64[] = { - 0x81, 0x0a, 0x80, 0x52, /* loop: mov w1, #'T' */ + 0x81, 0x0a, 0x80, 0x52, /* mov w1, #'T' */ 0x02, 0x20, 0xa1, 0xd2, /* mov x2, #0x9000000 Load UART0 */ - 0x41, 0x00, 0x00, 0x39, /* strb w1, [x2] *TXDAT = 'T' */ - 0xfd, 0xff, 0xff, 0x17, /* b -12 (loop) */ + 0x41, 0x00, 0x00, 0x39, /* loop: strb w1, [x2] *TXDAT = 'T' */ + 0xff, 0xff, 0xff, 0x17, /* b -4 (loop) */ }; static const uint8_t kernel_nrf51[] = { From patchwork Thu Jan 2 10:58:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 854645 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp7715635wrq; Thu, 2 Jan 2025 02:59:36 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXSdNI0chz5t6BOxM/UsjVsiZp69mda1tgopvm5nTxuCTBoB496l3EkDIEWMmsvHts3kjyv6Q==@linaro.org X-Google-Smtp-Source: AGHT+IGCX8+zKRJsHDz6MXGyFcSv5GeJ517uIvXrXHg09QEUJpygcY1q5jlDqC1tmjU4v5NKDdzl X-Received: by 2002:a05:620a:4093:b0:7b6:d237:abfa with SMTP id af79cd13be357-7b9bacb48f7mr7350041585a.21.1735815576371; Thu, 02 Jan 2025 02:59:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1735815576; cv=none; d=google.com; s=arc-20240605; b=Q2jVGIAUdaxE4UHYLSDDpw4GJWdHs3Cr178JhzBZCTqW0VHu1G+EOOi787yXTjFute 4Tq6Xxs3yhZFcdW1htQXuz/4L/WA6qsoUBTnlzQoxBFeKT2pYVNLdydpN6vXXS8Wb6Zz lXzDLZM8CYe7SROo052cD+3TVd7NDB74P43dV406ELvQ79XWuPH5GkcSjWTPYdd6Dbgn Eua4M74ybX1d5f3A8d+dc8F5F81bkI/Doi2KpXo4IklnJKv5ZZ1gbN1S+UtlfckJRU7K dfCO4uNFEDHFXzaWL75W95v7Syk982Ws5KCRbEQ/2bynecD3g4LMhWvuPGMrz2/4n4Oi 9lLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tcekA88L/Z07G4gBsT6y7wvrNxItM6wYEmpLelolWes=; fh=6u5IHTDZ/iti019H2iRBSitBodweBjprxFJ3kMKpc7U=; b=ICUm55vIrbKZdZXTQmpYUiFNACxcCJ6mphZrmuWwQBr6pCw/VYGvZa5eqnSIilH335 tr69Wnr6jD3xCt+M2vRX27rBlV0060Tj0nR94vJ5rddxJNaS1F8oxTkK5ZutybpvY+lf GzsSIJJ0ci7bL0Y3ixhXUtFVxy0Llbs+q3oDKXWR84pt5BSnqye5zR0v9A/5TXcKs99x ba82F6Ag82hAZDR8ZFUON16f4/mUH6+iO8VorultIEfdrSYFktzwMJ2LJa+qeb81ak6Z s7NVoT7ms5F9na+MhRyqMlf5/tJnhW8A6u/qcbPD0ca2NHqnzuC1lb4TJi2sMyQxNQGy 72oQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qusRj6B6; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b9ac2ad5c3si3105417985a.71.2025.01.02.02.59.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Jan 2025 02:59:36 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qusRj6B6; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTIuf-0005GJ-Su; Thu, 02 Jan 2025 05:58:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tTIuc-0005FP-Sp for qemu-devel@nongnu.org; Thu, 02 Jan 2025 05:58:47 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tTIub-0000Nl-Eq for qemu-devel@nongnu.org; Thu, 02 Jan 2025 05:58:46 -0500 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4362bae4d7dso80599445e9.1 for ; Thu, 02 Jan 2025 02:58:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735815523; x=1736420323; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tcekA88L/Z07G4gBsT6y7wvrNxItM6wYEmpLelolWes=; b=qusRj6B6J974BDnTFDBajgENunRe0dBkOf+Gx3iVaSX1IDFPlEPpGNr7zf8AVyssJx BQPKa1rb7tTi/M5BMO2vXSyZD7PLDCcv+DVi2ViW9MTjp58NPXZwl/iIPZA5J9br9uNW niAhBA9L339CPLrIW0lVjz16bZXCNhGXSWNaUsJ/L7y84sYKkgnwXlFtfkcDpb1Z8oww 4KKiI7EloWCOyrhdQWj5S6dEt3chgbwAmkGvI9B43Z92uVrYFB6M1McKcxZHS/taCn2e J03vIaqtXhyg1DOk4FpsxQ5ZTta8LixO0kmaBlNpTprYWGbd4P2kcjOVlsnzLuZqJf8X KRow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735815523; x=1736420323; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tcekA88L/Z07G4gBsT6y7wvrNxItM6wYEmpLelolWes=; b=otsnGxxpnu6IwUB8+GMap0UA6+MR8RZhYQ0qSsJ7a2bNJlOh2/B1UJpmiJYLGyY3t3 1Ne0xPefIeOcJA4zFjG99OGWbGBtIFyiarM1xykcsGGT/mSJB7yvOLin4MKn4y1386vP PksAm2tEMmh64MQ6yok/3kzwfE+6lzJ2miJRyz6LQNKGgt1iowrb0O8Gcns0HgRms7Zr B/FhrdWQdMzVIT7M3nXitFMcesFIe71xVwSepTBfZQDET61UJeQ1CPpQFYrV7mksHmHw +bcz9tB5pweLHyOs91xqseMgMmgTOHG8LDg3SWfu43W9W27Ke3PoEX9aCeynZKAoU+SC uFsg== X-Gm-Message-State: AOJu0YwJ8xrzLmzWfLqf12icFIESmTB6RW73E54QEg3kenEc8nBiuNsP ZIjG9Fi+fE3IWWDEGLQEx6scrllcyZalV+ue+81LTw+Lp0j40lXhk/vv8/ndVnjddhiBEwcH2xY EzqT3xQ== X-Gm-Gg: ASbGncvyiAahBmPLNKNpteu4lkGsQafnax9p9OGa+fGVYNgTEwRYzOu8aqg2lYjE9a5 Vyu88ZAeJtM/8OSEEqVRjHk3NwfSd6n7i+PKMPrOsKgX+eqLoQ47jIdWSLTSopu8u3abNC8/pGi wWbbNzAnRcH68wMWExqTrhnRk4I8FEuwIeV4G9Yr6oRmlmE+RcZI1s0u0qFrtNUFG5K1NxZC86N PYd0V+VdGj5HT9xOVG8Ez3K3ynIfqP0FPNEmpV67K9CpBXPkfbxixVPCbPqIbEWVHmpOxe5ADbJ 8fb73ntlzmsEMqnT1Ygh6JKShjEmP46+yRbuUBmg2YzTtg== X-Received: by 2002:a05:600c:350b:b0:434:f8e5:1bb with SMTP id 5b1f17b1804b1-436686430a2mr404478675e9.12.1735815523632; Thu, 02 Jan 2025 02:58:43 -0800 (PST) Received: from localhost.localdomain (161.red-88-29-191.dynamicip.rima-tde.net. [88.29.191.161]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436611ea487sm446530485e9.8.2025.01.02.02.58.42 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 02 Jan 2025 02:58:43 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Fabiano Rosas , =?utf-8?q?Alex_Benn=C3=A9e?= , Paolo Bonzini , Laurent Vivier , Peter Maydell , qemu-arm@nongnu.org, =?utf-8?q?Ph?= =?utf-8?q?ilippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v6 3/4] tests/qtest/boot-serial-test: Reorder pair of instructions in PL011 test Date: Thu, 2 Jan 2025 11:58:21 +0100 Message-ID: <20250102105822.43532-4-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250102105822.43532-1-philmd@linaro.org> References: <20250102105822.43532-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org In the next commit we are going to use a different value for the $w1 register, maintaining the same $x2 value. In order to keep the next commit trivial to review, set $x2 before $w1. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Fabiano Rosas --- tests/qtest/boot-serial-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/boot-serial-test.c b/tests/qtest/boot-serial-test.c index 553575ca75c..bcfa504826c 100644 --- a/tests/qtest/boot-serial-test.c +++ b/tests/qtest/boot-serial-test.c @@ -78,8 +78,8 @@ static const uint8_t bios_raspi2[] = { }; static const uint8_t kernel_aarch64[] = { - 0x81, 0x0a, 0x80, 0x52, /* mov w1, #'T' */ 0x02, 0x20, 0xa1, 0xd2, /* mov x2, #0x9000000 Load UART0 */ + 0x81, 0x0a, 0x80, 0x52, /* mov w1, #'T' */ 0x41, 0x00, 0x00, 0x39, /* loop: strb w1, [x2] *TXDAT = 'T' */ 0xff, 0xff, 0xff, 0x17, /* b -4 (loop) */ }; From patchwork Thu Jan 2 10:58:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 854648 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp7715919wrq; Thu, 2 Jan 2025 03:00:22 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCW5hvBcsJnFWP274i1x1b4ZbinnqXgU97N7GidPSBuJm3MZSWN7SlU1ZULFpOxG92+WkbRnpA==@linaro.org X-Google-Smtp-Source: AGHT+IFFx0nUC9HVK7pctlTjPOOvNflB3ibtQx1RR8LwYW9ntEKS9XPQG84RCt0h2kQnnNxMrExG X-Received: by 2002:a05:622a:1496:b0:469:655:4ef9 with SMTP id d75a77b69052e-46a4a976be2mr700154271cf.34.1735815621861; Thu, 02 Jan 2025 03:00:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1735815621; cv=none; d=google.com; s=arc-20240605; b=Q3ILBkoZzgvfCQKybm0oMOydADAliyATxQ6SoBha3cJSsf0tWKKAwSZv6VhJrg5juo ccFLI4n1GBBXfMiMG+gYUo4CKVkdps+wQDHs/gZ5QGOEkRqI0lLwI5NCwNWMaWSnA3UE AKItKix5wRA5TO0CEkWiQIJ7IPPqUZi+plrnDzyJF0eYIX6mRiTG6gpBL3UQYthzzwlY mB1nzydoTeHjAVorsS3J6NNzEgxWD023ZCh/G7nCuSbXcIPDa4u16uLm7pzqNBN2zfpR t+FuIkMx4xmxqJYJTN7p53V1aKMWboKIcf9Rao8GyheLcVkPeDi6yjjtkomxQwmrC1vK rYsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7PDwfX0ojLlp4yH1fFPzelM0oZpBBYGTWR3yxzH4/fc=; fh=6u5IHTDZ/iti019H2iRBSitBodweBjprxFJ3kMKpc7U=; b=BYtTwnORZmEdYd9hXl2YQm43ZEJRf+ZNV1qUegvbCC0oF1T38XPrzw4AmcSEFHo/3N 973akbdaZQH6us8xqyRYvVQyhpqsiqtWi/Iy0xY9phTzG3+z6/OwpDfKgsvQMMJAGJDh GRsv2+lU9JBHfHeObBKi7VAvcYAHr97Sw2cXahTZsrDY4+N+mYObuwpgFd8Ge4r07Sww UjxJEGx2HHClvOvVpsLJtyvo1po7w+wF4rzY3HsTyarjs2+JvUPIi6wLMiz/rkue8axD 43C4jE0tN9VH6EY8J1hV7nU+bdWWPsTEKHcsWzAhIb1U7cM5eBZUdUwHi5LOUicoCBmC BGVg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RM2BuZEo; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-46a3eb9981esi360063881cf.216.2025.01.02.03.00.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Jan 2025 03:00:21 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RM2BuZEo; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTIul-0005IK-FQ; Thu, 02 Jan 2025 05:58:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tTIuj-0005Hr-Do for qemu-devel@nongnu.org; Thu, 02 Jan 2025 05:58:53 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tTIuh-0000OT-Bs for qemu-devel@nongnu.org; Thu, 02 Jan 2025 05:58:53 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-436341f575fso116668555e9.1 for ; Thu, 02 Jan 2025 02:58:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735815529; x=1736420329; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7PDwfX0ojLlp4yH1fFPzelM0oZpBBYGTWR3yxzH4/fc=; b=RM2BuZEoGRibG/9TFcb3DSHG7q7sc/u+t377pe4esW7K386QPHE079wNBLt8hg2UGr 6N0W6WSXpkJ382atEVuusIE1XU3fGSp9A8HKj3M2KnHIiV5TyKz9gkvIceJZcJ+pghUv +XsXc7ayX03PZKuUmjal+xajhlyygcn+P1eJMFi/07GStc/TadnQoU0j8/cMKuhL178u kmZduQJZQimwKh6Yex962nMSPqCou9aa+R+ZU5d3YgQoh2RZBe8VZEX2pp6DqfV2z6YZ i4e5oaCoN8ep+D+MLO2Rb8kZrXMqyu3l+TS+P+FzMXwD4kxkhiF3RuRj7h2L8sEk8ieL Ve1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735815529; x=1736420329; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7PDwfX0ojLlp4yH1fFPzelM0oZpBBYGTWR3yxzH4/fc=; b=E4IKb7bRmIwfzKWEtijmk3TRhR+hz9DpEHLVPRVeQE9jj9C9Y/VglnDwn7ZVpYRzJO iiOHtK6xsKLYWTKxUjAp5kbTQ0p8GxsCGRbFvaUZWFDf0si4j9ushsyel2Ga6zWNouWK QBljQyovpkBmuEaj6+9x7Ml5npZYyht6O0DvAc8dNwSMVsEFEWm+ex5Ck7+vRpLczflf nDa2ghueyB4ubFcI20Vs2nrwLzZLFhyCQ+BIkU2z8wot7XLFmOB2kqDCnvEZnjbsMeqJ SRvm0cnlxNfpX/WGA5bv1pFQLjzTQ2X2IkynZwzE65yhj4/kj+NrAn/q50qb6HgGOOTy uMlA== X-Gm-Message-State: AOJu0YzJYclZC/9dmXbe8O5TWjWe//3QdQt19uGuRFCiJpLKEilS99ha 59Vxn2ZEcRT3JlBxGysbitEHxh2EBVQ3qvsJ7zWT0UvYr24rfa8zA3ScIIXhrRfjn1AUnBXY7LD flJFBlA== X-Gm-Gg: ASbGncukgyf/O7fy5wCeoJ9+gHmDBTXu7DEGNFl3xdGWGXgZJ/DozPFAlbkgerUHvzK huIVQpTH+cMK3Y7Fn5RSmsscL4EI2npu0vQRBjD9rYHR9ry1fin5YG7CEjGvNggggruPZLp/b3I O5hz7hI66w6HXOAG29+szZyOBVln7paqvocr61f5mRkLyODvWzQsxo4dpuasVe51YwOH7WdHGVQ dIYMHcrNB56A2kaXurxYVlMHw8+HhCtc426ktpJE3oy2zRg30KptS+nfyI7G0VWSMxn+l1HU4+7 4M/rZWQIpgyUlxLS54B9oQDa4H/U4wcVnRzypQ/FIWkWOA== X-Received: by 2002:a05:600c:1550:b0:431:4f29:9539 with SMTP id 5b1f17b1804b1-43668b5f892mr336416215e9.32.1735815529296; Thu, 02 Jan 2025 02:58:49 -0800 (PST) Received: from localhost.localdomain (161.red-88-29-191.dynamicip.rima-tde.net. [88.29.191.161]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c89e1a1sm37393738f8f.69.2025.01.02.02.58.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 02 Jan 2025 02:58:48 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Fabiano Rosas , =?utf-8?q?Alex_Benn=C3=A9e?= , Paolo Bonzini , Laurent Vivier , Peter Maydell , qemu-arm@nongnu.org, =?utf-8?q?Ph?= =?utf-8?q?ilippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v6 4/4] tests/qtest/boot-serial-test: Initialize PL011 Control register Date: Thu, 2 Jan 2025 11:58:22 +0100 Message-ID: <20250102105822.43532-5-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250102105822.43532-1-philmd@linaro.org> References: <20250102105822.43532-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The tests using the PL011 UART of the virt and raspi machines weren't properly enabling the UART and its transmitter previous to sending characters. Follow the PL011 manual initialization recommendation by setting the proper bits of the control register. Update the ASM code prefixing: *UART_CTRL = UART_ENABLE | TX_ENABLE; to: while (true) { *UART_DATA = 'T'; } Note, since commit 51b61dd4d56 ("hw/char/pl011: Warn when using disabled transmitter") incomplete PL011 initialization can be logged using the '-d guest_errors' command line option. Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/boot-serial-test.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/qtest/boot-serial-test.c b/tests/qtest/boot-serial-test.c index bcfa504826c..6ea7e62e076 100644 --- a/tests/qtest/boot-serial-test.c +++ b/tests/qtest/boot-serial-test.c @@ -70,15 +70,20 @@ static const uint8_t kernel_plml605[] = { }; static const uint8_t bios_raspi2[] = { - 0x08, 0x30, 0x9f, 0xe5, /* ldr r3, [pc, #8] Get &UART0 */ + 0x10, 0x30, 0x9f, 0xe5, /* ldr r3, [pc, #8] Get &UART0 */ + 0x10, 0x20, 0x9f, 0xe5, /* ldr r2, [pc, #8] Get &CR */ + 0xb0, 0x23, 0xc3, 0xe1, /* strh r2, [r3, #48] Set CR */ 0x54, 0x20, 0xa0, 0xe3, /* mov r2, #'T' */ 0x00, 0x20, 0xc3, 0xe5, /* loop: strb r2, [r3] *TXDAT = 'T' */ 0xff, 0xff, 0xff, 0xea, /* b -4 (loop) */ 0x00, 0x10, 0x20, 0x3f, /* UART0: 0x3f201000 */ + 0x01, 0x01, 0x00, 0x00, /* CR: 0x101 = UARTEN|TXE */ }; static const uint8_t kernel_aarch64[] = { 0x02, 0x20, 0xa1, 0xd2, /* mov x2, #0x9000000 Load UART0 */ + 0x21, 0x20, 0x80, 0x52, /* mov w1, 0x101 CR = UARTEN|TXE */ + 0x41, 0x60, 0x00, 0x79, /* strh w1, [x2, #48] Set CR */ 0x81, 0x0a, 0x80, 0x52, /* mov w1, #'T' */ 0x41, 0x00, 0x00, 0x39, /* loop: strb w1, [x2] *TXDAT = 'T' */ 0xff, 0xff, 0xff, 0x17, /* b -4 (loop) */