Fwd: nVidia BIOS mapping problems & solution [was Re: 5.2 and Dell Inspiron 5100]

From: Peter Edwards (pmedwards_at_eircom.net)
Date: 02/14/04

  • Next message: Dima Dorfman: "Re: usb devices and devfs settings"
    To: freebsd-current@freebsd.org
    Date: Fri, 13 Feb 2004 23:31:56 -0000
    
    
    

    Er, originally posted in error to -hackers instead of -current: please
    follow up on -current, and apologies for the noise.

    ------- Forwarded message -------
    From: Peter Edwards <pmedwards@eircom.net>
    To: freebsd-hackers@freebsd.org
    Subject: nVidia BIOS mapping problems & solution [was Re: 5.2 and Dell
    Inspiron 5100]
    Date: Fri, 13 Feb 2004 23:22:23 -0000

    > It seems a few people as well as myself have run into problems with
    > nVidia cards not having their VESA bios mapped correctly.
    >
    > I was happy using a local patch (with a different approach than Greg
    > Lehey's) in order to use the nVidia-supplied drivers. I decided to look
    > into this one more time before KSE started to kill my nVidia drivers (or
    > vice versa, I suppose)
    >
    > My chipset is apparently an intel "845G" device: it reports itself with
    > a PCI ID of 0x25608086, which isn't handled by the Intel AGP code. It
    > seems that the "generic" fallbacks muck about with the BIOS mapping on
    > this chipsets: I figure the registers are just different on the chipset
    > I have, and assume they're similar to the "I845" device: Adding my
    > chipsets PCI ID to the cases that handle the i845 gives me a working
    > VESA BIOS
    > Patch is attached. For others with the same settings, you might need to
    > add the device ID of your own AGP chipset. I'm not even sure what the
    > PCI config registers affected are for, so even creating an empty case
    > statement for your device might help, just by avoiding the default case.
    > (Should the default case really be fiddling with device-specific
    > registers if it doesn't understand what type of device it is?)
    >
    > BTW: I also noticed an interaction between the "orm" device and the
    > nVidia BIOS: For some reason, the ORM driver ignores ROMs with a "55AA"
    > header if the length is not a multiple of 2K: I don't think this is
    > correct: I think the real intention is to maintain the 2K spacing from
    > IOMEM_START. i.e. I've attached a possible patch for that, also.

    -- 
    Peter Edwards
    
    

    Index: sys/isa/orm.c
    ===================================================================
    RCS file: /usr/cvs/FreeBSD-CVS/src/sys/isa/orm.c,v
    retrieving revision 1.3
    diff -u -r1.3 orm.c
    --- sys/isa/orm.c 11 Jun 2003 00:32:45 -0000 1.3
    +++ sys/isa/orm.c 13 Feb 2004 23:15:16 -0000
    @@ -125,7 +125,7 @@
                      */
                     bus_release_resource(child, SYS_RES_MEMORY, rid, res);
                     bus_delete_resource(child, SYS_RES_MEMORY, sc->rnum);
    - if (buf[0] != 0x55 || buf[1] != 0xAA || (buf[2] & 0x03) != 0) {
    + if (buf[0] != 0x55 || buf[1] != 0xAA) {
                             chunk += IOMEM_STEP;
                             continue;
                     }
    @@ -143,7 +143,7 @@
                     sc->rid[sc->rnum] = rid;
                     sc->res[sc->rnum] = res;
                     sc->rnum++;
    - chunk += rom_size;
    + chunk += (buf[2] + 3 & ~3) << 9; /* Round up to 2K. */
             }
     
             if (sc->rnum == 0)

    
    

    Index: sys/pci/agp_intel.c
    ===================================================================
    RCS file: /usr/cvs/FreeBSD-CVS/src/sys/pci/agp_intel.c,v
    retrieving revision 1.19
    diff -u -r1.19 agp_intel.c
    --- sys/pci/agp_intel.c 17 Sep 2003 02:58:17 -0000 1.19
    +++ sys/pci/agp_intel.c 13 Feb 2004 22:03:42 -0000
    @@ -111,6 +111,9 @@
     
             case 0x25788086:
                     return ("Intel 82875P host to AGP bridge");
    +
    + case 0x25608086: /* i845G */
    + return ("Intel 82845G host to AGP bridge");
             };
     
             if (pci_get_vendor(dev) == 0x8086)
    @@ -236,11 +239,13 @@
             case 0x25318086: /* i860 */
             case 0x25708086: /* i865 */
             case 0x25788086: /* i875P */
    + case 0x25608086: /* i845G */
                     pci_write_config(dev, AGP_INTEL_I8XX_ERRSTS, 0x00ff, 2);
                     break;
     
             default: /* Intel Generic (maybe) */
                     pci_write_config(dev, AGP_INTEL_ERRSTS + 1, 7, 1);
    + break;
             }
     
             return 0;
    @@ -278,6 +283,7 @@
                                     & ~(1 << 1)), 1);
     
             case 0x1a308086: /* i845 */
    + case 0x25608086: /* i845G */
             case 0x33408086: /* i855 */
             case 0x25708086: /* i865 */
             case 0x25788086: /* i875P */

    
    

    _______________________________________________
    freebsd-current@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-current
    To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"


  • Next message: Dima Dorfman: "Re: usb devices and devfs settings"

    Relevant Pages

    • RE: Nvidia cable detection problems (was [PATCH] amd74xx: dont configure udma mode higher than BIOS
      ... So if it's a UDMA5 drive but the BIOS left it at UDMA2 ... lot of testing from NVIDIA and board vendors. ... Subject: Nvidia cable detection problems (was amd74xx: ... I dunno the reason but it also makes drives confused ...
      (Linux-Kernel)
    • Re: IO-APIC on nforce2 [PATCH] + [PATCH] for nmi_debug=1 + [PATCH] for idle=C1halt, 2.6.5
      ... an NVIDIA engineer ... He can tell us there was a bug in a reference BIOS that NVIDIA sent out ... Without Ross' hard labor one can avoid the hard locks by banning APIC ... Although this topic is primarily about nforce2 chipsets, ...
      (Linux-Kernel)
    • RE: IO-APIC on nforce2 [PATCH]
      ... > We've fixed it for our reference BIOS for future products though. ... done) that there are nForce BIOS issues causing reproducable hard ... from Nvidia and another, I think AMD) is turning me away (back to Intel ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: is Nvidia Nforce stable ?
      ... Its Nvidia, No its Maxtor, No its>Microsoft, No its Antech, No its Amd. ... PLus there are so many features on this board and in it's BIOS. ... Only difference I noticed was using the M$ XP drivers there was no "removable device" icon on the system tray...when I installed the Nvidia SATA drivers the logo appears. ... The A8N32-SLI should be supported by Asus for quite a long while. ...
      (alt.comp.hardware.pc-homebuilt)
    • Install XP Home Upgrade Blocking Issue: Video Card and Motherboard
      ... Maddog Conquerer GEforceFX 4200 Plus ... Latest Drivers for 98 Also tried Nvidia Drivers and Standard ... I have removed all other cards and disabled onboard items in Bios ...
      (microsoft.public.windowsxp.general)