Deleted Added
sdiff udiff text old ( 174599 ) new ( 174782 )
full compact
1/*-
2 * Copyright (C) 1996 Wolfgang Solfrank.
3 * Copyright (C) 1996 TooLs GmbH.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

27 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
28 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
29 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 *
31 * $NetBSD: ofw_machdep.c,v 1.5 2000/05/23 13:25:43 tsubai Exp $
32 */
33
34#include <sys/cdefs.h>
35__FBSDID("$FreeBSD: head/sys/powerpc/aim/ofw_machdep.c 174782 2007-12-19 18:00:50Z marcel $");
36
37#include <sys/param.h>
38#include <sys/bus.h>
39#include <sys/systm.h>
40#include <sys/conf.h>
41#include <sys/disk.h>
42#include <sys/fcntl.h>
43#include <sys/malloc.h>

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

410 }
411
412 next:
413 bridge = parent;
414 parent = OF_parent(bridge);
415 OF_get_addr_props(bridge, &naddr, &nsize, &pci);
416 }
417
418 *tag = &bs_le_tag;
419 return (bus_space_map(*tag, addr, size, 0, handle));
420}
421
422int
423mem_valid(vm_offset_t addr, int len)
424{
425 int i;
426
427 for (i = 0; i < OFMEM_REGIONS; i++)
428 if ((addr >= OFmem[i].mr_start)
429 && (addr + len < OFmem[i].mr_start + OFmem[i].mr_size))
430 return (0);
431
432 return (EFAULT);
433}