+ case PCI_DEVICE_ID_INTEL_82865:
+ /*
+ * On i865, the memory access enable/disable bit (MCHBAREN on
+ * i945/i965) is not in the MCHBAR (i945/i965) register but in
+ * the PCICMD6 register. BAR6 and PCICMD6 reside on device 6.
+ *
+ * The actual base address is in BAR6 on i865 where on
+ * i945/i965 the base address is in MCHBAR.
+ */
+ nb_device6 = pci_get_dev(pacc, 0, 0, 0x06, 0); /* Device 6 */
+ mchbar_phys = pci_read_long(nb_device6, 0x10); /* BAR6 */
+ pcicmd6 = pci_read_long(nb_device6, 0x04); /* PCICMD6 */
+
+ /* Try to enable Memory Access Enable (MAE). */
+ if (!(pcicmd6 & (1 << 1))) {
+ printf("Access to BAR6 is currently disabled, "
+ "attempting to enable.\n");
+ pci_write_long(nb_device6, 0x04, pcicmd6 | (1 << 1));
+ if (pci_read_long(nb_device6, 0x04) & (1 << 1))
+ printf("Enabled successfully.\n");
+ else
+ printf("Enable FAILED!\n");
+ }
+ mchbar_phys &= 0xfffff000; /* Bits 31:12 from BAR6 */
+ break;