From b67b453040895fa9d618ea47e4f7c1ce8c9c4101 Mon Sep 17 00:00:00 2001 From: "kaf24@scramble.cl.cam.ac.uk" Date: Sat, 8 Jan 2005 17:18:44 +0000 Subject: [PATCH] bitkeeper revision 1.1159.170.82 (41e015f4JgNe4YTschd0_g0exH4QQw) Turn off strict PCI base-address poking checks. May help video-card compatibility. May revert this patch if not. --- xen/common/physdev.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/xen/common/physdev.c b/xen/common/physdev.c index c01b7f0805..4b6f398e9a 100644 --- a/xen/common/physdev.c +++ b/xen/common/physdev.c @@ -45,6 +45,7 @@ extern void pcibios_enable_irq(struct pci_dev *dev); #define INFO(_f, _a...) ((void)0) #endif +#define SLOPPY_CHECKING #define ACC_READ 1 #define ACC_WRITE 2 @@ -289,7 +290,7 @@ inline static int check_dev_acc (struct domain *p, return 0; } - +#ifndef SLOPPY_CHECKING /* * Base address registers contain the base address for IO regions. * The length can be determined by writing all 1s to the register and @@ -480,6 +481,7 @@ static int do_rom_address_access(phys_dev_t *pdev, int acc, int len, u32 *val) return ret; } +#endif /* SLOPPY_CHECKING */ /* * Handle a PCI config space read access if the domain has access privileges. @@ -496,12 +498,13 @@ static long pci_cfgreg_read(int bus, int dev, int func, int reg, * all 1s. In this case the domain has no read access, which should * also look like the device is non-existent. */ *val = 0xFFFFFFFF; - return ret; /* KAF: error return seems to matter on my test machine. */ + return ret; } /* Fake out read requests for some registers. */ switch ( reg ) { +#ifndef SLOPPY_CHECKING case PCI_BASE_ADDRESS_0: ret = do_base_address_access(pdev, ACC_READ, 0, len, val); break; @@ -529,6 +532,7 @@ static long pci_cfgreg_read(int bus, int dev, int func, int reg, case PCI_ROM_ADDRESS: ret = do_rom_address_access(pdev, ACC_READ, len, val); break; +#endif case PCI_INTERRUPT_LINE: *val = pdev->dev->irq; @@ -561,6 +565,7 @@ static long pci_cfgreg_write(int bus, int dev, int func, int reg, /* special treatment for some registers */ switch (reg) { +#ifndef SLOPPY_CHECKING case PCI_BASE_ADDRESS_0: ret = do_base_address_access(pdev, ACC_WRITE, 0, len, &val); break; @@ -588,6 +593,7 @@ static long pci_cfgreg_write(int bus, int dev, int func, int reg, case PCI_ROM_ADDRESS: ret = do_rom_address_access(pdev, ACC_WRITE, len, &val); break; +#endif default: if ( pdev->flags != ACC_WRITE ) -- 2.39.5