WARNING: This is a hack at best.  It may or may not work for you.

Summary: For some reason, the binary-only part of 5328 calls
os_pci_read_dword with a NULL handle within nv_agp_init.  This patch
assumes the first device called via os_pci_init_handle is the host
bridge, and then uses that handle in os_pci_read_dword if the passed
handle is NULL.

Ben Winslow <rain bluecherry net>

--- old/os-interface.c	2003-12-22 06:51:42.000000000 -0500
+++ nv/os-interface.c	2003-12-22 06:58:11.000000000 -0500
@@ -541,7 +541,7 @@
     printk("%d: %s", smp_processor_id(), str);
 }    
 
-
+static void *hb_handle = NULL;
 
 #define MAX_ERROR_STRING 256
 
@@ -598,6 +598,8 @@
     dev = pci_find_slot(bus, PCI_DEVFN(slot, function));
     if (!dev)
         return NULL;
+    if (hb_handle == NULL)
+    	hb_handle = dev;
     if (vendor) *vendor = dev->vendor;
     if (device) *device = dev->device;
     return (VOID *) dev;
@@ -629,6 +631,15 @@
 ) 
 {
     U032 value;
+    if (handle == NULL) {
+    	if (hb_handle != NULL) {
+	    	printk(KERN_INFO "NVRM: os_pci_read_dword: WARNING: NULL handle (offset %d), pretending handle is for host bridge\n", offset);
+    		handle = hb_handle;
+    	} else {
+    		printk(KERN_INFO "NVRM: os_pci_read_dword: WARNING: NULL handle and nothing to substitute!  returning 0\n");
+    		return 0;
+    	}
+    }
     pci_read_config_dword( (struct pci_dev *) handle, offset, (u32 *) &value);
     return value;
 }
