From owner-cvs-src-old@FreeBSD.ORG Sat Jan 30 01:54:48 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 070981065704 for ; Sat, 30 Jan 2010 01:54:48 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E85F18FC16 for ; Sat, 30 Jan 2010 01:54:47 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o0U1slZB052177 for ; Sat, 30 Jan 2010 01:54:47 GMT (envelope-from neel@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o0U1slbH052176 for cvs-src-old@freebsd.org; Sat, 30 Jan 2010 01:54:47 GMT (envelope-from neel@repoman.freebsd.org) Message-Id: <201001300154.o0U1slbH052176@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to neel@repoman.freebsd.org using -f From: Neel Natu Date: Sat, 30 Jan 2010 01:54:29 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/mips/include cpu.h pcpu.h src/sys/mips/mips genassym.c locore.S machdep.c pmap.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jan 2010 01:54:48 -0000 neel 2010-01-30 01:54:29 UTC FreeBSD src repository Modified files: sys/mips/include cpu.h pcpu.h sys/mips/mips genassym.c locore.S machdep.c pmap.c Log: SVN rev 203180 on 2010-01-30 01:54:29Z by neel Provide access to pcpu structures for SMP kernels. The basic idea is to use a the same virtual address as a window onto distinct physical memory locations - one per processor. The physical address that you access through this mapping depends on which cpu you are currently executing on. We can now use the same virtual address on any processor to access its per-cpu area. The details are: - The virtual address for 'struct pcpu *pcpup' is obtained by stealing 2 pages worth of KVA in pmap_bootstrap(). - The mapping from the constant virtual address to a distinct physical page is done in cpu_pcpu_init() through a wired TLB entry. - A side-effect of this is that we reserve 2 pages worth of memory for the pcpu but in reality it needs much less than that. The unused memory is now used as the boot stack for the BSP and APs. Remove SMP-specific bits from locore.S. The plan is to use a separate mpboot.S for AP bootstrap. Discussed on: freebsd-mips Approved by: imp (mentor) Revision Changes Path 1.4 +8 -0 src/sys/mips/include/cpu.h 1.3 +4 -24 src/sys/mips/include/pcpu.h 1.3 +0 -1 src/sys/mips/mips/genassym.c 1.5 +9 -80 src/sys/mips/mips/locore.S 1.20 +43 -12 src/sys/mips/mips/machdep.c 1.28 +13 -2 src/sys/mips/mips/pmap.c