Bug 32169

Summary: kernel option to enable PCI devices on machines with negligent BIOS
Product: Base System Reporter: Tony Finch <dot>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description Tony Finch 2001-11-21 17:40:00 UTC
The BIOS doesn't activate the IO ports and memory of the PCI devices,
and neither does FreeBSD, so none of them can be used. There is an
unsupported option in FreeBSD that does the job, which the patch
below makes more visible.

Fix: 

--- sys/conf/options	2001/11/03 01:41:07	1.191.2.37
+++ sys/conf/options	2001/11/21 17:17:43
@@ -386,6 +386,7 @@
 
 # PCI related options
 PCI_QUIET		opt_pci.h
+PCI_ENABLE_IO_MODES	opt_pci.h
 
 # NFS options
 NFS_MINATTRTIMO		opt_nfs.h
--- sys/i386/conf/LINT	2001/11/15 20:59:32	1.749.2.91
+++ sys/i386/conf/LINT	2001/11/21 17:14:56
@@ -1730,6 +1730,14 @@
 # PCI options
 #
 #options 	PCI_QUIET	#quiets PCI code on chipset settings
+#
+# Enable this option if your BIOS doesn't enable the IO
+# ports and memory of PCI devices by default (the symptom
+# being lots of "couldn't map ports/memory" messages at
+# boot time). It isn't enabled by default because some
+# devices respond oddly.
+#
+#options	PCI_ENABLE_IO_MODES
 
 
 # The `ahc' device provides support for the Adaptec 29/3940(U)(W)
--- sys/pci/pci.c	2001/08/30 19:42:37	1.141.2.12
+++ sys/pci/pci.c	2001/11/21 17:15:44
@@ -28,7 +28,7 @@
  */
 
 #include "opt_bus.h"
-
+#include "opt_pci.h"
 #include "opt_simos.h"
 
 #include <sys/param.h>
Comment 1 Bruce Evans 2001-11-23 12:02:01 UTC
On Wed, 21 Nov 2001, Tony Finch wrote:

> >Description:
>
> The BIOS doesn't activate the IO ports and memory of the PCI devices,
> and neither does FreeBSD, so none of them can be used. There is an
> unsupported option in FreeBSD that does the job, which the patch
> below makes more visible.
>
> >How-To-Repeat:
> >Fix:
> ...

This fix is already in -current, except it is in the wrong options files
(in only 2 of 6 machine-dependent options files, but this option is
machine-independent).

Bruce
Comment 2 Tony Finch freebsd_committer freebsd_triage 2002-05-29 01:04:09 UTC
State Changed
From-To: open->closed

A similar patch has been committed and MFCed.