diff options
author | Robert Noland <rnoland@FreeBSD.org> | 2009-02-08 23:44:20 +0000 |
---|---|---|
committer | Robert Noland <rnoland@FreeBSD.org> | 2009-02-08 23:44:20 +0000 |
commit | eb22faa9bc70ce254a7f96d4d1f624a3a9c0394d (patch) | |
tree | 4852a89ae7252b5d09a22ebba0892014fbc6b3a2 /devel/libpciaccess | |
parent | 9c6800ce358f109e2d763e66ec21c66b9999d3f0 (diff) | |
download | ports-eb22faa9bc70ce254a7f96d4d1f624a3a9c0394d.tar.gz ports-eb22faa9bc70ce254a7f96d4d1f624a3a9c0394d.zip |
Notes
Diffstat (limited to 'devel/libpciaccess')
-rw-r--r-- | devel/libpciaccess/Makefile | 2 | ||||
-rw-r--r-- | devel/libpciaccess/files/patch-src-freebsd_pci.c | 34 |
2 files changed, 23 insertions, 13 deletions
diff --git a/devel/libpciaccess/Makefile b/devel/libpciaccess/Makefile index 0e328ff853f4..6b972bb62f5e 100644 --- a/devel/libpciaccess/Makefile +++ b/devel/libpciaccess/Makefile @@ -7,7 +7,7 @@ PORTNAME= libpciaccess PORTVERSION= 0.10.5 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= devel MAINTAINER= x11@FreeBSD.org diff --git a/devel/libpciaccess/files/patch-src-freebsd_pci.c b/devel/libpciaccess/files/patch-src-freebsd_pci.c index eb001b7b5463..6ea3788eff63 100644 --- a/devel/libpciaccess/files/patch-src-freebsd_pci.c +++ b/devel/libpciaccess/files/patch-src-freebsd_pci.c @@ -1,5 +1,5 @@ ---- src/freebsd_pci.c.orig 2009-01-31 03:55:37.000000000 -0500 -+++ src/freebsd_pci.c 2009-01-31 03:55:55.000000000 -0500 +--- src/freebsd_pci.c.orig 2008-10-31 11:40:09.000000000 -0400 ++++ src/freebsd_pci.c 2009-02-08 18:03:29.000000000 -0500 @@ -53,6 +53,20 @@ #define PCIS_DISPLAY_3D 0x02 #define PCIS_DISPLAY_OTHER 0x80 @@ -46,7 +46,7 @@ if ( ( dev->device_class & 0x00ffff00 ) != ( ( PCIC_DISPLAY << 16 ) | ( PCIS_DISPLAY_VGA << 8 ) ) ) -@@ -248,11 +270,27 @@ +@@ -248,11 +270,29 @@ return ENOSYS; } @@ -54,8 +54,9 @@ +#if defined(__amd64__) || defined(__i386__) + rom_base = 0xc0000; + pci_rom = 0; -+#endif ++#else + return ENOSYS; ++#endif + } else { + rom_base = priv->rom_base; + pci_rom = 1; @@ -66,16 +67,17 @@ + pci_device_cfg_write_u32( dev, rom | PCIM_BIOS_ENABLE, PCIR_BIOS ); + } + ++ printf("Using rom_base = 0x%lx\n", (long)rom_base); memfd = open( "/dev/mem", O_RDONLY ); if ( memfd == -1 ) return errno; - bios = mmap( NULL, dev->rom_size, PROT_READ, 0, memfd, 0xc0000 ); -+ bios = mmap( NULL, dev->rom_size, PROT_READ, 0, memfd, priv->rom_base ); ++ bios = mmap( NULL, dev->rom_size, PROT_READ, 0, memfd, rom_base ); if ( bios == MAP_FAILED ) { close( memfd ); return errno; -@@ -263,6 +301,11 @@ +@@ -263,6 +303,11 @@ munmap( bios, dev->rom_size ); close( memfd ); @@ -87,7 +89,7 @@ return 0; } -@@ -300,20 +343,13 @@ +@@ -300,20 +345,13 @@ static int get_test_val_size( uint32_t testval ) { @@ -109,7 +111,7 @@ } /** -@@ -329,6 +365,7 @@ +@@ -329,6 +367,7 @@ int bar ) { uint32_t addr, testval; @@ -117,7 +119,7 @@ int err; /* Get the base address */ -@@ -336,12 +373,35 @@ +@@ -336,12 +375,35 @@ if (err != 0) return err; @@ -154,7 +156,15 @@ if (addr & 0x01) dev->regions[region].is_IO = 1; -@@ -374,6 +434,7 @@ +@@ -352,6 +414,7 @@ + + /* Set the size */ + dev->regions[region].size = get_test_val_size( testval ); ++ printf("size = 0x%lx\n", (long)dev->regions[region].size); + + /* Set the base address value */ + if (dev->regions[region].is_64) { +@@ -374,6 +437,7 @@ pci_device_freebsd_probe( struct pci_device * dev ) { struct pci_device_private *priv = (struct pci_device_private *) dev; @@ -162,7 +172,7 @@ uint8_t irq; int err, i, bar; -@@ -400,13 +461,29 @@ +@@ -400,13 +464,29 @@ bar += 0x04; } @@ -196,7 +206,7 @@ } return 0; -@@ -495,6 +572,7 @@ +@@ -495,6 +575,7 @@ pci_sys->devices[ i ].base.device_id = p->pc_device; pci_sys->devices[ i ].base.subvendor_id = p->pc_subvendor; pci_sys->devices[ i ].base.subdevice_id = p->pc_subdevice; |