From f685f62c9869f2c8181041ae3e3d87a09d2d3fbf Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Wed, 2 Mar 2005 20:29:04 +0000 Subject: [PATCH] Make sure fpswa_iface equals NULL when bootinfo.bi_fpswa equals 0. We need to be able to test for the (possible) non-existence of the FPSWA code. PR: ia64/77591 Submitted by: Christian Kandeler (christian dot kandeler at hob dot de) MFC after: 1 day --- sys/ia64/ia64/machdep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c index 5c281b032cfc..e9866f53003f 100644 --- a/sys/ia64/ia64/machdep.c +++ b/sys/ia64/ia64/machdep.c @@ -613,7 +613,8 @@ ia64_init(void) printf("WARNING: loader(8) metadata is missing!\n"); /* Get FPSWA interface */ - fpswa_iface = (struct fpswa_iface *)IA64_PHYS_TO_RR7(bootinfo.bi_fpswa); + fpswa_iface = (bootinfo.bi_fpswa == 0) ? NULL : + (struct fpswa_iface *)IA64_PHYS_TO_RR7(bootinfo.bi_fpswa); /* Init basic tunables, including hz */ init_param1();