Christian Kaiser wrote: > Hi all, > > I am currently porting a driver from Linux to Solaris. > > The BAR description in the PCI config space looks like this: > > BAR0, Offset 0x10, Value 0xcbdc0000 > BAR1, Offset 0x14, Value 0x00000000 > BAR2, Offset 0x18, Value 0xc4000000 > BAR3, Offset 0x1c, Value 0xc0000000 > BAR4, Offset 0x20, Value 0xbc000000 > BAR5, Offset 0x24, Value 0xb8000000 > > ddi_dev_nregs returns 6 register sets what is correct but for > ddi_dev_regsize I don't get the zero size value for BAR1 (which would be > correct) but the size of BAR2. I get an error running ddi_dev_regsize > with rnumber=6. It seems that Solaris renumbers the register sets in my > special case where one BAR1 value is 0x0 and the size is 0. The same > applies to ddi_regs_map_setup. > > Is my assumption concerning the renumbering correct? Isn't that confusing? > > Regards, > Christian > > For PCI devices, the starting index is 1, not 0. (0 is reserved to indicate PCI configuration space.)
I don't know why with rnumber 6 you get an error -- that's surprising. I'd have expected rnumber 6 to return the settings for BAR5 above. -- Garrett _______________________________________________ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code