i386/5048: pciprobe in the second-stage bootstrap does not work correctly

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

i386/5048: pciprobe in the second-stage bootstrap does not work correctly

Yuichiro Goto
>Number:         5048
>Category:       i386
>Synopsis:       pciprobe in the second-stage bootstrap does not work correctly
>Confidential:   yes
>Severity:       non-critical
>Priority:       low
>Responsible:    bugs
>State:          open
>Quarter:        
>Keywords:      
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 11 07:30:02 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Yuichiro Goto
>Release:        3.8
>Organization:
net
>Environment:
       
        System      : OpenBSD 3.8
        Architecture: OpenBSD.i386
        Machine     : i386
>Description:
        pciprobe in the second-stage bootstrap does not work correctly, because
        it does not deal with carry flag correctly after BIOS call INT 0x1A.
>How-To-Repeat:
        Boot i386 systems.
>Fix:
        In the inline assembly code found in the src/sys/arch/i386/stand/libsa/pciprobe.c, carry flag
        is set to the least-significant byte of the variable rc and number of last PCI bus in system,
        content of the CL register, is set to the next least-significant byte of rc after BIOS call INT
        0x1A, so "rc & 0xff00" is non-zero in systems that PCI BIOS is installed.

Index: src/sys/arch/i386/stand/libsa/pciprobe.c
===================================================================
RCS file: /cvs/src/sys/arch/i386/stand/libsa/pciprobe.c,v
retrieving revision 1.8
diff -u -r1.8 pciprobe.c
--- src/sys/arch/i386/stand/libsa/pciprobe.c    9 Mar 2004 19:12:13 -0000       1.8
+++ src/sys/arch/i386/stand/libsa/pciprobe.c    11 Mar 2006 02:20:28 -0000
@@ -48,7 +48,7 @@
                : "0" (0xB101), "4" (0x0)
                : "cc");
 
-       if (rc & 0xff00 || hw_chars & 0xff00)
+       if (rc & 0xff || hw_chars & 0xff00)
                return;
        if (sig != PCI_SIG)
                return;


>Release-Note:
>Audit-Trail:
>Unformatted: