Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / arch / powerpc / oea / ofwoea_machdep.c
blobbba01d27e28886f9c97982697678b7e545b62249
1 /* $NetBSD: ofwoea_machdep.c,v 1.16 2008/11/30 18:21:35 martin Exp $ */
3 /*-
4 * Copyright (c) 2007 The NetBSD Foundation, Inc.
5 * All rights reserved.
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Tim Rightnour
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
32 #include <sys/cdefs.h>
33 __KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.16 2008/11/30 18:21:35 martin Exp $");
35 #include "opt_ppcarch.h"
36 #include "opt_compat_netbsd.h"
37 #include "opt_ddb.h"
38 #include "opt_kgdb.h"
39 #include "opt_ipkdb.h"
40 #include "opt_modular.h"
42 #include <sys/param.h>
43 #include <sys/buf.h>
44 #include <sys/boot_flag.h>
45 #include <sys/extent.h>
46 #include <sys/kernel.h>
47 #include <sys/ksyms.h>
48 #include <uvm/uvm_extern.h>
50 #include <dev/ofw/openfirm.h>
51 #include <machine/pmap.h>
52 #include <machine/powerpc.h>
53 #include <machine/trap.h>
54 #include <machine/vmparam.h>
55 #include <machine/autoconf.h>
56 #include <powerpc/bus.h>
57 #include <powerpc/oea/bat.h>
58 #include <powerpc/oea/cpufeat.h>
59 #include <powerpc/ofw_bus.h>
60 #include <powerpc/ofw_cons.h>
61 #include <powerpc/spr.h>
62 #include <arch/powerpc/pic/picvar.h>
64 #include "opt_oea.h"
66 #include "ksyms.h"
68 #ifdef DDB
69 #include <machine/db_machdep.h>
70 #include <ddb/db_extern.h>
71 #endif
73 #ifdef KGDB
74 #include <sys/kgdb.h>
75 #endif
77 #ifdef IPKDB
78 #include <ipkdb/ipkdb.h>
79 #endif
81 #include "opt_ofwoea.h"
83 #ifdef ofppc
84 extern struct model_data modeldata;
85 #endif
87 #ifdef OFWOEA_DEBUG
88 #define DPRINTF printf
89 #else
90 #define DPRINTF while (0) printf
91 #endif
93 typedef struct _rangemap {
94 u_int32_t addr;
95 u_int32_t size;
96 int type;
97 } rangemap_t;
99 struct ofw_translations {
100 vaddr_t va;
101 int len;
102 #if defined (PMAC_G5)
103 register64_t pa;
104 #else
105 register_t pa;
106 #endif
107 int mode;
108 }__attribute__((packed));
110 struct pmap ofw_pmap;
111 struct ofw_translations ofmap[32];
112 char bootpath[256];
113 char model_name[64];
114 #if NKSYMS || defined(DDB) || defined(MODULAR)
115 void *startsym, *endsym;
116 #endif
117 #ifdef TIMEBASE_FREQ
118 u_int timebase_freq = TIMEBASE_FREQ;
119 #else
120 u_int timebase_freq = 0;
121 #endif
123 extern int ofmsr;
124 extern int chosen;
125 extern uint32_t ticks_per_sec;
126 extern uint32_t ns_per_tick;
127 extern uint32_t ticks_per_intr;
129 static int save_ofmap(struct ofw_translations *, int);
130 static void restore_ofmap(struct ofw_translations *, int);
131 static void set_timebase(void);
133 extern void cpu_spinstart(u_int);
134 volatile u_int cpu_spinstart_ack, cpu_spinstart_cpunum;
136 void
137 ofwoea_initppc(u_int startkernel, u_int endkernel, char *args)
139 int ofmaplen, node, l;
140 register_t scratch;
142 #if defined(MULTIPROCESSOR) && defined(ofppc)
143 char cpupath[32];
144 int i;
145 #endif
147 /* initialze bats */
148 if ((oeacpufeat & OEACPU_NOBAT) == 0)
149 ofwoea_batinit();
151 #if NKSYMS || defined(DDB) || defined(MODULAR)
152 /* get info of kernel symbol table from bootloader */
153 memcpy(&startsym, args + strlen(args) + 1, sizeof(startsym));
154 memcpy(&endsym, args + strlen(args) + 1 + sizeof(startsym),
155 sizeof(endsym));
156 if (startsym == NULL || endsym == NULL)
157 startsym = endsym = NULL;
158 #endif
160 /* get model name and perform model-specific actions */
161 memset(model_name, 0, sizeof(model_name));
162 node = OF_finddevice("/");
163 if (node >= 0) {
164 l = OF_getprop(node, "model", model_name, sizeof(model_name));
165 if (l == -1)
166 OF_getprop(node, "name", model_name,
167 sizeof(model_name));
168 model_init();
171 ofwoea_consinit();
173 #if defined(MULTIPROCESSOR) && defined(ofppc)
174 for (i=1; i < CPU_MAXNUM; i++) {
175 sprintf(cpupath, "/cpus/@%x", i);
176 node = OF_finddevice(cpupath);
177 if (node <= 0)
178 continue;
179 aprint_verbose("Starting up CPU %d %s\n", i, cpupath);
180 OF_start_cpu(node, (u_int)cpu_spinstart, i);
181 for (l=0; l < 100000000; l++) {
182 if (cpu_spinstart_ack == i) {
183 aprint_verbose("CPU %d spun up.\n", i);
184 break;
186 __asm volatile ("sync");
189 #endif
191 oea_init(pic_ext_intr);
193 ofmaplen = save_ofmap(NULL, 0);
194 if (ofmaplen > 0)
195 save_ofmap(ofmap, ofmaplen);
197 ofmsr &= ~PSL_IP;
199 /* Parse the args string */
200 if (args) {
201 strcpy(bootpath, args);
202 args = bootpath;
203 while (*++args && *args != ' ');
204 if (*args) {
205 *args++ = 0;
206 while (*args)
207 BOOT_FLAG(*args++, boothowto);
211 uvm_setpagesize();
213 #if defined (PPC_OEA64_BRIDGE) && defined (PPC_OEA)
214 if (oeacpufeat & OEACPU_64_BRIDGE)
215 pmap_setup64bridge();
216 else
217 pmap_setup32();
218 #endif
219 pmap_bootstrap(startkernel, endkernel);
221 /* as far as I can tell, the pmap_setup_seg0 stuff is horribly broken */
222 #if defined(PPC_OEA64) || defined (PPC_OEA64_BRIDGE)
223 #if defined (PMAC_G5)
224 /* Mapin 1st 256MB segment 1:1, also map in mem needed to access OFW*/
225 if (oeacpufeat & OEACPU_64_BRIDGE)
226 pmap_setup_segment0_map(0, 0xff800000, 0x3fc00000, 0x400000,
227 0x0);
228 #elif defined (MAMBO)
229 /* Mapin 1st 256MB segment 1:1, also map in mem needed to access OFW*/
230 if (oeacpufeat & OEACPU_64_BRIDGE)
231 pmap_setup_segment0_map(0, 0xf4000000, 0xf4000000, 0x1000, 0x0);
232 #endif /* PMAC_G5 */
233 #endif /* PPC_OEA64 || PPC_OEA64_BRIDGE */
235 /* Now enable translation (and machine checks/recoverable interrupts) */
236 __asm __volatile ("sync; mfmsr %0; ori %0,%0,%1; mtmsr %0; isync"
237 : "=r"(scratch)
238 : "K"(PSL_IR|PSL_DR|PSL_ME|PSL_RI));
240 restore_ofmap(ofmap, ofmaplen);
242 #if NKSYMS || defined(DDB) || defined(MODULAR)
243 ksyms_addsyms_elf((int)((u_int)endsym - (u_int)startsym), startsym, endsym);
244 #endif
246 /* CPU clock stuff */
247 set_timebase();
250 void
251 set_timebase(void)
253 int qhandle, phandle, msr, scratch;
254 char type[32];
256 if (timebase_freq != 0) {
257 ticks_per_sec = timebase_freq;
258 goto found;
261 for (qhandle = OF_peer(0); qhandle; qhandle = phandle) {
262 if (OF_getprop(qhandle, "device_type", type, sizeof type) > 0
263 && strcmp(type, "cpu") == 0
264 && OF_getprop(qhandle, "timebase-frequency",
265 &ticks_per_sec, sizeof ticks_per_sec) > 0) {
266 goto found;
268 if ((phandle = OF_child(qhandle)))
269 continue;
270 while (qhandle) {
271 if ((phandle = OF_peer(qhandle)))
272 break;
273 qhandle = OF_parent(qhandle);
276 panic("no cpu node");
278 found:
279 __asm volatile ("mfmsr %0; andi. %1,%0,%2; mtmsr %1"
280 : "=r"(msr), "=r"(scratch) : "K"((u_short)~PSL_EE));
281 ns_per_tick = 1000000000 / ticks_per_sec;
282 ticks_per_intr = ticks_per_sec / hz;
283 cpu_timebase = ticks_per_sec;
284 curcpu()->ci_lasttb = mftbl();
285 mtspr(SPR_DEC, ticks_per_intr);
286 mtmsr(msr);
289 static int
290 save_ofmap(struct ofw_translations *map, int maxlen)
292 int mmui, mmu, len;
294 OF_getprop(chosen, "mmu", &mmui, sizeof mmui);
295 mmu = OF_instance_to_package(mmui);
297 if (map) {
298 memset(map, 0, maxlen); /* to be safe */
299 len = OF_getprop(mmu, "translations", map, maxlen);
300 } else
301 len = OF_getproplen(mmu, "translations");
303 if (len < 0)
304 len = 0;
305 return len;
309 /* The PMAC_G5 code here needs to be replaced by code that looks for the
310 size_cells and does the right thing automatically.
312 void
313 restore_ofmap(struct ofw_translations *map, int len)
315 int n = len / sizeof(struct ofw_translations);
316 int i;
318 pmap_pinit(&ofw_pmap);
320 ofw_pmap.pm_sr[KERNEL_SR] = KERNEL_SEGMENT;
322 #ifdef KERNEL2_SR
323 ofw_pmap.pm_sr[KERNEL2_SR] = KERNEL2_SEGMENT;
324 #endif
326 for (i = 0; i < n; i++) {
327 #if defined (PMAC_G5)
328 register64_t pa = map[i].pa;
329 #else
330 register_t pa = map[i].pa;
331 #endif
332 vaddr_t va = map[i].va;
333 size_t length = map[i].len;
335 if (va < 0xf0000000) /* XXX */
336 continue;
338 while (length > 0) {
339 pmap_enter(&ofw_pmap, va, (paddr_t)pa, VM_PROT_ALL,
340 VM_PROT_ALL|PMAP_WIRED);
341 pa += PAGE_SIZE;
342 va += PAGE_SIZE;
343 length -= PAGE_SIZE;
346 pmap_update(&ofw_pmap);
352 * Scan the device tree for ranges, and batmap them.
355 static u_int16_t
356 ranges_bitmap(int node, u_int16_t bitmap)
358 int child, mlen, acells, scells, reclen, i, j;
359 u_int32_t addr, len, map[160];
361 for (child = OF_child(node); child; child = OF_peer(child)) {
362 mlen = OF_getprop(child, "ranges", map, sizeof(map));
363 if (mlen == -1)
364 goto noranges;
366 j = OF_getprop(child, "#address-cells", &acells,
367 sizeof(acells));
368 if (j == -1)
369 goto noranges;
371 j = OF_getprop(child, "#size-cells", &scells,
372 sizeof(scells));
373 if (j == -1)
374 goto noranges;
376 reclen = acells + 1 + scells;
378 for (i=0; i < (mlen/4)/reclen; i++) {
379 addr = map[reclen * i + acells];
380 len = map[reclen * i + reclen - 1];
381 for (j = 0; j < len / 0x10000000; j++)
382 bitmap |= 1 << ((addr+j*0x10000000) >>28);
383 bitmap |= 1 << (addr >> 28);
385 noranges:
386 bitmap |= ranges_bitmap(child, bitmap);
387 continue;
389 return bitmap;
392 void
393 ofwoea_batinit(void)
395 #if defined (PPC_OEA)
396 u_int16_t bitmap;
397 int node, i;
399 node = OF_finddevice("/");
400 bitmap = ranges_bitmap(node, 0);
401 oea_batinit(0);
403 #ifdef macppc
404 /* XXX this is a macppc-specific hack */
405 bitmap = 0x8f00;
406 #endif
407 for (i=1; i < 0x10; i++) {
408 /* skip the three vital SR regions */
409 if (i == USER_SR || i == KERNEL_SR || i == KERNEL2_SR)
410 continue;
411 if (bitmap & (1 << i)) {
412 oea_iobat_add(0x10000000 * i, BAT_BL_256M);
413 DPRINTF("Batmapped 256M at 0x%x\n", 0x10000000 * i);
416 #endif /* OEA */
420 /* we define these partially, as we will fill the rest in later */
421 struct powerpc_bus_space genppc_isa_io_space_tag = {
422 .pbs_flags = _BUS_SPACE_LITTLE_ENDIAN|_BUS_SPACE_IO_TYPE,
423 .pbs_base = 0x00000000,
426 struct powerpc_bus_space genppc_isa_mem_space_tag = {
427 .pbs_flags = _BUS_SPACE_LITTLE_ENDIAN|_BUS_SPACE_MEM_TYPE,
428 .pbs_base = 0x00000000,
431 /* This gives us a maximum of 6 PCI busses, assuming both io/mem on each.
432 * Increase if necc.
434 static char ex_storage[EXSTORAGE_MAX][EXTENT_FIXED_STORAGE_SIZE(EXTMAP_RANGES)]
435 __attribute__((aligned(8)));
438 static void
439 find_ranges(int base, rangemap_t *regions, int *cur, int type)
441 int node, i, len, reclen;
442 u_int32_t acells, scells, map[160];
443 char tmp[32];
445 node = base;
446 if (OF_getprop(node, "device_type", tmp, sizeof(tmp)) == -1)
447 goto rec;
448 if ((type == RANGE_TYPE_PCI || type == RANGE_TYPE_FIRSTPCI) &&
449 strcmp("pci", tmp) != 0)
450 goto rec;
451 if (type == RANGE_TYPE_ISA && strcmp("isa", tmp) != 0)
452 goto rec;
453 len = OF_getprop(node, "ranges", map, sizeof(map));
454 if (len == -1)
455 goto rec;
456 if (OF_getprop(node, "#address-cells", &acells,
457 sizeof(acells)) != sizeof(acells))
458 acells = 1;
459 if (OF_getprop(node, "#size-cells", &scells,
460 sizeof(scells)) != sizeof(scells))
461 scells = 1;
462 #ifdef ofppc
463 if (modeldata.ranges_offset == 0)
464 scells -= 1;
465 #endif
466 if (type == RANGE_TYPE_ISA)
467 reclen = 6;
468 else
469 reclen = acells + scells + 1;
471 * There exist ISA buses with empty ranges properties. This is
472 * known to occur on the Pegasos II machine, and likely others.
473 * According to them, that means that the isa bus is a fake bus, and
474 * the real maps are the PCI maps of the preceeding bus. To deal
475 * with this, we will set cur to -1 and return.
477 if (type == RANGE_TYPE_ISA && strcmp("isa", tmp) == 0 && len == 0) {
478 *cur = -1;
479 DPRINTF("Found empty range in isa bus\n");
480 return;
483 DPRINTF("found a map reclen=%d cur=%d len=%d\n", reclen, *cur, len);
484 switch (type) {
485 case RANGE_TYPE_PCI:
486 case RANGE_TYPE_FIRSTPCI:
487 for (i=0; i < len/(4*reclen); i++) {
488 DPRINTF("FOUND PCI RANGE\n");
489 regions[*cur].size =
490 map[i*reclen + acells + scells];
491 /* skip ranges of size==0 */
492 if (regions[*cur].size == 0)
493 continue;
494 regions[*cur].type = map[i*reclen] >> 24;
495 regions[*cur].addr = map[i*reclen + acells];
496 (*cur)++;
498 break;
499 case RANGE_TYPE_ISA:
500 for (i=0; i < len/(4*reclen); i++) {
501 if (map[i*reclen] == 1)
502 regions[*cur].type = RANGE_IO;
503 else
504 regions[*cur].type = RANGE_MEM;
505 DPRINTF("FOUND ISA RANGE TYPE=%d\n",
506 regions[*cur].type);
507 regions[*cur].size =
508 map[i*reclen + acells + scells];
509 (*cur)++;
511 break;
513 DPRINTF("returning with CUR=%d\n", *cur);
514 return;
515 rec:
516 for (node = OF_child(base); node; node = OF_peer(node)) {
517 DPRINTF("RECURSE 1 STEP\n");
518 find_ranges(node, regions, cur, type);
519 if (*cur == -1)
520 return;
524 static int
525 find_lowest_range(rangemap_t *ranges, int nrof, int type)
527 int i, low = 0;
528 u_int32_t addr = 0xffffffff;
530 for (i=0; i < nrof; i++) {
531 if (ranges[i].type == type && ranges[i].addr != 0 &&
532 ranges[i].addr < addr) {
533 low = i;
534 addr = ranges[i].addr;
537 if (addr == 0xffffffff)
538 return -1;
539 return low;
543 * Find a region of memory, and create a bus_space_tag for it.
544 * Notes:
545 * For ISA node is ignored.
546 * node is the starting node. if -1, we start at / and map everything.
550 ofwoea_map_space(int rangetype, int iomem, int node,
551 struct powerpc_bus_space *tag, const char *name)
553 int i, cur, range, nrofholes, error;
554 static int exmap=0;
555 u_int32_t addr;
556 rangemap_t region, holes[32], list[32];
558 memset(list, 0, sizeof(list));
559 cur = 0;
560 if (rangetype == RANGE_TYPE_ISA || node == -1)
561 node = OF_finddevice("/");
562 if (rangetype == RANGE_TYPE_ISA) {
563 u_int32_t size = 0;
564 rangemap_t regions[32];
566 DPRINTF("LOOKING FOR FIRSTPCI\n");
567 find_ranges(node, list, &cur, RANGE_TYPE_FIRSTPCI);
568 range = 0;
569 DPRINTF("LOOKING FOR ISA\n");
570 find_ranges(node, regions, &range, RANGE_TYPE_ISA);
571 if (range == 0 || cur == 0)
572 return -1; /* no isa stuff found */
574 * This may be confusing to some. The ISA ranges property
575 * is supposed to be a set of IO ranges for the ISA bus, but
576 * generally, it's just a set of pci devfunc lists that tell
577 * you to go look at the parent PCI device for the actual
578 * ranges.
580 if (range == -1) {
581 /* we found a rangeless isa bus */
583 DPRINTF("found isa stuff\n");
584 for (i=0; i < range; i++)
585 if (regions[i].type == iomem)
586 size = regions[i].size;
587 if (iomem == RANGE_IO) {
588 /* the first io range is the one */
589 for (i=0; i < cur; i++)
590 if (list[i].type == RANGE_IO && size) {
591 DPRINTF("found IO\n");
592 tag->pbs_offset = list[i].addr;
593 tag->pbs_limit = size;
594 error = bus_space_init(tag, name, NULL, 0);
595 return error;
597 } else {
598 for (i=0; i < cur; i++)
599 if (list[i].type == RANGE_MEM &&
600 list[i].size == size) {
601 DPRINTF("found mem\n");
602 tag->pbs_offset = list[i].addr;
603 tag->pbs_limit = size;
604 error = bus_space_init(tag, name, NULL, 0);
605 return error;
608 return -1; /* NO ISA FOUND */
610 find_ranges(node, list, &cur, rangetype);
612 DPRINTF("cur == %d\n", cur);
613 /* now list should contain a list of memory regions */
614 for (i=0; i < cur; i++)
615 DPRINTF("addr=0x%x size=0x%x type=%d\n", list[i].addr,
616 list[i].size, list[i].type);
618 addr=0;
619 range = find_lowest_range(list, cur, iomem);
620 i = 0;
621 nrofholes = 0;
622 while (range != -1) {
623 DPRINTF("range==%d\n", range);
624 DPRINTF("i==%d\n", i);
625 if (i == 0) {
626 memcpy(&region, &list[range], sizeof(rangemap_t));
627 list[range].addr = 0;
628 i++;
629 range = find_lowest_range(list, cur, iomem);
630 continue;
632 if (region.addr + region.size < list[range].addr) {
633 /* allocate a hole */
634 holes[nrofholes].type = iomem;
635 holes[nrofholes].addr = region.size + region.addr;
636 holes[nrofholes].size = list[range].addr -
637 holes[nrofholes].addr - 1;
638 nrofholes++;
640 region.size = list[range].size + list[range].addr -
641 region.addr;
642 list[range].addr = 0;
643 range = find_lowest_range(list, cur, iomem);
645 DPRINTF("RANGE iomem=%d FOUND\n", iomem);
646 DPRINTF("addr=0x%x size=0x%x type=%d\n", region.addr,
647 region.size, region.type);
648 DPRINTF("HOLES FOUND\n");
649 for (i=0; i < nrofholes; i++)
650 DPRINTF("addr=0x%x size=0x%x type=%d\n", holes[i].addr,
651 holes[i].size, holes[i].type);
652 /* AT THIS POINT WE MAP IT */
654 if (rangetype == RANGE_TYPE_PCI) {
655 if (exmap == EXSTORAGE_MAX)
656 panic("Not enough ex_storage space. "
657 "Increase EXSTORAGE_MAX");
659 /* XXX doing this in here might be wrong */
660 if (iomem == 1) {
661 /* we map an IO region */
662 tag->pbs_offset = region.addr;
663 tag->pbs_base = 0;
664 tag->pbs_limit = region.size;
665 } else {
666 /* ... or a memory region */
667 tag->pbs_offset = 0;
668 tag->pbs_base = region.addr;
669 tag->pbs_limit = region.size + region.addr;
672 error = bus_space_init(tag, name, ex_storage[exmap],
673 sizeof(ex_storage[exmap]));
674 exmap++;
675 if (error)
676 panic("ofwoea_bus_space_init: can't init tag %s", name);
677 for (i=0; i < nrofholes; i++) {
678 if (holes[i].type == RANGE_IO) {
679 error = extent_alloc_region(tag->pbs_extent,
680 holes[i].addr - tag->pbs_offset,
681 holes[i].size, EX_NOWAIT);
682 } else {
683 error = extent_alloc_region(tag->pbs_extent,
684 holes[i].addr, holes[i].size, EX_NOWAIT);
686 if (error)
687 panic("ofwoea_bus_space_init: can't block out"
688 " reserved space 0x%x-0x%x: error=%d",
689 holes[i].addr, holes[i].addr+holes[i].size,
690 error);
692 return error;
694 return -1;
697 void
698 ofwoea_bus_space_init(void)
700 int error;
702 error = ofwoea_map_space(RANGE_TYPE_ISA, RANGE_IO, -1,
703 &genppc_isa_io_space_tag, "isa-ioport");
704 if (error > 0)
705 panic("Could not map ISA IO");
707 error = ofwoea_map_space(RANGE_TYPE_ISA, RANGE_MEM, -1,
708 &genppc_isa_mem_space_tag, "isa-iomem");
709 if (error > 0)
710 panic("Could not map ISA MEM");