182309Speter/*- 2158501Speter * Copyright (c) Peter Wemm 382309Speter * All rights reserved. 482309Speter * 582309Speter * Redistribution and use in source and binary forms, with or without 682309Speter * modification, are permitted provided that the following conditions 782309Speter * are met: 882309Speter * 1. Redistributions of source code must retain the above copyright 982309Speter * notice, this list of conditions and the following disclaimer. 1082309Speter * 2. Redistributions in binary form must reproduce the above copyright 1182309Speter * notice, this list of conditions and the following disclaimer in the 1282309Speter * documentation and/or other materials provided with the distribution. 1382309Speter * 1482309Speter * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1582309Speter * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1682309Speter * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1782309Speter * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 1882309Speter * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1982309Speter * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2082309Speter * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2182309Speter * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2282309Speter * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2382309Speter * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2482309Speter * SUCH DAMAGE. 2582309Speter * 2682309Speter * $FreeBSD$ 2782309Speter */ 2882309Speter 2982309Speter#ifndef _MACHINE_PRIVATESPACE_H_ 3082309Speter#define _MACHINE_PRIVATESPACE_H_ 3182309Speter 3282309Speter/* 3382309Speter * This is the upper (0xff800000) address space layout that is per-cpu. 3482309Speter * It is setup in locore.s and pmap.c for the BSP and in mp_machdep.c for 3582309Speter * each AP. This is only applicable to the x86 SMP kernel. 3682309Speter */ 3782309Speterstruct privatespace { 3882309Speter /* page 0 - data page */ 3987702Sjhb struct pcpu pcpu; 4087702Sjhb char __filler0[PAGE_SIZE - sizeof(struct pcpu)]; 4182309Speter 4283366Sjulian /* page 1 - idle stack (KSTACK_PAGES pages) */ 4383366Sjulian char idlekstack[KSTACK_PAGES * PAGE_SIZE]; 4483366Sjulian /* page 1+KSTACK_PAGES... */ 4582309Speter}; 4682309Speter 4782309Speterextern struct privatespace SMP_prvspace[]; 4882309Speter 4982309Speter#endif /* ! _MACHINE_PRIVATESPACE_H_ */ 50