From owner-cvs-src@FreeBSD.ORG Sun Jun 17 00:17:16 2007 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EE0B316A400; Sun, 17 Jun 2007 00:17:16 +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 DBF7C13C458; Sun, 17 Jun 2007 00:17:16 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l5H0HGBR093799; Sun, 17 Jun 2007 00:17:16 GMT (envelope-from marius@repoman.freebsd.org) Received: (from marius@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l5H0HGdi093777; Sun, 17 Jun 2007 00:17:16 GMT (envelope-from marius) Message-Id: <200706170017.l5H0HGdi093777@repoman.freebsd.org> From: Marius Strobl Date: Sun, 17 Jun 2007 00:17:16 +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/boot/ofw/common main.c src/sys/boot/ofw/libofw Makefile ofw_console.c ofw_net.c openfirm.c openfirm.h openfirm_mmu.c src/sys/boot/sparc64/loader main.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jun 2007 00:17:17 -0000 marius 2007-06-17 00:17:16 UTC FreeBSD src repository Modified files: sys/boot/ofw/common main.c sys/boot/ofw/libofw Makefile ofw_console.c ofw_net.c openfirm.c openfirm.h sys/boot/sparc64/loader main.c Removed files: sys/boot/ofw/libofw openfirm_mmu.c Log: - Make better use of the global chosen, memory and mmu handles instead of obtaining them over and over again and pretending we could do anything useful without them (for chosen this includes adding a declaration and initializing it in OF_init()). - In OF_init() if obtaining the memory or mmu handle fails just call OF_exit() instead of panic() as the loader hasn't initialized the console at these early stages yet and trying to print out something causes a hang. With OF_exit() one at least has a change to get back to the OFW boot monitor and debug the problem. - Fix OF_call_method() on 64-bit machines (this is a merge of sys/dev/ofw/openfirm.c rev 1.6). - Replace OF_alloc_phys(), OF_claim_virt(), OF_map_phys() and OF_release_phys() in the MI part of the loader with wrappers around OF_call_method() in the sparc64. Beside the fact that they duplicate OF_call_method() the formers should never have been in the MI part of the loader as contrary to the OFW spec they use two-cell physical addresses. - Remove unused functions which are also MD dupes of OF_call_method(). - In sys/boot/sparc64/loader/main.c add __func__ to panic strings as different functions use otherwise identical panic strings and make some of the panic strings a tad more user-friendly instead of just mentioning the name of the function that returned an unexpected result. Revision Changes Path 1.9 +4 -8 src/sys/boot/ofw/common/main.c 1.11 +1 -1 src/sys/boot/ofw/libofw/Makefile 1.12 +0 -5 src/sys/boot/ofw/libofw/ofw_console.c 1.11 +1 -2 src/sys/boot/ofw/libofw/ofw_net.c 1.15 +11 -112 src/sys/boot/ofw/libofw/openfirm.c 1.11 +1 -10 src/sys/boot/ofw/libofw/openfirm.h 1.2 +0 -143 src/sys/boot/ofw/libofw/openfirm_mmu.c (dead) 1.32 +78 -52 src/sys/boot/sparc64/loader/main.c