]> Git Repo - qemu.git/commitdiff
tests/boot-serial-test: Add support for the aarch64 virt machine
authorWei Huang <[email protected]>
Thu, 1 Feb 2018 17:28:09 +0000 (12:28 -0500)
committerThomas Huth <[email protected]>
Wed, 14 Feb 2018 10:43:42 +0000 (11:43 +0100)
This patch adds a small binary kernel to test aarch64 virt machine's
UART.

Signed-off-by: Wei Huang <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
[thuth: Fixed contextual conflicts with the hppa and sdhci patches]
Signed-off-by: Thomas Huth <[email protected]>
tests/Makefile.include
tests/boot-serial-test.c

index 8b304ead8010b44711e933dc45e9e8cee8e49b73..566d30a7b76b981091ccf9151ec3d30bf657d18c 100644 (file)
@@ -374,6 +374,7 @@ check-qtest-arm-y += tests/sdhci-test$(EXESUF)
 
 check-qtest-aarch64-y = tests/numa-test$(EXESUF)
 check-qtest-aarch64-y += tests/sdhci-test$(EXESUF)
+check-qtest-aarch64-y += tests/boot-serial-test$(EXESUF)
 
 check-qtest-microblazeel-y = $(check-qtest-microblaze-y)
 
index 72873eea92ae8fd0700c7038d55c9a486be3b951..511bf314a3689c69646ca54fb2d6a2e55aa516bd 100644 (file)
@@ -55,6 +55,13 @@ static const uint8_t bios_raspi2[] = {
     0x00, 0x10, 0x20, 0x3f,                 /* 0x3f201000 = UART0 base addr */
 };
 
+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) */
+};
+
 typedef struct testdef {
     const char *arch;       /* Target architecture */
     const char *machine;    /* Name of the machine */
@@ -95,6 +102,8 @@ static testdef_t tests[] = {
     { "moxie", "moxiesim", "", "TT", sizeof(bios_moxiesim), 0, bios_moxiesim },
     { "arm", "raspi2", "", "TT", sizeof(bios_raspi2), 0, bios_raspi2 },
     { "hppa", "hppa", "", "SeaBIOS wants SYSTEM HALT" },
+    { "aarch64", "virt", "-cpu cortex-a57", "TT", sizeof(kernel_aarch64),
+      kernel_aarch64 },
 
     { NULL }
 };
This page took 0.025469 seconds and 4 git commands to generate.