From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34144) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnRya-0000pr-6Q for qemu-devel@nongnu.org; Fri, 14 Jun 2013 07:15:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UnRyV-0004pm-3c for qemu-devel@nongnu.org; Fri, 14 Jun 2013 07:15:28 -0400 Received: from oxygen.pond.sub.org ([2a01:4f8:121:10e4::3]:44251) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnRyU-0004ok-Tc for qemu-devel@nongnu.org; Fri, 14 Jun 2013 07:15:23 -0400 From: Markus Armbruster Date: Fri, 14 Jun 2013 13:15:14 +0200 Message-Id: <1371208516-7857-15-git-send-email-armbru@redhat.com> In-Reply-To: <1371208516-7857-1-git-send-email-armbru@redhat.com> References: <1371208516-7857-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH v3 14/16] boot-order-test: Add tests for Sun4m List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, jan.kiszka@siemens.com, Blue Swirl , alex.williamson@redhat.com, aviksil@linux.vnet.ibm.com, afaerber@suse.de Cc: Blue Swirl Signed-off-by: Markus Armbruster --- tests/boot-order-test.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/boot-order-test.c b/tests/boot-order-test.c index 0060905..7b1edc1 100644 --- a/tests/boot-order-test.c +++ b/tests/boot-order-test.c @@ -178,6 +178,18 @@ static void test_pmac_newworld_boot_order(void) test_boot_orders("mac99", read_boot_order_pmac, test_cases_fw_cfg); } +#define SUN4M_CFG_ADDR 0xd00000510ULL + +static uint64_t read_boot_order_sun4m(void) +{ + return read_fw_cfg_i16(SUN4M_CFG_ADDR, 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(); @@ -192,6 +204,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(); -- 1.7.11.7