svn commit: r254882 - head/sys/dev/pci
John Baldwin
jhb at freebsd.org
Tue Sep 3 19:08:31 UTC 2013
On Saturday, August 31, 2013 3:39:26 am Jean-Sébastien Pédron wrote:
> Le 30/08/2013 22:44, John Baldwin a écrit :
> >> However, BUS_ALLOC_RESOURCE() returns NULL in my tests.
> >
> > Hmm, can you get devinfo -u output? I wonder if orm0 is eating this
> > resource.
>
> You'll find it attached.
Yes, orm0 is eating it. Try this along with using RF_SHAREABLE in your
call to BUS_ALLOC_RESOURCE():
Index: x86/isa/orm.c
===================================================================
--- orm.c (revision 255020)
+++ orm.c (working copy)
@@ -133,7 +133,8 @@ orm_identify(driver_t* driver, device_t parent)
bus_set_resource(child, SYS_RES_MEMORY, sc->rnum, chunk,
rom_size);
rid = sc->rnum;
- res = bus_alloc_resource_any(child, SYS_RES_MEMORY, &rid, 0);
+ res = bus_alloc_resource_any(child, SYS_RES_MEMORY, &rid,
+ RF_SHAREABLE);
if (res == NULL) {
bus_delete_resource(child, SYS_RES_MEMORY, sc->rnum);
chunk += IOMEM_STEP;
--
John Baldwin
More information about the svn-src-all
mailing list