[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: setmulti timed out
> 千葉市中央区長洲
> 藤原 誠
tsubai> canonicalize_bootpath() の中身だけ新しくすればよいはずです。
ということで、最新からの逆 diff ですが添付のようにして見ました。
でも二回目の feature reg を表示した直後に wdc1 problem で止ってしまう
気がします。以下の表示は正しく動いたものから採っています。
-----------------
feature reg = 0x3eff72
wd0 at wdc0 channel 0 drive 0: <ST52520A>
wd0: drive supports 16-sector pio transfers, lba addressing
wd0: 2446 MB, 4970 cyl, 16 head, 63 sec, 512 bytes/sect x 5009760 sectors
wd0: drive supports PIO mode 4, DMA mode 2
wdc1 at obio0 offset 0x21000 irq 14: DMA transfer
feature reg = 0xbeff7a
-----------------
---
(藤原)
--- src/sys/arch/macppc/macppc/autoconf.c-2000-03-05 Sun Mar 5 22:10:07 2000
+++ src/sys/arch/macppc/macppc/autoconf.c Sun Mar 5 22:41:57 2000
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.21 2000/02/14 12:45:52 tsubai Exp $ */
+/* $NetBSD: autoconf.c,v 1.17 2000/02/02 16:41:56 danw Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -50,6 +50,7 @@
#include <dev/ata/atavar.h>
#include <dev/ic/wdcvar.h>
+void findroot __P((void));
void canonicalize_bootpath __P((void));
int OF_interpret __P((char *cmd, int nreturns, ...));
@@ -58,6 +59,11 @@
struct device *booted_device; /* boot device */
int booted_partition; /* ...and partition on that device */
+#define INT_ENABLE_REG (interrupt_reg + 0x24)
+#define INT_CLEAR_REG (interrupt_reg + 0x28)
+u_char *interrupt_reg;
+
+#define HEATHROW_FCR_OFFSET 0x38
u_int *heathrow_FCR = NULL;
/*
@@ -66,15 +72,30 @@
void
cpu_configure()
{
+ int node, reg[5];
int msr;
+ int phandle;
+ char *p;
- init_interrupt();
- calc_delayconst();
- canonicalize_bootpath();
+ node = OF_finddevice("mac-io");
+ if (node == -1)
+ node = OF_finddevice("/pci/mac-io");
+ if (node != -1 &&
+ OF_getprop(node, "assigned-addresses", reg, sizeof(reg)) != -1) {
+ interrupt_reg = mapiodev(reg[2], NBPG);
+ heathrow_FCR = mapiodev(reg[2] + HEATHROW_FCR_OFFSET, 4);
+ } else
+ interrupt_reg = mapiodev(0xf3000000, NBPG);
+
+ out32rb(INT_ENABLE_REG, 0); /* disable all intr. */
+ out32rb(INT_CLEAR_REG, 0xffffffff); /* clear pending intr. */
- if (config_rootfound("mainbus", NULL) == NULL)
- panic("configure: mainbus not configured");
+ calc_delayconst();
+ canonicalize_bootpath();
+ if (config_rootfound("mainbus", NULL) == NULL)
+ panic("configure: mainbus not configured");
+
(void)spl0();
/*
@@ -83,7 +104,6 @@
asm volatile ("mfmsr %0; ori %0,%0,%1; mtmsr %0"
: "=r"(msr) : "K"((u_short)(PSL_EE|PSL_RI)));
}
-
void
canonicalize_bootpath()
{
@@ -164,6 +184,7 @@
dev->dv_xname[sizeof(name) - 1] >= '0' && \
dev->dv_xname[sizeof(name) - 1] <= '9')
+
/*
* device_register is called from config_attach as each device is
* attached. We use it to find the NetBSD device corresponding to the
@@ -250,11 +271,6 @@
if (!p++)
return;
if (strtoul(p, &p, 16) != aa->aa_drv_data->drive)
- return;
- } else if (DEVICE_IS(parent, "wdc")) {
- struct ata_atapi_attach *aa = aux;
-
- if (addr != aa->aa_channel)
return;
} else
return;