From owner-svn-src-user@FreeBSD.ORG Sun Jan 22 19:37:41 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C727106566B; Sun, 22 Jan 2012 19:37:41 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D180D8FC08; Sun, 22 Jan 2012 19:37:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0MJbeXx089805; Sun, 22 Jan 2012 19:37:40 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0MJbeVv089803; Sun, 22 Jan 2012 19:37:40 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201201221937.q0MJbeVv089803@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 22 Jan 2012 19:37:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230468 - user/ed/newcons/sys/sparc64/sparc64 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jan 2012 19:37:41 -0000 Author: nwhitehorn Date: Sun Jan 22 19:37:40 2012 New Revision: 230468 URL: http://svn.freebsd.org/changeset/base/230468 Log: Make vt(4) work on sparc64, at least on systems with CHRP-compliant framebuffer devices like the Ultra 5. Because vt(4) depends on mutexes and at least one other problematic kernel subsystem I can't identify, and these things become available much later on sparc64 that on other architectures, it only works if console init is moved much later in the boot process. Moving it may not be the best solution here, but does work. Note than newcons as a whole doesn't quite work on the Ultra 5 yet, at least with a regular sun keyboard: the sunkbd driver seems not to attach without syscons for reasons that are obscure to me. Modified: user/ed/newcons/sys/sparc64/sparc64/machdep.c Modified: user/ed/newcons/sys/sparc64/sparc64/machdep.c ============================================================================== --- user/ed/newcons/sys/sparc64/sparc64/machdep.c Sun Jan 22 18:29:58 2012 (r230467) +++ user/ed/newcons/sys/sparc64/sparc64/machdep.c Sun Jan 22 19:37:40 2012 (r230468) @@ -436,21 +436,14 @@ sparc64_init(caddr_t mdp, u_long o1, u_l delay_func = delay_boot; /* - * Initialize the console before printing anything. - * NB: the low-level console drivers require a working DELAY() at - * this point. - */ - cninit(); - - /* * Panic if there is no metadata. Most likely the kernel was booted * directly, instead of through loader(8). */ if (mdp == NULL || kmdp == NULL || end == 0 || kernel_tlb_slots == 0 || kernel_tlbs == NULL) { - printf("sparc64_init: missing loader metadata.\n" + OF_printf("sparc64_init: missing loader metadata.\n" "This probably means you are not using loader(8).\n"); - panic("sparc64_init"); + OF_exit(); } /* @@ -478,11 +471,15 @@ sparc64_init(caddr_t mdp, u_long o1, u_l * to the t16s. */ if (OF_getprop(pc->pc_node, "#dtlb-entries", &dtlb_slots, - sizeof(dtlb_slots)) == -1) - panic("sparc64_init: cannot determine number of dTLB slots"); + sizeof(dtlb_slots)) == -1) { + OF_printf("sparc64_init: cannot determine number of dTLB slots"); + OF_exit(); + } if (OF_getprop(pc->pc_node, "#itlb-entries", &itlb_slots, - sizeof(itlb_slots)) == -1) - panic("sparc64_init: cannot determine number of iTLB slots"); + sizeof(itlb_slots)) == -1) { + OF_printf("sparc64_init: cannot determine number of iTLB slots"); + OF_exit(); + } /* * Initialize and enable the caches. Note that his may include @@ -590,6 +587,12 @@ sparc64_init(caddr_t mdp, u_long o1, u_l mutex_init(); /* + * Initialize console now that we have a reasonable set of system + * services. + */ + cninit(); + + /* * Finish the interrupt initialization now that mutexes work and * enable them. */