From owner-cvs-src@FreeBSD.ORG Fri May 23 17:17:34 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E3B4837B401; Fri, 23 May 2003 17:17:34 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8DEE343F75; Fri, 23 May 2003 17:17:34 -0700 (PDT) (envelope-from marcel@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4O0HY0U004898; Fri, 23 May 2003 17:17:34 -0700 (PDT) (envelope-from marcel@repoman.freebsd.org) Received: (from marcel@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4O0HYhv004897; Fri, 23 May 2003 17:17:34 -0700 (PDT) Message-Id: <200305240017.h4O0HYhv004897@repoman.freebsd.org> From: Marcel Moolenaar Date: Fri, 23 May 2003 17:17:34 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/ia64/ia64 locore.s machdep.c src/sys/ia64/include cpu.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 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: Sat, 24 May 2003 00:17:35 -0000 marcel 2003/05/23 17:17:34 PDT FreeBSD src repository Modified files: sys/ia64/ia64 locore.s machdep.c sys/ia64/include cpu.h Log: Fix an alpha inheritance bug: On alpha, PAL is involved in context management and after wiring the CPU (in alpha_init()) a context switch was performed to tell PAL about the context. This was bogusly brought over to ia64 where it introduced bugs, because we restored the context from a mostly uninitialized PCB. The cleanup constitutes: o Remove the unused arguments from ia64_init(). o Don't return from ia64_init(), but instead call mi_startup() directly. This reduces the amount of muckery in assembly and also allows for the next bullet: o Save our currect context prior to calling mi_startup(). The reason for this is that many threads are created from thread0 by cloning the PCB. By saving our context in the PCB, we have something sane to clone. It also ensures that a cloned thread that does not alter the context in any way will return to the saved context, where we're ready for the eventuality with a nice, user unfriendly panic(). The cleanup fixes at least the following bugs: o Entering mi_startup() with the RSE in enforced lazy mode. o Re-execution of ia64_init() in certain "lab" conditions. While here, add proper unwind directives to __start() so that the unwind knows it has reached the bottom of the (call) stack. Approved by: re@ (blanket) Revision Changes Path 1.31 +5 -33 src/sys/ia64/ia64/locore.s 1.134 +17 -1 src/sys/ia64/ia64/machdep.c 1.30 +1 -1 src/sys/ia64/include/cpu.h