Deleted Added
full compact
pmap.c (204152) pmap.c (205258)
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 *

--- 28 unchanged lines hidden (view full) ---

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 */
43
44#include <sys/cdefs.h>
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 *

--- 28 unchanged lines hidden (view full) ---

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 */
43
44#include <sys/cdefs.h>
45__FBSDID("$FreeBSD: head/sys/sparc64/sparc64/pmap.c 204152 2010-02-20 23:24:19Z marius $");
45__FBSDID("$FreeBSD: head/sys/sparc64/sparc64/pmap.c 205258 2010-03-17 20:23:14Z marius $");
46
47/*
48 * Manages physical address maps.
49 *
50 * In addition to hardware address maps, this module is called upon to
51 * provide software-use-only maps which may or may not be stored in the
52 * same form as hardware maps. These pseudo-maps are used to store
53 * intermediate results from copy operations to and from address spaces.

--- 513 unchanged lines hidden (view full) ---

567 stxa_sync(0, ASI_DTLB_DATA_IN_REG, data);
568 }
569
570 /*
571 * Set the secondary context to be the kernel context (needed for
572 * FP block operations in the kernel).
573 */
574 stxa(AA_DMMU_SCXR, ASI_DMMU, (ldxa(AA_DMMU_SCXR, ASI_DMMU) &
46
47/*
48 * Manages physical address maps.
49 *
50 * In addition to hardware address maps, this module is called upon to
51 * provide software-use-only maps which may or may not be stored in the
52 * same form as hardware maps. These pseudo-maps are used to store
53 * intermediate results from copy operations to and from address spaces.

--- 513 unchanged lines hidden (view full) ---

567 stxa_sync(0, ASI_DTLB_DATA_IN_REG, data);
568 }
569
570 /*
571 * Set the secondary context to be the kernel context (needed for
572 * FP block operations in the kernel).
573 */
574 stxa(AA_DMMU_SCXR, ASI_DMMU, (ldxa(AA_DMMU_SCXR, ASI_DMMU) &
575 TLB_SCXR_PGSZ_MASK) | TLB_CTX_KERNEL);
575 TLB_CXR_PGSZ_MASK) | TLB_CTX_KERNEL);
576 flush(KERNBASE);
577
578 intr_restore(s);
579}
580
581/*
582 * Allocate a physical page of memory directly from the phys_avail map.
583 * Can only be called from pmap_bootstrap before avail start and end are

--- 1400 unchanged lines hidden (view full) ---

1984
1985 pm->pm_context[curcpu] = context;
1986 pm->pm_active |= PCPU_GET(cpumask);
1987 PCPU_SET(pmap, pm);
1988
1989 stxa(AA_DMMU_TSB, ASI_DMMU, pm->pm_tsb);
1990 stxa(AA_IMMU_TSB, ASI_IMMU, pm->pm_tsb);
1991 stxa(AA_DMMU_PCXR, ASI_DMMU, (ldxa(AA_DMMU_PCXR, ASI_DMMU) &
576 flush(KERNBASE);
577
578 intr_restore(s);
579}
580
581/*
582 * Allocate a physical page of memory directly from the phys_avail map.
583 * Can only be called from pmap_bootstrap before avail start and end are

--- 1400 unchanged lines hidden (view full) ---

1984
1985 pm->pm_context[curcpu] = context;
1986 pm->pm_active |= PCPU_GET(cpumask);
1987 PCPU_SET(pmap, pm);
1988
1989 stxa(AA_DMMU_TSB, ASI_DMMU, pm->pm_tsb);
1990 stxa(AA_IMMU_TSB, ASI_IMMU, pm->pm_tsb);
1991 stxa(AA_DMMU_PCXR, ASI_DMMU, (ldxa(AA_DMMU_PCXR, ASI_DMMU) &
1992 TLB_PCXR_PGSZ_MASK) | context);
1992 TLB_CXR_PGSZ_MASK) | context);
1993 flush(KERNBASE);
1994
1995 mtx_unlock_spin(&sched_lock);
1996}
1997
1998void
1999pmap_sync_icache(pmap_t pm, vm_offset_t va, vm_size_t sz)
2000{

--- 13 unchanged lines hidden ---
1993 flush(KERNBASE);
1994
1995 mtx_unlock_spin(&sched_lock);
1996}
1997
1998void
1999pmap_sync_icache(pmap_t pm, vm_offset_t va, vm_size_t sz)
2000{

--- 13 unchanged lines hidden ---