Thanks for the help,

[email protected] wrote:
Have you tried reading other registers in this space? Are all giving you 0xffffffff?

Yes, I have accessed 1k of contiguous addresses in this space (with a for loop around a ddi_get32). On my PCI Bus Analyzer, the device returns 0x00000000 for empty registers -- but I still see 0xffffffff returned in my driver.

I have also written a scratch register and read the results. When I write my scratch registers with 0xdeaddead, I see 0xdeaddead written to my scratch register with by PCI Bus Analyzer; and I see it read out (with my subsequent ddi_get32) as 0xdeaddead, but my function still returns 0xffffffff.

So this appears to be only a get issue.  My puts seems to work fine.

***

As an aside, I tried to read the register space with:

   int32_t val=0xabcd;
   status=ddi_peek32(dip,addr,&val);

It never completes (I don't see a read on my bus analyzer), and instead returns a status=DDI_FAILURE while corrupting val with invalid data.

I don't know how to diagnose what ddi_peek32 doesn't like.

Does your code compile without any warnings?

No warnings.  I am using the default sun compiler:

% cc -V
cc: Sun Ceres C 5.10 SunOS_1386 2008/10/22

Since the space is supposed to be memory mapped, have you tried looking at the memory using mdb?

No I have not. I will start learning how to use that tool today. Thanks for pointing me in that direction.

-Adam
_______________________________________________
driver-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/driver-discuss

Reply via email to