tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pci_mapreg_map and BAR from `Bus space tutorial'



Hi.

On 6/12/20 3:30 PM, Rocky Hotas wrote:

I applied your patch and it works for me the same way. Thanks!

Excellent, glad to hear that.

As a sidenote: I found your bus_space_tutorial very useful, the only one
available about this topic. For this problem, I suspended it at slide
47 of your pdf.

There's also a good general tutorial about NetBSD drivers, by Jochen Kunz, that is referenced at the end of bus_space tutorial.

My intention is to follow it entirely, and then to elaborate and expend
it (adding comments, citations from the manpages), in order to keep a
useful and up-to-date introduction for a newbie. Would you agree?

Yes, definitely.

Originally, the slides were used as a part of hands-on tutorial delivered by me during EuroBSDCon 2012 (and later for some commercial clients).

The slides were not designed as a stand-alone learning material - I just used them to track the progress of a live tutorial, and emphasize important areas. So slides obviously lack any background information or comments.

As you have probably noticed, the source to slides and examples is available on GitHub. However, if you are serious about expanding the tutorial please contact me off-list, as I am getting more and more hesitant to continue using GitHub for anything (I'll arrange a self-hosted repo).

I hope to be able to follow the remainder of the tutorial by my own. But
if some other problem could arise, can I contact you in future?
Obviously only if and when strictly necessary.

Sure, feel free to contact me.

Due to time constraints, I cannot guarantee a timely response, but I am very much interested in any further problems, or general comments that you may have.

P.S.
I don't know if it's relevant, but something weird instead happens if I
try to write 0xFFFFFFFF in the faa BAR.
Before your patch, after the write, the BAR provided the value
0x0000FFF0: I was expecting 0xFFFFFFF0.
After your patch, and after writing 0xFFFFFFFF, BAR showed an even weirder
value: 0x000FFFFF. I used pcictl(8) for these operations. However, it all
seems to work from the dmesg, so maybe they are due to the fact that
this PCI device is not real.

I honeslty have no idea, debugging this would require digging into gxemul internals.

Best regards,
Radoslaw


Home | Main Index | Thread Index | Old Index