9dd3fbb0f2
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) |
||
---|---|---|
.. | ||
_align.h | ||
_bus_octeon.h | ||
_bus.h | ||
_inttypes.h | ||
_limits.h | ||
_stdint.h | ||
_types.h | ||
archtype.h | ||
asm.h | ||
asmacros.h | ||
atomic.h | ||
bootinfo.h | ||
bswap.h | ||
bus_dma.h | ||
bus.h | ||
cache_mipsNN.h | ||
cache_r4k.h | ||
cache.h | ||
cdefs.h | ||
clock.h | ||
clockvar.h | ||
cpu.h | ||
cpufunc.h | ||
cpuinfo.h | ||
cpuregs.h | ||
cputypes.h | ||
db_machdep.h | ||
defs.h | ||
elf.h | ||
endian.h | ||
exec.h | ||
float.h | ||
floatingpoint.h | ||
fls64.h | ||
fpu.h | ||
frame.h | ||
gdb_machdep.h | ||
hwfunc.h | ||
ieee.h | ||
ieeefp.h | ||
in_cksum.h | ||
intr_machdep.h | ||
iodev.h | ||
kdb.h | ||
limits.h | ||
locore.h | ||
md_var.h | ||
memdev.h | ||
metadata.h | ||
minidump.h | ||
mips_opcode.h | ||
mp_watchdog.h | ||
mutex.h | ||
param.h | ||
pcb.h | ||
pci_cfgreg.h | ||
pcpu.h | ||
pmap.h | ||
pmc_mdep.h | ||
ppireg.h | ||
proc.h | ||
profile.h | ||
psl.h | ||
pte.h | ||
ptrace.h | ||
queue.h | ||
reg.h | ||
regdef.h | ||
regnum.h | ||
reloc.h | ||
resource.h | ||
rm7000.h | ||
runq.h | ||
segments.h | ||
setjmp.h | ||
sf_buf.h | ||
sigframe.h | ||
signal.h | ||
smp.h | ||
stdarg.h | ||
sysarch.h | ||
timerreg.h | ||
trap.h | ||
ucontext.h | ||
varargs.h | ||
vm.h | ||
vmparam.h |