]> git.proxmox.com Git - mirror_qemu.git/commitdiff
boot-order-test: Add tests for Sun4m
authorMarkus Armbruster <armbru@redhat.com>
Wed, 26 Jun 2013 13:52:21 +0000 (15:52 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Thu, 18 Jul 2013 18:27:47 +0000 (13:27 -0500)
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-id: 1372254743-15808-11-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
tests/boot-order-test.c

index 75b164219d33ef7f1952bc8c6ba7ef67478118aa..a3928ed3c6b430e6b381f49f7ac84c037796d82a 100644 (file)
@@ -161,6 +161,18 @@ static void test_pmac_newworld_boot_order(void)
     test_boot_orders("mac99", read_boot_order_pmac, test_cases_fw_cfg);
 }
 
+static uint64_t read_boot_order_sun4m(void)
+{
+    QFWCFG *fw_cfg = mm_fw_cfg_init(0xd00000510ULL);
+
+    return qfw_cfg_get_u16(fw_cfg, FW_CFG_BOOT_DEVICE);
+}
+
+static void test_sun4m_boot_order(void)
+{
+    test_boot_orders("SS-5", read_boot_order_sun4m, test_cases_fw_cfg);
+}
+
 int main(int argc, char *argv[])
 {
     const char *arch = qtest_get_arch();
@@ -175,6 +187,8 @@ int main(int argc, char *argv[])
                        test_pmac_oldworld_boot_order);
         qtest_add_func("boot-order/pmac_newworld",
                        test_pmac_newworld_boot_order);
+    } else if (strcmp(arch, "sparc") == 0) {
+        qtest_add_func("boot-order/sun4m", test_sun4m_boot_order);
     }
 
     return g_test_run();