[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 04/11] tests/qtest/boot-serial-test: Reduce for() loop in PL011 te
From: |
Peter Maydell |
Subject: |
[PULL 04/11] tests/qtest/boot-serial-test: Reduce for() loop in PL011 tests |
Date: |
Mon, 13 Jan 2025 13:54:01 +0000 |
From: Philippe Mathieu-Daudé <philmd@linaro.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é <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
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[] = {
--
2.34.1
- [PULL 00/11] target-arm queue, Peter Maydell, 2025/01/13
- [PULL 04/11] tests/qtest/boot-serial-test: Reduce for() loop in PL011 tests,
Peter Maydell <=
- [PULL 01/11] hw/arm_sysctl: fix extracting 31th bit of val, Peter Maydell, 2025/01/13
- [PULL 08/11] target/arm: add new property to select pauth-qarma5, Peter Maydell, 2025/01/13
- [PULL 05/11] tests/qtest/boot-serial-test: Reorder pair of instructions in PL011 test, Peter Maydell, 2025/01/13
- [PULL 02/11] hw/misc: cast rpm to uint64_t, Peter Maydell, 2025/01/13
- [PULL 06/11] tests/qtest/boot-serial-test: Initialize PL011 Control register, Peter Maydell, 2025/01/13
- [PULL 10/11] target/arm: change default pauth algorithm to impdef, Peter Maydell, 2025/01/13
- [PULL 03/11] tests/qtest/boot-serial-test: Improve ASM comments of PL011 tests, Peter Maydell, 2025/01/13
- [PULL 11/11] docs/system/arm/virt: mention specific migration information, Peter Maydell, 2025/01/13
- [PULL 09/11] tests/tcg/aarch64: force qarma5 for pauth-3 test, Peter Maydell, 2025/01/13
- [PULL 07/11] target/arm: Move minor arithmetic helpers out of helper.c, Peter Maydell, 2025/01/13