Home | History | Annotate | Line # | Download | only in isapnp
isapnpdebug.c revision 1.9.50.1
      1  1.9.50.1    bouyer /*	$NetBSD: isapnpdebug.c,v 1.9.50.1 2007/10/25 22:38:31 bouyer Exp $	*/
      2       1.1  christos 
      3       1.5  christos /*-
      4       1.5  christos  * Copyright (c) 1996 The NetBSD Foundation, Inc.
      5       1.5  christos  * All rights reserved.
      6       1.5  christos  *
      7       1.5  christos  * This code is derived from software contributed to The NetBSD Foundation
      8       1.5  christos  * by Christos Zoulas.
      9       1.1  christos  *
     10       1.1  christos  * Redistribution and use in source and binary forms, with or without
     11       1.1  christos  * modification, are permitted provided that the following conditions
     12       1.1  christos  * are met:
     13       1.1  christos  * 1. Redistributions of source code must retain the above copyright
     14       1.1  christos  *    notice, this list of conditions and the following disclaimer.
     15       1.1  christos  * 2. Redistributions in binary form must reproduce the above copyright
     16       1.1  christos  *    notice, this list of conditions and the following disclaimer in the
     17       1.1  christos  *    documentation and/or other materials provided with the distribution.
     18       1.1  christos  * 3. All advertising materials mentioning features or use of this software
     19       1.1  christos  *    must display the following acknowledgement:
     20       1.5  christos  *        This product includes software developed by the NetBSD
     21       1.5  christos  *        Foundation, Inc. and its contributors.
     22       1.5  christos  * 4. Neither the name of The NetBSD Foundation nor the names of its
     23       1.5  christos  *    contributors may be used to endorse or promote products derived
     24       1.5  christos  *    from this software without specific prior written permission.
     25       1.1  christos  *
     26       1.5  christos  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     27       1.5  christos  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     28       1.5  christos  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     29       1.5  christos  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     30       1.5  christos  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     31       1.5  christos  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     32       1.5  christos  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     33       1.5  christos  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     34       1.5  christos  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     35       1.5  christos  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     36       1.5  christos  * POSSIBILITY OF SUCH DAMAGE.
     37       1.1  christos  */
     38       1.6     lukem 
     39       1.6     lukem #include <sys/cdefs.h>
     40  1.9.50.1    bouyer __KERNEL_RCSID(0, "$NetBSD: isapnpdebug.c,v 1.9.50.1 2007/10/25 22:38:31 bouyer Exp $");
     41       1.1  christos 
     42       1.1  christos #ifdef DEBUG_ISAPNP
     43       1.1  christos 
     44       1.1  christos #include <sys/param.h>
     45       1.1  christos #include <sys/systm.h>
     46       1.1  christos #include <sys/device.h>
     47       1.1  christos 
     48  1.9.50.1    bouyer #include <sys/bus.h>
     49       1.1  christos 
     50       1.1  christos #include <dev/isa/isavar.h>
     51       1.1  christos 
     52       1.1  christos #include <dev/isapnp/isapnpreg.h>
     53       1.1  christos #include <dev/isapnp/isapnpvar.h>
     54       1.1  christos 
     55       1.1  christos /* isapnp_print_mem():
     56       1.1  christos  *	Print a memory tag
     57       1.1  christos  */
     58       1.1  christos void
     59       1.1  christos isapnp_print_mem(str, mem)
     60       1.1  christos 	const char *str;
     61       1.1  christos 	const struct isapnp_region *mem;
     62       1.1  christos {
     63       1.3     mikel 	printf("%sMemory: %s,%sshadowable,decode-%s,%scacheable,%s", str,
     64       1.1  christos 	    (mem->flags & ISAPNP_MEMATTR_ROM) ? "ROM," : "RAM,",
     65       1.1  christos 	    (mem->flags & ISAPNP_MEMATTR_SHADOWABLE) ? "" : "non-",
     66       1.1  christos 	    (mem->flags & ISAPNP_MEMATTR_HIGH_ADDR) ?
     67       1.1  christos 		"high-addr," : "range-len,",
     68       1.1  christos 	    (mem->flags & ISAPNP_MEMATTR_CACHEABLE) ? "" : "non-",
     69       1.7       wiz 	    (mem->flags & ISAPNP_MEMATTR_WRITABLE) ?
     70       1.7       wiz 		"writable," : "read-only,");
     71       1.1  christos 
     72       1.1  christos 	switch (mem->flags & ISAPNP_MEMWIDTH_MASK) {
     73       1.1  christos 	case ISAPNP_MEMWIDTH_8:
     74       1.1  christos 		printf("8-bit ");
     75       1.1  christos 		break;
     76       1.1  christos 	case ISAPNP_MEMWIDTH_16:
     77       1.1  christos 		printf("16-bit ");
     78       1.1  christos 		break;
     79       1.1  christos 	case ISAPNP_MEMWIDTH_8_16:
     80       1.1  christos 		printf("8/16-bit ");
     81       1.1  christos 		break;
     82       1.1  christos 	case ISAPNP_MEMWIDTH_32:
     83       1.1  christos 		printf("32-bit ");
     84       1.1  christos 		break;
     85       1.1  christos 	}
     86       1.1  christos 
     87       1.1  christos 	printf("min 0x%x, max 0x%x, ", mem->minbase, mem->maxbase);
     88       1.1  christos 	printf("align 0x%x, length 0x%x\n", mem->align, mem->length);
     89       1.1  christos }
     90       1.1  christos 
     91       1.1  christos 
     92       1.1  christos /* isapnp_print_io():
     93       1.1  christos  *	Print an io tag
     94       1.1  christos  */
     95       1.1  christos void
     96       1.1  christos isapnp_print_io(str, io)
     97       1.1  christos 	const char *str;
     98       1.1  christos 	const struct isapnp_region *io;
     99       1.1  christos {
    100       1.3     mikel 	printf("%d %sIO Ports: %d address bits, alignment %d ",
    101       1.1  christos 	    io->length, str, (io->flags & ISAPNP_IOFLAGS_16) ? 16 : 10,
    102       1.1  christos 	    io->align);
    103       1.1  christos 
    104       1.1  christos 	printf("min 0x%x, max 0x%x\n", io->minbase, io->maxbase);
    105       1.1  christos }
    106       1.1  christos 
    107       1.1  christos 
    108       1.1  christos /* isapnp_print_irq():
    109       1.1  christos  *	Print an irq tag
    110       1.1  christos  */
    111       1.1  christos void
    112       1.1  christos isapnp_print_irq(str, irq)
    113       1.1  christos 	const char *str;
    114       1.1  christos 	const struct isapnp_pin *irq;
    115       1.1  christos {
    116       1.1  christos 	int i;
    117       1.1  christos 
    118       1.1  christos 	printf("%sIRQ's supported: ", str);
    119       1.1  christos 	for (i = 0; i < 16; i++)
    120       1.1  christos 		if (irq->bits & (1 << i))
    121       1.1  christos 		    printf("%d ", i);
    122       1.1  christos 
    123       1.1  christos 	if (irq->flags & ISAPNP_IRQTYPE_EDGE_PLUS)
    124       1.1  christos 		printf("E+");
    125       1.1  christos 	if (irq->flags & ISAPNP_IRQTYPE_EDGE_MINUS)
    126       1.1  christos 		printf("E-");
    127       1.1  christos 	if (irq->flags & ISAPNP_IRQTYPE_LEVEL_PLUS)
    128       1.1  christos 		printf("L+");
    129       1.1  christos 	if (irq->flags & ISAPNP_IRQTYPE_LEVEL_MINUS)
    130       1.1  christos 		printf("L-");
    131       1.1  christos 	printf("\n");
    132       1.1  christos }
    133       1.1  christos 
    134       1.1  christos /* isapnp_print_drq():
    135       1.1  christos  *	Print a drq tag
    136       1.1  christos  */
    137       1.1  christos void
    138       1.1  christos isapnp_print_drq(str, drq)
    139       1.1  christos 	const char *str;
    140       1.1  christos 	const struct isapnp_pin *drq;
    141       1.1  christos {
    142       1.1  christos 	int i;
    143       1.1  christos 	u_char flags = drq->flags;
    144       1.1  christos 
    145       1.1  christos 	printf("%sDRQ's supported: ", str);
    146       1.1  christos 	for (i = 0; i < 8; i++)
    147       1.1  christos 		if (drq->bits & (1 << i))
    148       1.1  christos 		    printf("%d ", i);
    149       1.1  christos 
    150       1.1  christos 	printf("Width: ");
    151       1.1  christos 	switch (flags & ISAPNP_DMAWIDTH_MASK) {
    152       1.1  christos 	case ISAPNP_DMAWIDTH_8:
    153       1.1  christos 		printf("8-bit ");
    154       1.1  christos 		break;
    155       1.1  christos 	case ISAPNP_DMAWIDTH_8_16:
    156       1.1  christos 		printf("8/16-bit ");
    157       1.1  christos 		break;
    158       1.1  christos 	case ISAPNP_DMAWIDTH_16:
    159       1.1  christos 		printf("16-bit ");
    160       1.1  christos 		break;
    161       1.1  christos 	case ISAPNP_DMAWIDTH_RESERVED:
    162       1.1  christos 		printf("Reserved ");
    163       1.1  christos 		break;
    164       1.1  christos 	}
    165       1.1  christos 
    166       1.1  christos 	printf("Speed: ");
    167       1.1  christos 	switch (flags & ISAPNP_DMASPEED_MASK) {
    168       1.1  christos 	case ISAPNP_DMASPEED_COMPAT:
    169       1.1  christos 		printf("compat ");
    170       1.1  christos 		break;
    171       1.1  christos 	case ISAPNP_DMASPEED_A:
    172       1.1  christos 		printf("A ");
    173       1.1  christos 		break;
    174       1.1  christos 	case ISAPNP_DMASPEED_B:
    175       1.1  christos 		printf("B ");
    176       1.1  christos 		break;
    177       1.1  christos 	case ISAPNP_DMASPEED_F:
    178       1.1  christos 		printf("F ");
    179       1.1  christos 		break;
    180       1.1  christos 	}
    181       1.1  christos 
    182       1.1  christos 	if (flags & ISAPNP_DMAATTR_MASK)
    183       1.1  christos 		printf("Attributes: %s%s%s",
    184       1.1  christos 		    (flags & ISAPNP_DMAATTR_BUS_MASTER) ?  "bus master " : "",
    185       1.1  christos 		    (flags & ISAPNP_DMAATTR_INCR_8) ?  "incr 8 " : "",
    186       1.1  christos 		    (flags & ISAPNP_DMAATTR_INCR_16) ?  "incr 16 " : "");
    187       1.1  christos 	printf("\n");
    188       1.1  christos }
    189       1.1  christos 
    190       1.1  christos 
    191       1.1  christos /* isapnp_print_dep_start():
    192       1.1  christos  *	Print a start dependencies tag
    193       1.1  christos  */
    194       1.1  christos void
    195       1.1  christos isapnp_print_dep_start(str, pref)
    196       1.1  christos 	const char *str;
    197       1.1  christos 	const u_char pref;
    198       1.1  christos {
    199       1.1  christos 
    200       1.1  christos 	printf("%sconfig: ", str);
    201       1.1  christos 	switch (pref) {
    202       1.1  christos 	case ISAPNP_DEP_PREFERRED:
    203       1.1  christos 		printf("preferred\n");
    204       1.1  christos 		break;
    205       1.8     perry 
    206       1.1  christos 	case ISAPNP_DEP_ACCEPTABLE:
    207       1.1  christos 		printf("acceptable\n");
    208       1.1  christos 		break;
    209       1.1  christos 
    210       1.1  christos 	case ISAPNP_DEP_FUNCTIONAL:
    211       1.1  christos 		printf("functional\n");
    212       1.1  christos 		break;
    213       1.1  christos 
    214       1.1  christos 	case ISAPNP_DEP_UNSET: 		/* Used internally */
    215       1.1  christos 		printf("unset\n");
    216       1.1  christos 		break;
    217       1.1  christos 
    218       1.1  christos 	case ISAPNP_DEP_CONFLICTING:	/* Used internally */
    219       1.1  christos 		printf("conflicting\n");
    220       1.1  christos 		break;
    221       1.1  christos 
    222       1.1  christos 	default:
    223       1.1  christos 		printf("invalid\n");
    224       1.1  christos 		break;
    225       1.1  christos 	}
    226       1.1  christos }
    227       1.1  christos 
    228       1.1  christos void
    229       1.1  christos isapnp_print_attach(pa)
    230       1.1  christos 	const struct isapnp_attach_args *pa;
    231       1.1  christos {
    232       1.1  christos 	int i;
    233       1.1  christos 
    234       1.4     mikel 	printf("Found <%s, %s, %s, %s> ", pa->ipa_devident,
    235       1.4     mikel 	    pa->ipa_devlogic, pa->ipa_devcompat, pa->ipa_devclass);
    236       1.1  christos 	isapnp_print_dep_start("", pa->ipa_pref);
    237       1.1  christos 
    238       1.1  christos 	for (i = 0; i < pa->ipa_nio; i++)
    239       1.1  christos 		isapnp_print_io("", &pa->ipa_io[i]);
    240       1.1  christos 
    241       1.1  christos 	for (i = 0; i < pa->ipa_nmem; i++)
    242       1.1  christos 		isapnp_print_mem("", &pa->ipa_mem[i]);
    243       1.1  christos 
    244       1.1  christos 	for (i = 0; i < pa->ipa_nirq; i++)
    245       1.1  christos 		isapnp_print_irq("", &pa->ipa_irq[i]);
    246       1.1  christos 
    247       1.1  christos 	for (i = 0; i < pa->ipa_ndrq; i++)
    248       1.1  christos 		isapnp_print_drq("", &pa->ipa_drq[i]);
    249       1.1  christos 
    250       1.1  christos 	for (i = 0; i < pa->ipa_nmem32; i++)
    251       1.1  christos 		isapnp_print_mem("", &pa->ipa_mem32[i]);
    252       1.1  christos }
    253       1.1  christos 
    254       1.1  christos 
    255       1.1  christos /* isapnp_get_config():
    256       1.1  christos  *	Get the current configuration of the card
    257       1.1  christos  */
    258       1.1  christos void
    259       1.1  christos isapnp_get_config(sc, pa)
    260       1.1  christos 	struct isapnp_softc *sc;
    261       1.1  christos 	struct isapnp_attach_args *pa;
    262       1.1  christos {
    263       1.1  christos 	int i;
    264       1.1  christos 	u_char v0, v1, v2, v3;
    265       1.1  christos 	static u_char isapnp_mem_range[] = ISAPNP_MEM_DESC;
    266       1.1  christos 	static u_char isapnp_io_range[] = ISAPNP_IO_DESC;
    267       1.1  christos 	static u_char isapnp_irq_range[] = ISAPNP_IRQ_DESC;
    268       1.1  christos 	static u_char isapnp_drq_range[] = ISAPNP_DRQ_DESC;
    269       1.1  christos 	static u_char isapnp_mem32_range[] = ISAPNP_MEM32_DESC;
    270       1.1  christos 	struct isapnp_region *r;
    271       1.1  christos 	struct isapnp_pin *p;
    272       1.1  christos 
    273       1.1  christos 	memset(pa, 0, sizeof(*pa));
    274       1.1  christos 
    275       1.1  christos 	for (i = 0; i < sizeof(isapnp_io_range); i++) {
    276       1.1  christos 		r = &pa->ipa_io[i];
    277       1.1  christos 		v0 = isapnp_read_reg(sc,
    278       1.1  christos 		    isapnp_io_range[i] + ISAPNP_IO_BASE_15_8);
    279       1.1  christos 		v1 = isapnp_read_reg(sc,
    280       1.1  christos 		    isapnp_io_range[i] + ISAPNP_IO_BASE_7_0);
    281       1.1  christos 		r->base = (v0 << 8) | v1;
    282       1.1  christos 		if (r->base == 0)
    283       1.1  christos 			break;
    284       1.1  christos 	}
    285       1.1  christos 	pa->ipa_nio = i;
    286       1.1  christos 
    287       1.1  christos 	for (i = 0; i < sizeof(isapnp_mem_range); i++) {
    288       1.1  christos 		r = &pa->ipa_mem[i];
    289       1.1  christos 		v0 = isapnp_read_reg(sc,
    290       1.1  christos 		    isapnp_mem_range[i] + ISAPNP_MEM_BASE_23_16);
    291       1.1  christos 		v1 = isapnp_read_reg(sc,
    292       1.1  christos 		    isapnp_mem_range[i] + ISAPNP_MEM_BASE_15_8);
    293       1.1  christos 		r->base = (v0 << 16) | (v1 << 8);
    294       1.1  christos 		if (r->base == 0)
    295       1.1  christos 			break;
    296       1.1  christos 
    297       1.1  christos 		v0 = isapnp_read_reg(sc,
    298       1.1  christos 		    isapnp_mem_range[i] + ISAPNP_MEM_LRANGE_23_16);
    299       1.1  christos 		v1 = isapnp_read_reg(sc,
    300       1.1  christos 		    isapnp_mem_range[i] + ISAPNP_MEM_LRANGE_15_8);
    301       1.1  christos 		r->length = (v0 << 16) | (v1 << 8);
    302       1.1  christos 		v0 = isapnp_read_reg(sc,
    303       1.1  christos 		    isapnp_mem_range[i] + ISAPNP_MEM_CONTROL);
    304       1.1  christos 		r->flags = 0;
    305       1.1  christos 		if (v0 & ISAPNP_MEM_CONTROL_LIMIT)
    306       1.1  christos 			r->flags |= ISAPNP_MEMATTR_HIGH_ADDR;
    307       1.1  christos 		if (v0 & ISAPNP_MEM_CONTROL_16)
    308       1.1  christos 			r->flags |= ISAPNP_MEMWIDTH_16;
    309       1.1  christos 	}
    310       1.1  christos 	pa->ipa_nmem = i;
    311       1.1  christos 
    312       1.1  christos 	for (i = 0; i < sizeof(isapnp_irq_range); i++) {
    313       1.1  christos 		v0 = isapnp_read_reg(sc,
    314       1.1  christos 		    isapnp_irq_range[i] + ISAPNP_IRQ_NUMBER);
    315       1.1  christos 		p = &pa->ipa_irq[i];
    316       1.1  christos 		p->num = v0 & 0xf;
    317       1.1  christos 		if (p->num == 0)
    318       1.1  christos 			break;
    319       1.1  christos 
    320       1.1  christos 		switch (v0 & (ISAPNP_IRQ_LEVEL|ISAPNP_IRQ_HIGH)) {
    321       1.1  christos 		case ISAPNP_IRQ_LEVEL|ISAPNP_IRQ_HIGH:
    322       1.1  christos 		    p->flags = ISAPNP_IRQTYPE_LEVEL_PLUS;
    323       1.1  christos 		    break;
    324       1.1  christos 		case ISAPNP_IRQ_HIGH:
    325       1.1  christos 		    p->flags = ISAPNP_IRQTYPE_EDGE_PLUS;
    326       1.1  christos 		    break;
    327       1.1  christos 		case ISAPNP_IRQ_LEVEL:
    328       1.1  christos 		    p->flags = ISAPNP_IRQTYPE_LEVEL_MINUS;
    329       1.1  christos 		    break;
    330       1.1  christos 		default:
    331       1.1  christos 		    p->flags = ISAPNP_IRQTYPE_EDGE_MINUS;
    332       1.1  christos 		    break;
    333       1.1  christos 		}
    334       1.1  christos 	}
    335       1.1  christos 	pa->ipa_nirq = i;
    336       1.1  christos 
    337       1.1  christos 	for (i = 0; i < sizeof(isapnp_drq_range); i++) {
    338       1.1  christos 		v0 = isapnp_read_reg(sc, isapnp_drq_range[i]);
    339       1.1  christos 		p = &pa->ipa_drq[i];
    340       1.1  christos 		p->num = v0 & 0xf;
    341       1.1  christos 		if (p->num == 4)
    342       1.1  christos 			break;
    343       1.1  christos 	}
    344       1.1  christos 	pa->ipa_ndrq = i;
    345       1.1  christos 
    346       1.1  christos 	for (i = 0; i < sizeof(isapnp_mem32_range); i++) {
    347       1.1  christos 		r = &pa->ipa_mem32[i];
    348       1.1  christos 		v0 = isapnp_read_reg(sc,
    349       1.1  christos 		    isapnp_mem32_range[i] + ISAPNP_MEM32_BASE_31_24);
    350       1.1  christos 		v1 = isapnp_read_reg(sc,
    351       1.1  christos 		    isapnp_mem32_range[i] + ISAPNP_MEM32_BASE_23_16);
    352       1.1  christos 		v2 = isapnp_read_reg(sc,
    353       1.1  christos 		    isapnp_mem32_range[i] + ISAPNP_MEM32_BASE_15_8);
    354       1.1  christos 		v3 = isapnp_read_reg(sc,
    355       1.1  christos 		    isapnp_mem32_range[i] + ISAPNP_MEM32_BASE_7_0);
    356       1.1  christos 		r->base = (v0 << 24) | (v1 << 16) | (v2 << 8) | v3;
    357       1.1  christos 		if (r->base == 0)
    358       1.1  christos 			break;
    359       1.1  christos 
    360       1.1  christos 		v0 = isapnp_read_reg(sc,
    361       1.1  christos 		    isapnp_mem32_range[i] + ISAPNP_MEM32_LRANGE_31_24);
    362       1.1  christos 		v1 = isapnp_read_reg(sc,
    363       1.1  christos 		    isapnp_mem32_range[i] + ISAPNP_MEM32_LRANGE_23_16);
    364       1.1  christos 		v2 = isapnp_read_reg(sc,
    365       1.1  christos 		    isapnp_mem32_range[i] + ISAPNP_MEM32_LRANGE_15_8);
    366       1.1  christos 		v3 = isapnp_read_reg(sc,
    367       1.1  christos 		    isapnp_mem32_range[i] + ISAPNP_MEM32_LRANGE_7_0);
    368       1.1  christos 		r->length = (v0 << 24) | (v1 << 16) | (v2 << 8) | v3;
    369       1.1  christos 		v0 = isapnp_read_reg(sc,
    370       1.1  christos 		    isapnp_mem_range[i] + ISAPNP_MEM_CONTROL);
    371       1.1  christos 		r->flags = v0;
    372       1.1  christos 	}
    373       1.1  christos 	pa->ipa_nmem32 = i;
    374       1.1  christos }
    375       1.1  christos 
    376       1.1  christos 
    377       1.1  christos /* isapnp_print_config():
    378       1.1  christos  *	Print the current configuration of the card
    379       1.1  christos  */
    380       1.1  christos void
    381       1.1  christos isapnp_print_config(pa)
    382       1.1  christos 	const struct isapnp_attach_args *pa;
    383       1.1  christos {
    384       1.1  christos 	int i;
    385       1.1  christos 	const struct isapnp_region *r;
    386       1.1  christos 	const struct isapnp_pin *p;
    387       1.1  christos 
    388       1.1  christos 	printf("Register configuration:\n");
    389       1.1  christos 	if (pa->ipa_nio)
    390       1.1  christos 		for (i = 0; i < pa->ipa_nio; i++) {
    391       1.1  christos 			r = &pa->ipa_io[i];
    392       1.1  christos 			printf("io[%d]: 0x%x/%d\n", i, r->base, r->length);
    393       1.1  christos 		}
    394       1.1  christos 
    395       1.1  christos 	if (pa->ipa_nmem)
    396       1.1  christos 		for (i = 0; i < pa->ipa_nmem; i++) {
    397       1.1  christos 			r = &pa->ipa_mem[i];
    398       1.1  christos 			printf("mem[%d]: 0x%x/%d\n", i, r->base, r->length);
    399       1.1  christos 		}
    400       1.1  christos 
    401       1.1  christos 	if (pa->ipa_nirq)
    402       1.1  christos 		for (i = 0; i < pa->ipa_nirq; i++) {
    403       1.1  christos 			p = &pa->ipa_irq[i];
    404       1.1  christos 			printf("irq[%d]: %d\n", i, p->num);
    405       1.1  christos 		}
    406       1.1  christos 
    407       1.2  christos 	if (pa->ipa_ndrq)
    408       1.1  christos 		for (i = 0; i < pa->ipa_ndrq; i++) {
    409       1.1  christos 			p = &pa->ipa_drq[i];
    410       1.1  christos 			printf("drq[%d]: %d\n", i, p->num);
    411       1.1  christos 		}
    412       1.1  christos 
    413       1.1  christos 	if (pa->ipa_nmem32)
    414       1.1  christos 		for (i = 0; i < pa->ipa_nmem32; i++) {
    415       1.1  christos 			r = &pa->ipa_mem32[i];
    416       1.1  christos 			printf("mem32[%d]: 0x%x/%d\n", i, r->base, r->length);
    417       1.1  christos 		}
    418       1.1  christos }
    419       1.1  christos 
    420       1.1  christos #endif
    421