From owner-freebsd-stable Mon Feb 12 12:53:52 1996 Return-Path: owner-stable Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id MAA28931 for stable-outgoing; Mon, 12 Feb 1996 12:53:52 -0800 (PST) Received: from localhost.cdrom.com (localhost.cdrom.com [127.0.0.1]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id MAA28921 Mon, 12 Feb 1996 12:53:47 -0800 (PST) Message-Id: <199602122053.MAA28921@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: Host localhost.cdrom.com [127.0.0.1] didn't use HELO protocol To: Richard J Kuhns cc: Richard J Kuhns , freebsd-stable@freebsd.org Subject: Re: One problem && one question In-reply-to: Your message of "Mon, 12 Feb 1996 14:36:12 +0500." <9602121936.AA15018@sparcmill.grauel.com> Date: Mon, 12 Feb 1996 12:53:46 -0800 From: "Justin T. Gibbs" Sender: owner-stable@freebsd.org Precedence: bulk >Justin T. Gibbs writes: > >Thanks, Justin. > >I just made that change and built a new kernel. The good news is, the pci >probe found the 946. The bad news is, the kernel won't boot. The message >is `bt0: Invalid base address', followed almost immediately by the ``reboot >in 15 seconds'' message. The only difference between the 2 kernels is the >line above. Unfortunately, none of the boot messages hung around to be >printed later by dmesg. > >Anything else I can do to make your day more enjoyable? :-) >-- >Rich Kuhns rjk@grauel.com >PO Box 6249 >100 Sawmill Road >Lafayette, IN 47903 >(317)477-6000 x319 Can you try this patch. I'm away from my machine at the moment, so you may need to tweak it to get it to compile. -- Justin T. Gibbs =========================================== FreeBSD: Turning PCs into workstations =========================================== Index: bt9xx.c =================================================================== RCS file: /home/ncvs/src/sys/pci/bt9xx.c,v retrieving revision 1.5 diff -c -r1.5 bt9xx.c *** bt9xx.c 1996/02/12 17:00:39 1.5 --- bt9xx.c 1996/02/12 20:51:26 *************** *** 35,41 **** #include /* XXX Need more device IDs */ - #define PCI_BASEADR0 PCI_MAP_REG_START #define PCI_DEVICE_ID_BUSLOGIC_946 0x1040104Bul static char* bt_pci_probe __P((pcici_t tag, pcidi_t type)); --- 35,40 ---- *************** *** 70,86 **** pcici_t config_id; int unit; { u_long io_port; unsigned opri = 0; struct bt_data *bt; ! if(!(io_port = pci_conf_read(config_id, PCI_BASEADR0))) return; - /* - * The first bit of PCI_BASEADR0 is always - * set hence we mask it off. - */ - io_port &= 0xfffffffe; if(!(bt = bt_alloc(unit, io_port))) return; /* XXX PCI code should take return status */ --- 69,89 ---- pcici_t config_id; int unit; { + int reg; u_long io_port; unsigned opri = 0; struct bt_data *bt; ! for(reg = PCI_MAP_REG_START; reg <= PCI_MAP_REG_END; reg++) { ! if(!(io_port = pci_conf_read(config_id, reg))) ! return; ! if(io_port & PCI_MAP_IO) { ! ioport &= PCI_IO_MAP; ! break; ! } ! } ! if(reg > PCI_MAP_REG_END) return; if(!(bt = bt_alloc(unit, io_port))) return; /* XXX PCI code should take return status */