From owner-p4-projects@FreeBSD.ORG Tue Nov 18 13:49:11 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 074A21065678; Tue, 18 Nov 2008 13:49:11 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF8821065673 for ; Tue, 18 Nov 2008 13:49:10 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B008D8FC19 for ; Tue, 18 Nov 2008 13:49:10 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id mAIDnAx0048863 for ; Tue, 18 Nov 2008 13:49:10 GMT (envelope-from nwhitehorn@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id mAIDnAAs048861 for perforce@freebsd.org; Tue, 18 Nov 2008 13:49:10 GMT (envelope-from nwhitehorn@freebsd.org) Date: Tue, 18 Nov 2008 13:49:10 GMT Message-Id: <200811181349.mAIDnAAs048861@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to nwhitehorn@freebsd.org using -f From: Nathan Whitehorn To: Perforce Change Reviews Cc: Subject: PERFORCE change 153133 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2008 13:49:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=153133 Change 153133 by nwhitehorn@nwhitehorn_trantor on 2008/11/18 13:48:55 Update sun4v to pluggable Open Firmware as well. Fix a style(9) breakage in sparc64/machdep.c. Affected files ... .. //depot/projects/ppc-g5/sys/sparc64/sparc64/machdep.c#5 edit .. //depot/projects/ppc-g5/sys/sun4v/include/ofw_machdep.h#2 edit .. //depot/projects/ppc-g5/sys/sun4v/sun4v/machdep.c#2 edit .. //depot/projects/ppc-g5/sys/sun4v/sun4v/mp_machdep.c#2 edit .. //depot/projects/ppc-g5/sys/sun4v/sun4v/support.S#2 edit .. //depot/projects/ppc-g5/sys/sun4v/sun4v/trap.c#2 edit Differences ... ==== //depot/projects/ppc-g5/sys/sparc64/sparc64/machdep.c#5 (text+ko) ==== @@ -275,7 +275,9 @@ */ tick_stop(); - /* Set up Open Firmware entry points */ + /* + * Set up Open Firmware entry points + */ ofw_tba = rdpr(tba); ofw_vec = (u_long)vec; ==== //depot/projects/ppc-g5/sys/sun4v/include/ofw_machdep.h#2 (text+ko) ==== ==== //depot/projects/ppc-g5/sys/sun4v/sun4v/machdep.c#2 (text+ko) ==== @@ -310,18 +310,18 @@ end = 0; kmdp = NULL; - /* - * Initialize Open Firmware (needed for console). - */ - OF_init(vec); - - /* * XXX */ bootverbose = 1; /* + * Set up Open Firmware entry points + */ + ofw_tba = rdpr(tba); + ofw_vec = (u_long)vec; + + /* * Parse metadata if present and fetch parameters. Must be before the * console is inited so cninit gets the right value of boothowto. */ @@ -344,6 +344,12 @@ init_param1(); + /* + * Initialize Open Firmware (needed for console). + */ + OF_install(OFW_STD_DIRECT, 0); + OF_init(ofw_entry); + root = OF_peer(0); for (child = OF_child(root); child != 0; child = OF_peer(child)) { OF_getprop(child, "device_type", type, sizeof(type)); @@ -516,13 +522,6 @@ } void -set_openfirm_callback(ofw_vec_t *vec) -{ - ofw_tba = rdpr(tba); - ofw_vec = (u_long)vec; -} - -void sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) { struct trapframe *tf; ==== //depot/projects/ppc-g5/sys/sun4v/sun4v/mp_machdep.c#2 (text+ko) ==== @@ -272,7 +272,7 @@ args.cpuid = cpuid; args.func = (cell_t)func; args.arg = (cell_t)arg; - openfirmware(&args); + ofw_entry(&args); return (int)args.result; } ==== //depot/projects/ppc-g5/sys/sun4v/sun4v/support.S#2 (text+ko) ==== @@ -622,9 +622,9 @@ END(setjmp) /* - * void openfirmware(cell_t args[]) + * void ofw_entry(cell_t args[]) */ -ENTRY(openfirmware) +ENTRY(ofw_entry) save %sp, -CCFSZ, %sp SET(ofw_vec, %l7, %l6) ldx [%l6], %l6 @@ -635,14 +635,14 @@ wrpr %l7, 0, %pil ret restore %o0, %g0, %o0 -END(openfirmware) +END(ofw_entry) #ifdef notyet /* SUN4V_FIXME - uses a now illegal ASI */ /* * void ofw_exit(cell_t args[]) */ -ENTRY(openfirmware_exit) +ENTRY(ofw_exit) save %sp, -CCFSZ, %sp flushw wrpr %g0, PIL_TICK, %pil @@ -661,7 +661,7 @@ call %l6 mov %i0, %o0 ! never to return -END(openfirmware_exit) +END(ofw_exit) #endif ENTRY(set_mmfsa_scratchpad) ==== //depot/projects/ppc-g5/sys/sun4v/sun4v/trap.c#2 (text+ko) ==== @@ -261,7 +261,7 @@ args.tba_addr = (cell_t)tba_addr; args.mmfsa_ra = mmfsa_ra; - openfirmware(&args); + ofw_entry(&args); } void