Bug 20379

Summary: unable to install, monitor goes black during boot (with serial is disabled)
Product: Base System Reporter: gyula_matics <gyula_matics>
Component: i386Assignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.0-RELEASE   
Hardware: Any   
OS: Any   

Description gyula_matics 2000-08-03 14:00:00 UTC
during installation it successfully boots to UserConfig. Using
the visual interface i disable everything that shows up except the keyboard. exit/save. boot continues then within a fraction of second
the screen goes black and the machine is dead. 
I'm not very experienced with freebsd I don't know where to go from there.

How-To-Repeat: try to install 4.0 or 4.1 on an LXe PRO
Comment 1 Sheldon Hearn freebsd_committer freebsd_triage 2000-08-03 14:44:22 UTC
State Changed
From-To: open->feedback

You disable everything except the keyboard?  That sounds like a 
recipe for disaster. :-) 

Try not disabling anything.  If you believe that there are  
device probes that get confused by your hardware, disable those. 

Let us know how it goes.
Comment 2 Masayuki FUKUI 2000-08-08 06:12:03 UTC
This problem occurred on my machine.

Machine is :
  FUJITSU GRANPOWER 5000 model760 / model560,
  2 x PentiumPro 200MHz (but not SMP kernel),
  450GX (Orion) chipset (Intel 82453KX/GX),
  2 x AIC7880 SCSI,
  Mylex DAC960P RAID Controler (model760 only)

  This machine seems Intel AP450GX/AR450GX motherboard OEM.
  ( http://support.intel.com/support/motherboards/server/AP450GX/ )

This machine can boot with FreeBSD 3.x and FreeBSD 5-current-20000805.
Only FreeBSD 4.1-{RELEASE,STABLE} kernel fails to boot.

It seems to me that FreeBSD 4 kernel's PCI bus probe fails on 450GX chipset
and the machine hangs up.
(maybe in src/i386/isa/pcibus.c)

To fix, apply following msmith's commit to RELENG_4.

|Message-Id: <200004162048.NAA83339@freefall.freebsd.org>
|From: Mike Smith <msmith@FreeBSD.org>
|Date: Sun, 16 Apr 2000 13:48:34 -0700 (PDT)
|To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
|Subject: cvs commit: src/sys/boot/common help.common src/sys/conf
|         options.i386 src/sys/i386/conf LINT src/sys/i386/i386 bios.c
|         src/sys/i386/include/pc bios.h src/sys/i386/isa pcibus.c
|
|msmith      2000/04/16 13:48:34 PDT
|
|  Modified files:
|    sys/boot/common      help.common 
|    sys/conf             options.i386 
|    sys/i386/conf        LINT 
|    sys/i386/i386        bios.c 
|    sys/i386/include/pc  bios.h 
|    sys/i386/isa         pcibus.c 
|  Log:
|  Some more i386-only BIOS-friendliness:
|  
|   - Add support for using the PCI BIOS functions for configuration space
|     accesses, and make this the default.
|  
|   - Make PNPBIOS the default (obsoletes the PNPBIOS config option).
|  
|   - Add two new boot-time tunables to disable each of the above.
|  
|  Revision  Changes    Path
|  1.15      +8 -0      src/sys/boot/common/help.common
|  1.135     +1 -4      src/sys/conf/options.i386
|  1.770     +1 -3      src/sys/i386/conf/LINT
|  1.30      +18 -14    src/sys/i386/i386/bios.c
|  1.8       +12 -1     src/sys/i386/include/pc/bios.h
|  1.58      +113 -10   src/sys/i386/isa/pcibus.c

I rebuild 4.1-STABLE kernel with following 5-current's sources,
and it works fine.

   Revision  Path
   1.62      src/sys/i386/isa/pcibus.c
   1.35      src/sys/i386/i386/bios.c
   1.8       src/sys/i386/include/pc/bios.h
Comment 3 Sheldon Hearn 2000-08-08 09:02:59 UTC
On Tue, 08 Aug 2000 14:12:03 +0900, Masayuki FUKUI wrote:

> It seems to me that FreeBSD 4 kernel's PCI bus probe fails on 450GX chipset
> and the machine hangs up.
> (maybe in src/i386/isa/pcibus.c)
> 
> To fix, apply following msmith's commit to RELENG_4.

Thank you, Fukui-san.

We'll leave the PR in ``feedback'' state until the originator can test
your suggestion and comment.

Ciao,
Sheldon.
Comment 4 Masayuki FUKUI 2000-10-01 15:43:16 UTC
My machine cannot boot with 4.1.1-RELEASE as before.
I'm inconvenienced.

>On Tue, 08 Aug 2000 14:12:03 +0900, Masayuki FUKUI wrote:
>
>> It seems to me that FreeBSD 4 kernel's PCI bus probe fails on 450GX chipset
>> and the machine hangs up.
>> (maybe in src/i386/isa/pcibus.c)

I tried to find the cause and probably found it.

In src/sys/i386/isa/pcibus.c nexus_pcib_identify(),

| retry:
|        for (probe.slot = 0; probe.slot <= PCI_SLOTMAX; probe.slot++) {
|                probe.func = 0;
|                hdrtype = pci_cfgread(&probe, PCIR_HEADERTYPE, 1);

On unavailable PCI slot, 'hdrtype' is always 0xff (-1).
(Is this right with PCI standard?)

|                if (hdrtype & PCIM_MFDEV)
|                        pcifunchigh = 7;
|                else
|                        pcifunchigh = 0;

and 'pcifunchigh' sets to 7.
(Is this expected?)

|                for (probe.func = 0;
|                     probe.func <= pcifunchigh;
|                     probe.func++) {
|                        /*
|                         * Read the IDs and class from the device.
|                         */
|                        u_int32_t id;
|                        u_int8_t class, subclass, busnum;
|                        device_t child;
|                        const char *s;
|
|                        id = pci_cfgread(&probe, PCIR_DEVVENDOR, 4);

When 'probe.slot' is PCI_SLOTMAX (== 31) and 'probe.func' is 7,
call to 'pci_cfgread()' here and machine suddenly hangs up.
I don't know why...  (or 450GX chipset's bug?)

(When 'probe.slot' is 31 and 'probe.func' is 6,
 it returns from 'pci_cfgread()' and 'id' is 0xffffffff (-1).)


I don't know how to fix rightly.
But I rebuild 4-STABLE kernel with following patch,
and it works fine.

I hope for fixing the probrem as soon as possible.


--- src/sys/i386/isa/pcibus.c.orig	Thu Feb 24 05:25:06 2000
+++ src/sys/i386/isa/pcibus.c	Sun Oct  1 23:16:06 2000
@@ -439,6 +439,7 @@
 	int found = 0;
 	int pcifunchigh;
 	int found824xx = 0;
+	int found_orion = 0;
 
 	if (pci_cfgopen() == 0)
 		return;
@@ -448,7 +449,7 @@
 	for (probe.slot = 0; probe.slot <= PCI_SLOTMAX; probe.slot++) {
 		probe.func = 0;
 		hdrtype = pci_cfgread(&probe, PCIR_HEADERTYPE, 1);
-		if (hdrtype & PCIM_MFDEV)
+		if (hdrtype & PCIM_MFDEV && (!found_orion || hdrtype != 0xff) )
 			pcifunchigh = 7;
 		else
 			pcifunchigh = 0;
@@ -483,6 +484,8 @@
 				found = 1;
 				if (id == 0x12258086)
 					found824xx = 1;
+				if (id == 0x84c48086)
+					found_orion = 1;
 			}
 		}
 	}
Comment 5 msmith freebsd_committer freebsd_triage 2000-11-08 11:26:31 UTC
State Changed
From-To: feedback->closed


Patch to PCI configuration space scan committed after discussion with 
Fukui-san.  Thanks for the clarification!