diff mbox

[v3,16/16] boot-order-test: Add tests for Sun4u

Message ID 1371208516-7857-17-git-send-email-armbru@redhat.com
State New
Headers show

Commit Message

Markus Armbruster June 14, 2013, 11:15 a.m. UTC
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 tests/boot-order-test.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
diff mbox

Patch

diff --git a/tests/boot-order-test.c b/tests/boot-order-test.c
index d1d99f8..37c7227 100644
--- a/tests/boot-order-test.c
+++ b/tests/boot-order-test.c
@@ -198,6 +198,18 @@  static void test_sun4m_boot_order(void)
     test_boot_orders("SS-5", read_boot_order_sun4m, test_cases_fw_cfg);
 }
 
+#define SUN4U_CFG_IOPORT 0x510
+
+static uint64_t read_boot_order_sun4u(void)
+{
+    return read_fw_cfg_i16(SUN4U_CFG_IOPORT, true, FW_CFG_BOOT_DEVICE);
+}
+
+static void test_sun4u_boot_order(void)
+{
+    test_boot_orders("sun4u", read_boot_order_sun4u, test_cases_fw_cfg);
+}
+
 int main(int argc, char *argv[])
 {
     const char *arch = qtest_get_arch();
@@ -214,6 +226,8 @@  int main(int argc, char *argv[])
                        test_pmac_newworld_boot_order);
     } else if (strcmp(arch, "sparc") == 0) {
         qtest_add_func("boot-order/sun4m", test_sun4m_boot_order);
+    } else if (strcmp(arch, "sparc64") == 0) {
+        qtest_add_func("boot-order/sun4u", test_sun4u_boot_order);
     }
 
     return g_test_run();