From patchwork Fri Jan 3 17:22:36 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: 854875 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp8359205wrq; Fri, 3 Jan 2025 09:23:52 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXjFz7uT+1Yq4Gi0k24VvQJTTPyrzsII0bBowJQYoQxw2e1yc5xoWuC5J5JyClb7JOFgIMUGw==@linaro.org X-Google-Smtp-Source: AGHT+IHiIcljhphWkFdn+kzkFt4Y1MMEj+kB3DcNGYrie9dggMsCnpFxtb0lGr9Xn3xDdwxd5peS X-Received: by 2002:a05:6102:3f0f:b0:4af:f275:e747 with SMTP id ada2fe7eead31-4b2cc45dc5fmr40378935137.22.1735925032116; Fri, 03 Jan 2025 09:23:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1735925032; cv=none; d=google.com; s=arc-20240605; b=RjWlazL32VsJcezhqXlmedC9T4GYr7l5QUWiQnkVy5QEXFPB41nWZdYODg/gRrXX9q DuhpMNdtJ1FY+PnBcgYmoEaRaznqgdS1K+6RtwY5omWQzxHGLjL2DfVtjgUdKoobG+vR e8ZS719LzxNidFz+8AJ6RprbVz39J1cvxRgRrx1mVwAtI1yJ/SC1JcUo6azYFILSFNJ/ uHZNknw4mFUu8QEG3N1j7P4nkaVuA/1l0x/InSioVG0hZrS7ZnRZb2lLZ6lBJbwnyy35 BC+RWdScuxQ7mesgU918VFAAvyXBy2dNIbjVyKZu0c41qC/+H491IMYhu4f8o0vw7kPB k75w== 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=MtpMvbVNvoKM9SuvMPCquWt8IFwwWj8rGKGNS/75JWg=; fh=sOXhaDUqTNtWZrrLHpwVOLbAyi3Of/7BDc3BkRLfsYs=; b=Z9L6NbvCCabm6wOOuVb29ykwQGmQttoFjJxCzU9w6GOpHaB7Znurrt7q8WykgYAIs7 bGvd/WJUAvX81UqbjH4mXgQL1O2BKQSUZDu0BpDMnvlbhsvfFk7IiWxer8djdZV8rFhw yRKBdIIDdAxT41Xq51yYbF80U6eDviWaSqK0SBnLxd/ZxgH+XTplN++1+YW3GPZxveFB 1W/h1ToLj8gkBA42YZ7oPi4es8taxFzuViCOrsfl3Txo2Y8ejQZB9HaSJAPE6bL4gWiQ jyNbe1Zyd0h/hIEgg70732tltCyut1b1FdBbM9PcBMLvwS91b3i0VkptJw1K9m/2lUlg q8wQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="d/a0xUdT"; 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 ada2fe7eead31-4b2bfb1d6a5si10554261137.331.2025.01.03.09.23.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Jan 2025 09:23:52 -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="d/a0xUdT"; 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 1tTlNt-0005xb-IP; Fri, 03 Jan 2025 12:22:53 -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 1tTlNq-0005wp-DG for qemu-devel@nongnu.org; Fri, 03 Jan 2025 12:22:51 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tTlNn-0001NU-VA for qemu-devel@nongnu.org; Fri, 03 Jan 2025 12:22:50 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4368a293339so88037345e9.3 for ; Fri, 03 Jan 2025 09:22:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735924966; x=1736529766; 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=MtpMvbVNvoKM9SuvMPCquWt8IFwwWj8rGKGNS/75JWg=; b=d/a0xUdTFjj5mEo2Pj3yGoWaHYG9Espjgj4eMRMdH1KUWha6GL2yT9oZsKdNyOG8hu VvKe20Hg17Oe7iSzSx9/n1sqiwTLU8GdsfxJLZ33b88u0j/wSC3lWIW8S2BnAYfco8qu 0KDcSS4HWzLSbkqPA3q9POhU496HyUEYSnIzc11sg0TabozpjRPpOAr/7PgJHaLa1mHG 7UJ2kSUr/g+bDc82cGJo5LbFkDRo5ZsLhJXZMxH8eI2rWF/UgpWNTdHYKD4vIpSyzmNE 2Ered9RsglDCNJpVG2K0V90TYzO6LuuEmQU18AZOvdod2vEkZPOteUf6UT3DMz/ohype rMEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735924966; x=1736529766; 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=MtpMvbVNvoKM9SuvMPCquWt8IFwwWj8rGKGNS/75JWg=; b=Fy3g/qQXMthmaoAw/K7IuPbtEuOrxc5CGngwwdtcSUbj3B8XiILlH3WdAfrKJavJ+O Scvi5XJ2salr+d4B0Xh49+YircoMUQDlYLrlQ+7rgH+XcfHDxCUnDOnJOLTARc0fkqgc fG37H2QQUPa8v9edw8OH+oTPUiIW6WoLxZdYwCgouN3FSbgrLW1vyC+kXDDNSR1hXZAf FbRCvyUz/mwrzdPrnj04LgltO3wn3VP0EMjZP3EPyfqd1xpVmGsZPdp0+e/M8k78WD2Q Hi0LNI8vFttyRCK11jpfsoehVs5krscxut3NFJnyV5gNLShO8eJlrjvoqR3wBymjzyv3 /ozQ== X-Gm-Message-State: AOJu0YwRQ4hM3G6ui39UwRkTiBIblhZuIJZLzdtmwDWloUexPKf465Z2 JQOr/3iZImEO6DXvPKbyWJkpNPTJS+HQuUQXQxrvfQoxD/eDuzFFGRS6ptkLtH7w/pfyT/nT19R xjMM= X-Gm-Gg: ASbGnctr2/VaBdVxQWRfNQyJdiJo+5eumAOLF3ZUkAuhrvbb+FejhWKzsXJdH9lZjJo 8M1JCD9rjyCN0nfsAJAoi+sqQOgLDhThvqMjEsDQ8Y+vqp4kw93fvW5HiJ9fpKx38PxayGIFsDK 6aykX+3adt3fTSk3OEziWLc62MQotedvSlNE/TYMg48+za8bmgJF3wlvUGPa3Cb6A7yGNCbZ972 dYn7wbOnrmS/mYAg6rb/n0UwT/SQfPIfODMIMfiT5bQxZlT8Re3+/UwXaBlKYA6+XVj71w5mjLl ImA+dNBURO0ngGECWFzUwLMnsP4SpEs= X-Received: by 2002:a05:600c:1990:b0:435:294:f1c8 with SMTP id 5b1f17b1804b1-43668b93834mr341817175e9.28.1735924966014; Fri, 03 Jan 2025 09:22:46 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656b3b214sm528921215e9.28.2025.01.03.09.22.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 Jan 2025 09:22:45 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Maydell , Fabiano Rosas , Laurent Vivier , qemu-arm@nongnu.org, Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v7 1/4] tests/qtest/boot-serial-test: Improve ASM comments of PL011 tests Date: Fri, 3 Jan 2025 18:22:36 +0100 Message-ID: <20250103172239.18562-2-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250103172239.18562-1-philmd@linaro.org> References: <20250103172239.18562-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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: Richard Henderson 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 Fri Jan 3 17:22:37 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: 854876 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp8359417wrq; Fri, 3 Jan 2025 09:24:25 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUiepCWdkGthVm7eXZ/8CkufLXLyGjOFcGwaA1rSFoovX6vFpgpF0tCVCg5aThBN582ctXSOg==@linaro.org X-Google-Smtp-Source: AGHT+IH2lrrCv8ypz40n7co1bcf7NmFz+h1d34gl3YgTgXQWwWVBtw0j3iq/xE6ya0nBWFLCKzZE X-Received: by 2002:a05:622a:15c9:b0:466:948e:bef6 with SMTP id d75a77b69052e-46a4a976bc2mr783155151cf.43.1735925064899; Fri, 03 Jan 2025 09:24:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1735925064; cv=none; d=google.com; s=arc-20240605; b=dMebrvWvkMYNiPsARdmjak7xqe8ccgIkpvnSH/8/VfgKkR/Y/kyfkkZKWpY8ldTK/u lXr+AZQd1upRi7PqEDK0XJrjaPaPOdgkhWow0B887Mx5SrI16VamUBkdKVKjAXE0ttbi k/JibJO7Z7FOTVsNo3rTNDYPpxDC47N4XXRez9WmXAlqBEpWuk3ud3VlgnhapaLq/HLk dQ73GJYTvP7dHN99gj9w5fsyEo8eEIW0m0dmK/zZek4jjJci9dAjwS32DZiXrPNpQ/Mc Is6671TSIuNa5Jp8QyzJDkjXC63LWcAGLiHXh61bHsLXZpXdbo2tsnz10IMPX6ol9h3E KjVA== 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=GlVN5y46CcSMejJupZx1BQuV3ovHng+r81SDig0PPcM=; fh=sOXhaDUqTNtWZrrLHpwVOLbAyi3Of/7BDc3BkRLfsYs=; b=QvmMN3DpHVPfOKfQr+lfPUjt6GAppbESHnr630jwG2V42BdfpIj+7tDuU56KPDNmtM AgG62/9CH3jOdjzm5kJ8ys9bn2McjUcJUNqQykNaAdFNwsp2mx/suKlMTMjY5nCY9214 izogKXd5+uqDUF1UrxBwmLdLnm6SfSYhOoZm57/S98H85gT0HHUxtyL5LZk0y26YtKnU XawwmffeHfPEl8WuUV1SA2eNdzrR9WhHilwPSU3+ereVZKaU9ZYxxI0bke0RgB4aHCQY zlrnw8hR+DPrfsS1WnPlK2pW1k//vO6tLd8BHxV0RwJiPhWu27a+a4BJCK+9L35BaJVa Y2Jw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jiuSRzv3; 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-46a3ebc02d2si396278891cf.397.2025.01.03.09.24.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Jan 2025 09:24:24 -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=jiuSRzv3; 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 1tTlNx-0005yJ-F1; Fri, 03 Jan 2025 12:22:57 -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 1tTlNw-0005y2-Nd for qemu-devel@nongnu.org; Fri, 03 Jan 2025 12:22:56 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tTlNv-0001O0-As for qemu-devel@nongnu.org; Fri, 03 Jan 2025 12:22:56 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-43675b1155bso113491565e9.2 for ; Fri, 03 Jan 2025 09:22:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735924973; x=1736529773; 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=GlVN5y46CcSMejJupZx1BQuV3ovHng+r81SDig0PPcM=; b=jiuSRzv3/Ybkng7ShWDIxVHxVDec7am9puq2WV7jiWjRlEjiEt2MOiF3EntvFX4iBF HzRGmcJfNhouWkW86bK27Nli1C8VZ1zwqfDRZMsCisfxx2F7SHGYz8zRvytJapwDqVjN /wobjwedwQ2muxpfa9Y0tvPir7EHwCb+73e98+eV4zksQtpCx8p55P7rlbFqYt/abzZg Iem83JvGMWvQWTRZ90RjrEnB3oeJksKwe7RjUhTGQ61JoGyajtj1+j19p0cKZwDK5zna T9hI2FIjr9rExhBEAfku9JqtMgAkBLwKv7rvrGKjJ313ECVX+xs++GiqSuWJPGaPw8C4 2ftA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735924973; x=1736529773; 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=GlVN5y46CcSMejJupZx1BQuV3ovHng+r81SDig0PPcM=; b=ftJEK9/JX5wLhbwSfb0T6CVQA0SHJ/r9Gxkycc7tgJZHm4GTa19HXoeN2aRvvdf5Ht Ilz4q0EinuDHgMNBZUqM+NAEJ3cTCrkA1QAwFpfsVkGt3s35Vv4y/siKqJoM2Z9EfG6S TScKqBlB4pQIrK34cIVw34qiRqpPJH588IYgrJG/IfL4WZx5eTZKJV5F0jXnzJ90HlTh QHjGZJE2/2HObHth26IN9D0KwkiwedBM/JaqKs2TqIp/EdODhOXRS0Hgm7NChVtyE9ZV HamiW+C9/Ux9Cw4a571InCNSFYAj6t0UQpjeXN52U5DlRshz4cZVpaw9pNxpflACuUIO jqiQ== X-Gm-Message-State: AOJu0YyBo45Ak/juPfyHVv4lVqgdfBz0IPXOcLrbQHjZ5vvPixR4l6M1 pVc+HOsnv8DVSKC521asfWZ+4OUdQEhgSprmetwUqZUCuDr8R+gAtPXvJhNYorbQLp0UY+dZwap 35z4= X-Gm-Gg: ASbGnct6DaQs8jYkddNfcX93sbIitExHUUiGxqWmT/prx0iuu3FvzuMdcHUc3QcR/PC dhO/QC1xJTDQxJZ5d3zkW3x6BoDYS18SGRthJaa8Z+sx9tqxgWWkT6JWTTa1Fv7YMetZahw1RUS B0E/WBkWRVUYApnJSr7fHI70nOmM+sV1I3ylbFFFTZZ4IepjEax/4M9xQ+q/hIc97kg03Ohsysp y3K35+20ULFs7VJAaZpL7fBXO91p3WbJwe9UfKtUpdAcorh0KAdViUS54794xr9oj3wCubdnY2q 6n/0JCshqf0hS9q+6YiiJe+l1bcjs5o= X-Received: by 2002:a05:600c:154a:b0:434:fd15:3adc with SMTP id 5b1f17b1804b1-43668b786bamr376435975e9.25.1735924973185; Fri, 03 Jan 2025 09:22:53 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4366127c508sm488947785e9.33.2025.01.03.09.22.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 Jan 2025 09:22:51 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Maydell , Fabiano Rosas , Laurent Vivier , qemu-arm@nongnu.org, Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v7 2/4] tests/qtest/boot-serial-test: Reduce for() loop in PL011 tests Date: Fri, 3 Jan 2025 18:22:37 +0100 Message-ID: <20250103172239.18562-3-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250103172239.18562-1-philmd@linaro.org> References: <20250103172239.18562-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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: Richard Henderson 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 Fri Jan 3 17:22:38 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: 854877 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp8359459wrq; Fri, 3 Jan 2025 09:24:29 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWp2roHrIvJz8Z7GVqsNIQOED+R4O8Ky7m6SAJjFZDDdNiAUordtKeit4AxoT1kRMcBI9WWxw==@linaro.org X-Google-Smtp-Source: AGHT+IFIXtomQcLXW0U1BWQ2qtUJ2anNJ6EOXzZ5wrPEuKRz7SanGdE3t0NIMQP7EWrU4KjHNi6q X-Received: by 2002:ac8:5ad0:0:b0:466:90b9:923a with SMTP id d75a77b69052e-46a4a9c8dfbmr825172481cf.54.1735925069577; Fri, 03 Jan 2025 09:24:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1735925069; cv=none; d=google.com; s=arc-20240605; b=X5Xsuwo8Md76HrTC/nK3TvDZEuq+nt1jDAP8BlrYjc9W5Fb2zKWFhsRXicCFEyhLTH wtDhwDrlCNj3stqsQzd3Vg9Z6N6NPZo1HlCcDC8vC9PpM6H2hMYA5fvg6HyBkypu7bvh USq7M2uCMl3s5OpEnMEDzBMe923jXLzCLm3IzyB/V+bS6IaryraErs8l7BcoY2OBfLSS 0Ln+RjcJvgM2/IXRBsyG+y63y9+wtTSx42fI54qVmqQZpZTKhkq+zHGdA6AKw4HduWgA o3UZ94M2zVe74oyvm+O2KvvxFqraQAFvGtIk1PzjjKXn+OIxKpBpn2BMH8HRZZFJSfR4 91pw== 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=XAvTPdAmDaVspmiDEBxv7slQUtV72xw5x5dlXyX0c1M=; fh=sOXhaDUqTNtWZrrLHpwVOLbAyi3Of/7BDc3BkRLfsYs=; b=aTFJxhYqvNqMfSej9doaAykIvhzQJ0oWBSE9tOr6snvNOj4AAdz/DL/X7g89k8yq9I FuUSFmoiHv4Gk/bWz4ngCyGD9lbaMwqqgaYf0MbWbFhPdmzatNpcM6l4TYzlmm5Fd4kZ u1mrE3aBQ0nudLnoI6ppLdVSd4UwAB89ISdmzBtOPRYWHzwm+syLB0TzHDkEhHO6CxVA oUHH06D7fjXFrkmjNYQ0/FbGBTcnrqJoe7DrvOJBGxB2v3ZH5KW+s8AefUMUi8xlFaiv 72jZH/szIaaDQM2wiC648DQjzs80OvsrmRTJozwFIReGUpw7GPVza7MsLM3noAJq1K4m sL1g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FJxF+noS; 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-46a3e6812absi384470011cf.55.2025.01.03.09.24.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Jan 2025 09:24:29 -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=FJxF+noS; 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 1tTlO2-0005zx-Rv; Fri, 03 Jan 2025 12:23:03 -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 1tTlO1-0005yt-1d for qemu-devel@nongnu.org; Fri, 03 Jan 2025 12:23:01 -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 1tTlNz-0001Oi-La for qemu-devel@nongnu.org; Fri, 03 Jan 2025 12:23:00 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-4361dc6322fso82563045e9.3 for ; Fri, 03 Jan 2025 09:22:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735924978; x=1736529778; 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=XAvTPdAmDaVspmiDEBxv7slQUtV72xw5x5dlXyX0c1M=; b=FJxF+noSJ8HxYz48G6OKsR/gdJAOSVuO76NVhL5AYEl4q0TJYPdiU/dJotKKG/YLhX iCFCEXb4Al51Y+pbjIF5raiIH5TPIBtnK891sNrPiB+kwtYYroZgjYjO1LAwDO7TiPUu KObovYdAk8ejoGHVaEl/GDxnD6Y2uBSLJr38CiZm6sQwHymreyPx94Y9UoG7EAdmx+MP 8CgEM2MG5jqHnJoo9LbDjDKi7cICColq8ZFw5lVgI12KXVN5JlQwFQSzjp5eJBqaP/H/ /HBGwLP6vjfGQ9ERhy7L8ePJSlnUOuuU2k/doMaDZd8GTLiirHj+YC4RMz0fhm2o5PKD /2yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735924978; x=1736529778; 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=XAvTPdAmDaVspmiDEBxv7slQUtV72xw5x5dlXyX0c1M=; b=NKKiq89OF5zaXf5gaLfTCQrTiyWPEal/auuNLfpCX6EjJ7+ZgTnViw0UzGdMMGZNyr HRr2p5SbvlIeH4OAeyPmIuu3dADE6RJJ0GI/zL5EDTrLyRx3NOcV0t1g3xXHtIDEH0W4 mZwKBLpNAjWC26zwHrMtjKOuCfYzbxMCYc1rp4yj5LOFDTWBe8tK1AMLzXPuKJXcETu7 oqqS1NVt1aZwltTcb08+F4zbmF8n8fZoiMFH9ydaVf1hU/6Pq3+lp1Na1GOaPlBDb9b/ 4Xi2f+NW8iGJyXJtQbLemPhMmGA2ijOdU3C1WywtO1aLNRki7a23bQK6ALiteAzhRsHa EDcA== X-Gm-Message-State: AOJu0YxRa3RpOZUobNo7SDddOZ2kxzuZ3fIWUX9aFnJu8SrCHsBSnXcp 16pLHvI6agXtDQUGxxxBWsZfVPGPjMM/rY06TsS9fV6xyCSCibjjZAcrMM/LYgISNoahR71Ocat FxBs= X-Gm-Gg: ASbGnctcwY+V9NYwiLuhcqLRB39LbK9JJkaUre4zC/s1YSh5r+SAAQ5vR6mp4gc3SkH IYL/hzYgx0ZagYJpTVtpbsC2iB2cfcoozfAX0Pim4LxlBjiAgl1QTsuP+UBdYafRlQyaeKDZHPc oyi2IWu1U13ZiHUIFTwIniEKX8TYf2bjh9rINBG2RqKL6uf7bMFEyKl3VCH9bmdnvD7UKcMEFho eWUkh3Lhz/kq+KQwxNsqKevSlhNUFOqBdO1smph9IRuo93D9XXOTJWjfAf+tq+PVe2Z8jf2FV1R OK05o5QebX6Pf0r+aHZRHQ8WHmQ7tq0= X-Received: by 2002:a05:600c:35cb:b0:436:1af4:5e07 with SMTP id 5b1f17b1804b1-43668548867mr335075545e9.1.1735924977888; Fri, 03 Jan 2025 09:22:57 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8acb85sm40812573f8f.103.2025.01.03.09.22.57 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 Jan 2025 09:22:57 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Maydell , Fabiano Rosas , Laurent Vivier , qemu-arm@nongnu.org, Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v7 3/4] tests/qtest/boot-serial-test: Reorder pair of instructions in PL011 test Date: Fri, 3 Jan 2025 18:22:38 +0100 Message-ID: <20250103172239.18562-4-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250103172239.18562-1-philmd@linaro.org> References: <20250103172239.18562-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 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: Richard Henderson 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 Fri Jan 3 17:22:39 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: 854874 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp8359195wrq; Fri, 3 Jan 2025 09:23:51 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXNzRBRdJ05WPknyO1G1tk0RiEQD1XmqQtpricdo5OqYugCbC1js23kNZkA8wMT2Cl/9ww4Bw==@linaro.org X-Google-Smtp-Source: AGHT+IHRHRPJ3RrYzYnYdqutssYIrxyFHDdnxFiSa5rXqODMPU1h0Zfudb9pKxp+FEcDUC8uT5zz X-Received: by 2002:a1f:4ec1:0:b0:51c:27a0:25b8 with SMTP id 71dfb90a1353d-51c27a026f9mr2743641e0c.2.1735925031236; Fri, 03 Jan 2025 09:23:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1735925031; cv=none; d=google.com; s=arc-20240605; b=GDNmCoYUNS+fA9NS7z5BYgitS/mpuvcxc6MalCu4sKMP5nfQSzBcInq3cHR8bmKk5U A6doX7k28DeFp0Q1fTR7pgwIsXSsz0XwurAT7Rr0j4Rz6FtVtmy+6jIZCf8mqLFa3bhL OHQos7IiqTFZ+MZAy1KvL7Mr6V5SIMUviVMStHybNfRjQXHx04G5huMcFr1/GU79RK1q J3m0CeerTAhmGgulvF17jtU96xmW7FT49Xkx5OqOmGisO9IbN5gp1txdqG1dt+LHoggN wLhUNX8b69TXCt3L+283QKQGW4Rw3rMJ9ZGJWi+8p/ta7GfNkrY79WkJzDnNIhmr1ExL yonQ== 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=yUozoV2sd4YCNhaxO0qe6knCSN/xQB+GkqDltrLuR9M=; fh=sOXhaDUqTNtWZrrLHpwVOLbAyi3Of/7BDc3BkRLfsYs=; b=jHk4h0urRRG5upn436QazK+FMg4BzbhpNCGQ1mHv5Rtip7e0VP+y6jlomiW5KL/I/k pQWLjcjBwtzljkzCO/vG5z+YVlbHYiXG3p3RD3I2GUI0UzpVxDvJaqip+woQcpXMkUe1 oXc0odGSuMPHzjuqaHlAavNu2LZ2R3RX8HCmILI0Vs1//+QRP9+th/Ip8yTO+WQsnkUA d0QOYOipyfMg5j3wtb9u+vQLJdyB4x6MoenhoDY72hsQdDIcGc4AtOS1TotaE/sW2mhM ahMAXxQuEq4c41I38ogv4ZL26U09FcvLjhF/BgXfV+TFFTDFhG06w67nVFrsZ5t2fEH0 IqPw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gIMO6pCy; 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 71dfb90a1353d-51b68da8e4esi8758866e0c.234.2025.01.03.09.23.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Jan 2025 09:23:51 -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=gIMO6pCy; 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 1tTlO9-00061b-GL; Fri, 03 Jan 2025 12:23:09 -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 1tTlO7-00060V-Ay for qemu-devel@nongnu.org; Fri, 03 Jan 2025 12:23:07 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tTlO5-0001PS-3U for qemu-devel@nongnu.org; Fri, 03 Jan 2025 12:23:07 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-436a39e4891so34604555e9.1 for ; Fri, 03 Jan 2025 09:23:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735924983; x=1736529783; 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=yUozoV2sd4YCNhaxO0qe6knCSN/xQB+GkqDltrLuR9M=; b=gIMO6pCyasVYbRp3TZcy512tG+FrBvrip70I1tUX32QmvD9BQqWYE7uIbV3Ms5ck2L cfHsjCmpsCq7C+CX22ditPZrbhPksbRZoi7nnJ5gPTq3TlGMzM1XFBwjZ4V+hifIal2k 0j2XonvRfpaNP2mea/GcSgbXu68DtE2ysx6H72syoGD8nlUx9L4d3Oec5WWoEpi+N324 JaGsxfYuaLGBqqvuqrJvOm1XwB5ljNWyerRjNlRi8DhUAuQh6HZHhMwFHFMfTpt3rCly Jva/mi4pFHb2PN0DHGrmzmHwxyhlFV25vJ6mZ5uLBgqhgKJR/kYb6hn1qGk5NTkSedcX hJxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735924983; x=1736529783; 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=yUozoV2sd4YCNhaxO0qe6knCSN/xQB+GkqDltrLuR9M=; b=e57jSrKDZIoc7QzC10M3QkQ+GyxYH8SVL/ND7LgAqREb+65I96WtoiAP4NENHcptcU 3sPznFYMVPnaVMYh7heF7jMnDFGI5mx+YQxOG/jD1GnQF8hZNS/csVByi/PTyAFhH/i0 tnDY9cUM16uqutnBja5o7lQOvWbDQZMxshf6onXcuLjpFCaaDD0Yit/ytXufneDDPKLO 2P4v3qUku9gM6kXwOoXqgOPhCERAl440Sc8CJK+6bPCN6VIlRfny8lmReF09/Zjfs5Eq NtA2DeLprOQxz+YlBxlqhAQ84G4Rapxs548n3K5oDF7NwnW/yUrYYYrVkKrwGOkBzCYm rgFA== X-Gm-Message-State: AOJu0YzGzdmQUXwkA2lyIhzOYGC89FFg0BNzLZhTUz7Ddr1FDi9Xpu+g csnDV/MbJqnjIlyldmEVQqY271HyV7NmhpdiA4WRc2ZCNZv3H20iAhKwtD+YN3Tdg0+pJv447oC m3cc= X-Gm-Gg: ASbGncuGCFHCxk97Wk7X9F0SXUC0rFQfZt2kHdMV4ROgnh94MK3zMKzQfoD8vJnL6U8 94KTZAapznrtFkRYEibJ4XGG91iVmn8LacEyYoWq5XxNCBM4XMTThQU4F1bf9Kijr/p+QJxE5YQ QDSLcPJlf927ONSqgwv9W9Rr4pOM8D8gMikPUkurZX8rcORdKkuTPjyfl9GL3QdWcIiMkJ4kPya FDh6LEjnH5t7KBmrBFm4oRVB3gSVWGf/n1HVKE80gmcKr88gGF3eOx91e1cHT5/fh1LufTUmQUD RIHeJAe2yW+KsolsNxn7xMleIKGi10w= X-Received: by 2002:a05:600c:350c:b0:434:fdaf:af2d with SMTP id 5b1f17b1804b1-43668b7850emr440635435e9.30.1735924983340; Fri, 03 Jan 2025 09:23:03 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656b3b295sm531386205e9.33.2025.01.03.09.23.01 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 Jan 2025 09:23:02 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Maydell , Fabiano Rosas , Laurent Vivier , qemu-arm@nongnu.org, Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v7 4/4] tests/qtest/boot-serial-test: Initialize PL011 Control register Date: Fri, 3 Jan 2025 18:22:39 +0100 Message-ID: <20250103172239.18562-5-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250103172239.18562-1-philmd@linaro.org> References: <20250103172239.18562-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.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. Reviewed-by: Richard Henderson 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..ffa9e780ad6 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, #16] Get &UART0 */ + 0x10, 0x20, 0x9f, 0xe5, /* ldr r2, [pc, #16] 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) */