summaryrefslogtreecommitdiffstats
path: root/lib/libefi
diff options
context:
space:
mode:
authorneel <neel@FreeBSD.org>2010-01-30 01:54:29 +0000
committerneel <neel@FreeBSD.org>2010-01-30 01:54:29 +0000
commitf0bf9d2db51362dc110f356c69e11ac2355d6f55 (patch)
tree81667bb5b869a3c295f335f03dbc4a102cc7ac3f /lib/libefi
parent248442cb37a7afa0c71a61294afe194b8f72e0d9 (diff)
downloadFreeBSD-src-f0bf9d2db51362dc110f356c69e11ac2355d6f55.zip
FreeBSD-src-f0bf9d2db51362dc110f356c69e11ac2355d6f55.tar.gz
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)
Diffstat (limited to 'lib/libefi')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud