Re: want to be a hardware developer ?
Vladimir Dergachev <[email protected]>
| Newsgroups | gmane.comp.xfree86.forum |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 26 Mar 2003, Egbert Eich wrote:
> Vladimir Dergachev writes:
> >
> > Unlike public specifications for chips like bt848 - which are rather
> > detailed and contain tons of information besides register addresses, many
> > specifications that I worked with are far less detailed.
> >
> > For example, it could be that for most of the registers only the addresses
> > and the names of particular bitfields are known - nothing more. It is up
>
> Yes, and manufacturers are very inventive when it comes to register
> names.
>
Fortunately there are not that many manufacturers.
> > to the developer to figure out how the hardware works by writing trial
> > values and determining which bits do what and in what sequence they have
> > to be programmed.
>
> This can be a very frustrating experience.
> One may find himself rebooting you box hundreds of times a day.
> One should better be prepared for that.
>
This is true, however, see below on register scanning.
>
> [...]
> >
> > * As an exercise write a register scanner for Linux - this is
> > a tool that uses /dev/mem (and, perhaps, /dev/iomem) to read
> > values from all registers and print them.
>
> This will not work on all platforms. ia32 and friends are quite save.
> On AXP or ia64 one is likely to trigger a machine check.
>
I was really thinking about ia32. Do you know whether PPC will work ?
> > * Port it to Windows. You can use hws_win from
> > http://gatos.sf.net/apps.php for direct access to memory mapped
> > hardware (this is windows port of hw_script - though PCI id
> > scanning is not supported yet).
>
> Interesting idea. One may also 'reverse engineer' the Windows driver.
> People have done so successfully. I cannot offer any tools to do
> this though.
>
Reverse engineering is very time consuming. I was simply suggesting that a
novice developer tries to verify code by comparing register values
between windows and linux drivers. This can be quite valuable as driver
maintainer, even in the case of having the particular hardware, may not be
able to test the code with all the different versions. Also this would
help in the case there are boards with identical graphics chips, but
different otherwise.
Register scanning is relatively easy to set up, does not result in lockups
as often as any other method and can yield good results - in particular,
when XFree86 driver has been written but needs to be polished.
best
Vladimir Dergachev