From owner-cvs-all@FreeBSD.ORG Tue Jan 16 21:08:22 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E0E6016A4A7; Tue, 16 Jan 2007 21:08:22 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id D19FE13C441; Tue, 16 Jan 2007 21:08:22 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id l0GL8M5N032439; Tue, 16 Jan 2007 21:08:22 GMT (envelope-from marius@repoman.freebsd.org) Received: (from marius@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l0GL8MoL032432; Tue, 16 Jan 2007 21:08:22 GMT (envelope-from marius) Message-Id: <200701162108.l0GL8MoL032432@repoman.freebsd.org> From: Marius Strobl Date: Tue, 16 Jan 2007 21:08:22 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/conf files.sparc64 src/sys/dev/fb creator.c creatorreg.h src/sys/sparc64/creator creator.h creator_upa.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jan 2007 21:08:23 -0000 marius 2007-01-16 21:08:22 UTC FreeBSD src repository Modified files: sys/conf files.sparc64 sys/dev/fb creator.c creatorreg.h Removed files: sys/sparc64/creator creator.h creator_upa.c Log: - Merge sys/sparc64/creator/creator_upa.c into sys/dev/fb/creator.c. The separate bus front-end was inherited from the OpenBSD creator(4), which at that time had a mainbus(4) (for USI/II machines, which use an UPA interconnection bus as the nexus) and an upa(4) (for USIII machines, which use a subordinate/slave UPA bus hanging off from the Fireplane/Safari interconnection bus) front-end. With FreeBSD and newbus there is/will be no need to have two separate bus front-ends for these busses, so we can easily coallapse the shared front-end and the back-end into a single source file (note that the FreeBSD creator_upa.c was misnomer anyway; based on what it actually attached to that should have been creator_nexus.c), actually OpenBSD meanwhile also has moved to a shared front-end and a single source file. Due to the low-level console support creator.c also wasn't free from bus related things before. While at it, also split sys/sparc64/creator/creator.h into a sys/dev/fb/creatorreg.h that only contains register macros and move the structures to the top of sys/dev/fb/creator.c as suggested by style(9) so creator(4) is no longer scattered over two directories. - Use OF_decode_addr()/sparc64_fake_bustag() to obtain the bus tags and handles for the low-level console support instead of hardcoding support for AFB/FFB hanging off from nexus(4) only. This is part 2/4 of allowing creator(4) to work in USIII machines (which have a UPA bus hanging off from the Fireplane/Safari bus reflected by the nexus), which already makes it work as the low-level console there. - Allocate resources in the bus attach routine regardless of whether creator(4) is used as for the low-level console and thus the required bus tags and handles have been already obtained or not so the resources are marked as taken in the respective RMAN. - For both obtaining the bus tags and handles for the low-level console support as well as allocating the corresponding resources in the regular bus attach routine don't bother to get all for the maximum of 24 register banks but only (for) the two tag/handle pairs required for providing the video interface for syscons(4) support. If we can't allocate the rest of them just limit the memory range accessible via creator_fb_mmap() accordingly. - Sanity check the memory range spanned by the first and last resources and the resources in between as far as possible, as the XFree86/Xorg sunffb(4) expects to be able to access the whole region, even though the backing resources are actually non-continuous. Limit and check the memory range accessible via creator_fb_mmap() accordingly. - Reduce the size of buffers for OFW properties to what they actually need to hold. - Rename some tables to creator_ for consistency. - Also for the sizes in the creator_fb_mmap() mapping table entries use macros for consistency, add macros for the remaining register banks for completeness. Revision Changes Path 1.85 +0 -1 src/sys/conf/files.sparc64 1.11 +405 -41 src/sys/dev/fb/creator.c 1.7 +46 -45 src/sys/dev/fb/creatorreg.h 1.6 +0 -246 src/sys/sparc64/creator/creator.h (dead) 1.10 +0 -313 src/sys/sparc64/creator/creator_upa.c (dead)