aboutsummaryrefslogtreecommitdiff
path: root/tests/boot-serial-test.c
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2017-11-30 09:53:07 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2018-01-16 14:54:50 +0100
commit7244edf22e6c158036e21567c4cf6e4ddce84092 (patch)
tree9d25ba171e6fc2bee62d3eba8e79b611ab41fb8d /tests/boot-serial-test.c
parentacf53766fc26fd90a0b06bae81638502d249f7e7 (diff)
tests/boot-serial-test: Add a test for the moxiesim machine
Now that moxiesim supports the -bios parameter, we can check this machine in the boot-serial tester, too, by supplying a mini bios that only writes 'T' characters to the UART. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1512031988-32490-7-git-send-email-thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tests/boot-serial-test.c')
-rw-r--r--tests/boot-serial-test.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c
index a39273a83d..1deddb8f80 100644
--- a/tests/boot-serial-test.c
+++ b/tests/boot-serial-test.c
@@ -40,6 +40,13 @@ static const uint8_t kernel_plml605[] = {
0xfc, 0xff, 0x00, 0xb8 /* bri -4 loop */
};
+static const uint8_t bios_moxiesim[] = {
+ 0x20, 0x10, 0x00, 0x00, 0x03, 0xf8, /* ldi.s r1,0x3f8 */
+ 0x1b, 0x20, 0x00, 0x00, 0x00, 0x54, /* ldi.b r2,'T' */
+ 0x1e, 0x12, /* st.b r1,r2 */
+ 0x1a, 0x00, 0x00, 0x00, 0x10, 0x00 /* jmpa 0x1000 */
+};
+
typedef struct testdef {
const char *arch; /* Target architecture */
const char *machine; /* Name of the machine */
@@ -70,6 +77,7 @@ static testdef_t tests[] = {
sizeof(kernel_pls3adsp1800), kernel_pls3adsp1800 },
{ "microblazeel", "petalogix-ml605", "", "TT",
sizeof(kernel_plml605), kernel_plml605 },
+ { "moxie", "moxiesim", "", "TT", sizeof(bios_moxiesim), 0, bios_moxiesim },
{ NULL }
};