Re: [osol-code] Mapping device memory

2008-10-14 Thread Paul Durrant
Christian Kaiser wrote: > > Thanks Paul! That helped a lot! > But there is still one minor thing confusing me. Why is ddi_dev_nregs() > returning nregs=6 and not nregs=5? > The brutally simple answer is that the implementation of that function simply takes the length of the 'reg' property and

Re: [osol-code] Mapping device memory

2008-10-14 Thread Christian Kaiser
Paul Durrant wrote: > Christian Kaiser wrote: > >> OK... I dont't understand this at all. I did a 32-bit read on all >> BARs. Maybe you can explain me this? >> >> 0x10 0xc830 >> 0x12 0xbeefc830 >> 0x14 0x0 >> 0x16 0x0 >> 0x18 0xd800 >> 0x20 0xd000 >> 0x22 0xbeefd000 >> 0x24 0xcc00

Re: [osol-code] Mapping device memory

2008-10-14 Thread Paul Durrant
Christian Kaiser wrote: > OK... I dont't understand this at all. I did a 32-bit read on all BARs. > Maybe you can explain me this? > > 0x10 0xc830 > 0x12 0xbeefc830 > 0x14 0x0 > 0x16 0x0 > 0x18 0xd800 > 0x20 0xd000 > 0x22 0xbeefd000 > 0x24 0xcc00 > 0x26 0xcc00 > Those are 32-bi

Re: [osol-code] Mapping device memory

2008-10-13 Thread Christian Kaiser
minskey guo wrote: > Christian Kaiser 写道: >> Garrett D'Amore wrote: >> >>> 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 0xcbdc

Re: [osol-code] Mapping device memory

2008-10-13 Thread minskey guo
Christian Kaiser 写道: > Garrett D'Amore wrote: > >> 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 0xcbdc >>> BAR1, Offset 0x14, Va

Re: [osol-code] Mapping device memory

2008-10-13 Thread Christian Kaiser
Garrett D'Amore wrote: > 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 0xcbdc >> BAR1, Offset 0x14, Value 0x >> BAR2, Offset 0x18, Value 0x

Re: [osol-code] Mapping device memory

2008-10-13 Thread Garrett D'Amore
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 0xcbdc > BAR1, Offset 0x14, Value 0x > BAR2, Offset 0x18, Value 0xc400 > BAR3, Offset 0x1c, Valu

[osol-code] Mapping device memory

2008-10-13 Thread Christian Kaiser
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 0xcbdc BAR1, Offset 0x14, Value 0x BAR2, Offset 0x18, Value 0xc400 BAR3, Offset 0x1c, Value 0xc000 BAR4, Offset 0x20, Value 0xb