pmap.c (97444) | pmap.c (97445) |
---|---|
1/* 2 * Copyright (c) 1991 Regents of the University of California. 3 * All rights reserved. 4 * Copyright (c) 1994 John S. Dyson 5 * All rights reserved. 6 * Copyright (c) 1994 David Greenman 7 * All rights reserved. 8 * --- 25 unchanged lines hidden (view full) --- 34 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 35 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 36 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 37 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 38 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 39 * SUCH DAMAGE. 40 * 41 * from: @(#)pmap.c 7.7 (Berkeley) 5/12/91 | 1/* 2 * Copyright (c) 1991 Regents of the University of California. 3 * All rights reserved. 4 * Copyright (c) 1994 John S. Dyson 5 * All rights reserved. 6 * Copyright (c) 1994 David Greenman 7 * All rights reserved. 8 * --- 25 unchanged lines hidden (view full) --- 34 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 35 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 36 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 37 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 38 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 39 * SUCH DAMAGE. 40 * 41 * from: @(#)pmap.c 7.7 (Berkeley) 5/12/91 |
42 * $FreeBSD: head/sys/sparc64/sparc64/pmap.c 97444 2002-05-29 05:24:16Z jake $ | 42 * $FreeBSD: head/sys/sparc64/sparc64/pmap.c 97445 2002-05-29 05:49:59Z jake $ |
43 */ 44 45/* 46 * Manages physical address maps. 47 * 48 * In addition to hardware address maps, this module is called upon to 49 * provide software-use-only maps which may or may not be stored in the 50 * same form as hardware maps. These pseudo-maps are used to store --- 38 unchanged lines hidden (view full) --- 89#include <vm/vm_extern.h> 90#include <vm/vm_pageout.h> 91#include <vm/vm_pager.h> 92#include <vm/uma.h> 93 94#include <machine/cache.h> 95#include <machine/frame.h> 96#include <machine/md_var.h> | 43 */ 44 45/* 46 * Manages physical address maps. 47 * 48 * In addition to hardware address maps, this module is called upon to 49 * provide software-use-only maps which may or may not be stored in the 50 * same form as hardware maps. These pseudo-maps are used to store --- 38 unchanged lines hidden (view full) --- 89#include <vm/vm_extern.h> 90#include <vm/vm_pageout.h> 91#include <vm/vm_pager.h> 92#include <vm/uma.h> 93 94#include <machine/cache.h> 95#include <machine/frame.h> 96#include <machine/md_var.h> |
97#include <machine/metadata.h> |
|
97#include <machine/pv.h> 98#include <machine/smp.h> 99#include <machine/tlb.h> 100#include <machine/tte.h> 101#include <machine/tsb.h> 102 103#define PMAP_DEBUG 104 --- 200 unchanged lines hidden (view full) --- 305 pmap_map_tsb(); 306 bzero(tsb_kernel, KVA_PAGES * PAGE_SIZE_4M); 307 308 /* 309 * Enter fake 8k pages for the 4MB kernel pages, so that 310 * pmap_kextract() will work for them. 311 */ 312 for (i = 0; i < kernel_tlb_slots; i++) { | 98#include <machine/pv.h> 99#include <machine/smp.h> 100#include <machine/tlb.h> 101#include <machine/tte.h> 102#include <machine/tsb.h> 103 104#define PMAP_DEBUG 105 --- 200 unchanged lines hidden (view full) --- 306 pmap_map_tsb(); 307 bzero(tsb_kernel, KVA_PAGES * PAGE_SIZE_4M); 308 309 /* 310 * Enter fake 8k pages for the 4MB kernel pages, so that 311 * pmap_kextract() will work for them. 312 */ 313 for (i = 0; i < kernel_tlb_slots; i++) { |
313 va = TTE_GET_VA(&kernel_ttes[i]); 314 pa = TTE_GET_PA(&kernel_ttes[i]); | 314 pa = kernel_tlbs[i].te_pa; 315 va = kernel_tlbs[i].te_va; |
315 for (off = 0; off < PAGE_SIZE_4M; off += PAGE_SIZE) { 316 tp = tsb_kvtotte(va + off); 317 tp->tte_vpn = TV_VPN(va + off); 318 tp->tte_data = TD_V | TD_8K | TD_PA(pa + off) | 319 TD_REF | TD_SW | TD_CP | TD_CV | TD_P | TD_W; 320 } 321 } 322 --- 1415 unchanged lines hidden --- | 316 for (off = 0; off < PAGE_SIZE_4M; off += PAGE_SIZE) { 317 tp = tsb_kvtotte(va + off); 318 tp->tte_vpn = TV_VPN(va + off); 319 tp->tte_data = TD_V | TD_8K | TD_PA(pa + off) | 320 TD_REF | TD_SW | TD_CP | TD_CV | TD_P | TD_W; 321 } 322 } 323 --- 1415 unchanged lines hidden --- |