1/*- 2 * Copyright (c) 2001 The NetBSD Foundation, Inc. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to The NetBSD Foundation 6 * by Matt Thomas <matt@3am-software.com> of Allegro Networks, Inc. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 77 unchanged lines hidden (view full) --- 86 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 87 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 88 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 89 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 90 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 91 */ 92 93#include <sys/cdefs.h> |
94__FBSDID("$FreeBSD: head/sys/powerpc/aim/mmu_oea64.c 215159 2010-11-12 04:18:19Z nwhitehorn $"); |
95 96/* 97 * Manages physical address maps. 98 * 99 * In addition to hardware address maps, this module is called upon to 100 * provide software-use-only maps which may or may not be stored in the 101 * same form as hardware maps. These pseudo-maps are used to store 102 * intermediate results from copy operations to and from address spaces. --- 2277 unchanged lines hidden (view full) --- 2380 s = (phys_avail[i] + align - 1) & ~(align - 1); 2381 else 2382 s = phys_avail[i]; 2383 e = s + size; 2384 2385 if (s < phys_avail[i] || e > phys_avail[i + 1]) 2386 continue; 2387 |
2388 if (s + size > platform_real_maxaddr()) 2389 continue; 2390 |
2391 if (s == phys_avail[i]) { 2392 phys_avail[i] += size; 2393 } else if (e == phys_avail[i + 1]) { 2394 phys_avail[i + 1] -= size; 2395 } else { 2396 for (j = phys_avail_count * 2; j > i; j -= 2) { 2397 phys_avail[j] = phys_avail[j - 2]; 2398 phys_avail[j + 1] = phys_avail[j - 1]; --- 698 unchanged lines hidden --- |