Deleted Added
full compact
pmap.c (61074) pmap.c (61081)
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/i386/i386/pmap.c 61074 2000-05-29 19:21:01Z dfr $
42 * $FreeBSD: head/sys/i386/i386/pmap.c 61081 2000-05-29 22:40:54Z dillon $
43 */
44
45/*
46 * Manages physical address maps.
47 *
48 * In addition to hardware address maps, this
49 * module is called upon to provide software-use-only
50 * maps which may or may not be stored in the same

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

2090 panic("pmap_enter: pte vanished, va: 0x%x", va);
2091 }
2092
2093 /*
2094 * Enter on the PV list if part of our managed memory. Note that we
2095 * raise IPL while manipulating pv_table since pmap_enter can be
2096 * called at interrupt time.
2097 */
43 */
44
45/*
46 * Manages physical address maps.
47 *
48 * In addition to hardware address maps, this
49 * module is called upon to provide software-use-only
50 * maps which may or may not be stored in the same

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

2090 panic("pmap_enter: pte vanished, va: 0x%x", va);
2091 }
2092
2093 /*
2094 * Enter on the PV list if part of our managed memory. Note that we
2095 * raise IPL while manipulating pv_table since pmap_enter can be
2096 * called at interrupt time.
2097 */
2098 if (pmap_initialized && (m->flags & PG_FICTITIOUS) == 0) {
2098 if (pmap_initialized &&
2099 (m->flags & (PG_FICTITIOUS|PG_UNMANAGED)) == 0) {
2099 pmap_insert_entry(pmap, va, mpte, m);
2100 pa |= PG_MANAGED;
2101 }
2102
2103 /*
2104 * Increment counters
2105 */
2106 pmap->pm_stats.resident_count++;

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

2218 return 0;
2219 }
2220
2221 /*
2222 * Enter on the PV list if part of our managed memory. Note that we
2223 * raise IPL while manipulating pv_table since pmap_enter can be
2224 * called at interrupt time.
2225 */
2100 pmap_insert_entry(pmap, va, mpte, m);
2101 pa |= PG_MANAGED;
2102 }
2103
2104 /*
2105 * Increment counters
2106 */
2107 pmap->pm_stats.resident_count++;

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

2219 return 0;
2220 }
2221
2222 /*
2223 * Enter on the PV list if part of our managed memory. Note that we
2224 * raise IPL while manipulating pv_table since pmap_enter can be
2225 * called at interrupt time.
2226 */
2226 pmap_insert_entry(pmap, va, mpte, m);
2227 if ((m->flags & (PG_FICTITIOUS|PG_UNMANAGED)) == 0)
2228 pmap_insert_entry(pmap, va, mpte, m);
2227
2228 /*
2229 * Increment counters
2230 */
2231 pmap->pm_stats.resident_count++;
2232
2233 pa = VM_PAGE_TO_PHYS(m);
2234
2235 /*
2236 * Now validate mapping with RO protection
2237 */
2229
2230 /*
2231 * Increment counters
2232 */
2233 pmap->pm_stats.resident_count++;
2234
2235 pa = VM_PAGE_TO_PHYS(m);
2236
2237 /*
2238 * Now validate mapping with RO protection
2239 */
2238 *pte = pa | PG_V | PG_U | PG_MANAGED;
2240 if (m->flags & (PG_FICTITIOUS|PG_UNMANAGED))
2241 *pte = pa | PG_V | PG_U;
2242 else
2243 *pte = pa | PG_V | PG_U | PG_MANAGED;
2239
2240 return mpte;
2241}
2242
2243/*
2244 * Make a temporary mapping for a physical address. This is only intended
2245 * to be used for panic dumps.
2246 */

--- 1182 unchanged lines hidden ---
2244
2245 return mpte;
2246}
2247
2248/*
2249 * Make a temporary mapping for a physical address. This is only intended
2250 * to be used for panic dumps.
2251 */

--- 1182 unchanged lines hidden ---