From owner-p4-projects@FreeBSD.ORG Thu Mar 1 18:14:46 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C1CAC1065670; Thu, 1 Mar 2012 18:14:46 +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 41820106566C for ; Thu, 1 Mar 2012 18:14:46 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 296148FC0A for ; Thu, 1 Mar 2012 18:14:46 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id q21IEkxY029234 for ; Thu, 1 Mar 2012 18:14:46 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id q21IEjqH029231 for perforce@freebsd.org; Thu, 1 Mar 2012 18:14:45 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Thu, 1 Mar 2012 18:14:45 GMT Message-Id: <201203011814.q21IEjqH029231@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 207172 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Mar 2012 18:14:47 -0000 http://p4web.freebsd.org/@@207172?ac=10 Change 207172 by rwatson@rwatson_svr_ctsrd_mipsbuild on 2012/03/01 18:13:51 Revert an early de facto design choice in FreeBSD/CHERI that placed the FreeBSD kernel in the MIPS xphys segment. Instead, place the kernel in ckseg, where it expects to be -- there are a number of implicit assumptions in the kernel exception handler and elsewhere which are worth fixing, but don't have to be fixed yet. I've also shifted the kernel slightly higher in physical memory to move it away from the MIPS exception vectors, etc. It can probably be moved back down a bit to recover some physical memory, at some point. Alternatively, we might move the boot stack to that area in miniboot. (As Marko Zec has pointed out, the change I made to the exception handler was also 64-bit specific due to using dla, which was easy to fix, and is worth doing later when we revisit this.) Affected files ... .. //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI#3 edit .. //depot/projects/ctsrd/beribsd/src/sys/mips/mips/exception.S#5 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI#3 (text+ko) ==== @@ -14,7 +14,7 @@ makeoptions ARCH_FLAGS="-march=mips64 -mabi=64" -makeoptions KERNLOADADDR=0x9800000000000000 +makeoptions KERNLOADADDR=0xffffffff80100000 include "../beri/std.beri" ==== //depot/projects/ctsrd/beribsd/src/sys/mips/mips/exception.S#5 (text+ko) ==== @@ -90,8 +90,7 @@ VECTOR(MipsTLBMiss, unknown) .set push .set noat - dla k0, MipsDoTLBMiss - jr k0 + j MipsDoTLBMiss MFC0 k0, MIPS_COP_0_BAD_VADDR # get the fault address .set pop VECTOR_END(MipsTLBMiss)