qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC 3/3] tests/boot-serial-test: Add support for the micro


From: Julia Suvorova
Subject: [Qemu-devel] [RFC 3/3] tests/boot-serial-test: Add support for the microbit board
Date: Wed, 30 May 2018 01:03:38 +0300

New mini-kernel test for nRF51 SoC UART.

Signed-off-by: Julia Suvorova <address@hidden>
---
 tests/boot-serial-test.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c
index 4d6815c3e0..e6dbc8a293 100644
--- a/tests/boot-serial-test.c
+++ b/tests/boot-serial-test.c
@@ -62,6 +62,16 @@ static const uint8_t kernel_aarch64[] = {
     0xfd, 0xff, 0xff, 0x17,                 /* b       -12 (loop) */
 };
 
+static const uint8_t kernel_nrf51[] = {
+    0x00, 0x00, 0x00, 0x00,                 /* Stack top address */
+    0x09, 0x00, 0x00, 0x00,                 /* Reset handler address */
+    0x01, 0x4b,                             /* ldr   r3,[pc,#4]    Get base */
+    0x54, 0x22,                             /* mov   r2,#'T' */
+    0x1a, 0x70,                             /* strb  r2,[r3] */
+    0x01, 0xe0,                             /* b     loop */
+    0x1c, 0x25, 0x00, 0x40,                 /* 0x40002000 = UART0 base addr */
+};
+
 typedef struct testdef {
     const char *arch;       /* Target architecture */
     const char *machine;    /* Name of the machine */
@@ -107,6 +117,7 @@ static testdef_t tests[] = {
     { "hppa", "hppa", "", "SeaBIOS wants SYSTEM HALT" },
     { "aarch64", "virt", "-cpu cortex-a57", "TT", sizeof(kernel_aarch64),
       kernel_aarch64 },
+    { "arm", "microbit", "", "T", sizeof(kernel_nrf51), kernel_nrf51 },
 
     { NULL }
 };
-- 
2.17.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]