Page 1 of 1

Hardware Support (Networking/Graphics etc)

Posted: Wed Feb 11, 2009 12:12 pm
by johnsa
Hey all,

It's been a while since I worked on any OS code at all, the main reason I stopped the last time was that I got to a point where without being able to write code to support specific devices I just didn't really see any point in continuing.

The basic idea behind my OS project was to create an OS that was designed to run off dedicated/specified hardware. IE: Intel 965 chipset+graphics, intel wireless link 9645AGN only. Although this isn't useful for a lot of people out there it would be perfect for what I want.. as long as I can support some specific devices (usb + audio + gfx + networking) etc.

I know that Intel and ATI have gone some way to opening up their documentation/specifications, but the problem I still have is three-fold

#1 .. These documents are highly detailed and don't offer much insight into "HOW" to program the device, IE: Init sequence, commands, values.. order of operations and registers to use etc. I was wondering if anyone has such info to accompany say the ATI or Intel documentaion?

#2 .. I can't find ANY open reference/programming guides for common network devices (such as the Intel PRO / Intel wireless which id like to start with as these are the 2 I have).

#3 .. Audio h/w reference for something like the SigmaTel HD Audio found in my Dell Lattitude Laptop.

I'm still in the same position where I'm not prepared to really commit any extra time to writing kernel and support code if the end result is not going to be capable of utilizing the hardware I want in the way I want.

Hope someone has some thoughts/ideas or suggestions!
Thanks!
John

Re: Hardware Support (Networking/Graphics etc)

Posted: Wed Feb 11, 2009 12:20 pm
by djmauretto
Don't be sad :cry:
Also Linux nevertheless some manufacturer write driver for it
has many problems with hardware,maybe one day all driver will be
with a standard interface ,and everyone will be Happy :D

Re: Hardware Support (Networking/Graphics etc)

Posted: Wed Feb 11, 2009 12:31 pm
by Combuster
#1 .. These documents are highly detailed and don't offer much insight into "HOW" to program the device, IE: Init sequence, commands, values.. order of operations and registers to use etc. I was wondering if anyone has such info to accompany say the ATI or Intel documentaion?
In order to get some feel for it, start with a low level VGA driver, and have it be able to set a resolution of your choice. VGA Hardware can help you with that. The point here is that most graphics devices work in mostly the same way. Once you can access the device in VGA mode, try doing the same in native mode. First set a resolution, then work your way from there. Basically all I can tell you is that it's not easy.
#2 .. I can't find ANY open reference/programming guides for common network devices (such as the Intel PRO / Intel wireless which id like to start with as these are the 2 I have).
Improve your google skills (To start with, intel pro/100 isn't the official term for the controller)
http://www.intel.com/products/ethernet/ ... 1IT&s3=all
#3 .. Audio h/w reference for something like the SigmaTel HD Audio found in my Dell Lattitude Laptop.
Again, look for the official name - its a intel HDA chip: http://linux.dell.com/wiki/index.php/Te ... 9227_Codec

That makes 5 minutes of googling :)

Re: Hardware Support (Networking/Graphics etc)

Posted: Wed Feb 11, 2009 1:27 pm
by johnsa
Im pretty familiar with the vga level coding from the demo scene days doing copper and modex etc, so that's not a big issue. It's more a case of how one would go about actually programming the bitblt / dma engine and mode setting procedures on newer h/w.. and using overlay support etc. Its all very well having a 3000 page reference listing every reg/port but without a companion guide it's a bit daunting.

The pro/100 was just an example, i'm actually looking for the Intel WiFi Link 6945AGN reference..
Thanks for the audio tip tho, i'll check out the ICH8 specs from intel.

Re: Hardware Support (Networking/Graphics etc)

Posted: Wed Feb 11, 2009 2:37 pm
by Combuster
Are you sure you don't mean the intel 4965AGN (you gave two different names and neither looks as if it exists)?
sourcecode available, courtesy of linux - maybe mailing the devs can help you with reference documentation (if only to tell you its under NDA)
and mode setting procedures on newer h/w..
Well, that hasn't changed much. Have a look at the mode setting parts of the VGA, you can split that into three categories:
- registers that control the output signal (CRTC, Clock select)
- registers that control the conversion of video memory to graphics data (CRTC and Sequencer)
- registers that turn graphics data into color signals (AC and DAC)
The differences (at least, from what I've seen from my ATI and Verite experiments):
- a register that selects VGA or native mode
- GPU registers.

Go through the document and scratch the GPU registers (which gets rid of at least two thirds of the candidates), then find the equivalents of the VGA registers, and convert the mode values to match their new positions/interpretations. That leaves the vga/native mode control. Change that, then write your computed register dump, and chances are things will just work.
If not, have a look at whatever register (fields) are untouched and whether you neet to set them.

It may also help to boot into DOS, start a utility to set a VESA mode and write a register dump to disk (do the same for mode 12 and compare them.) Then make a test driver that writes the differences to the card, then compare that code to the manuals and see what's happening. Also, try stripping off certain writes to see if they are truly necessary.

If you think its adventurous, it was meant to be. I never programmed an intel graphics card before - I don't even have one - so I really can't tell how it behaves exactly.

As for the GPU registers, they are only second to actually displaying graphics :)
Having some deep down DirectDraw/Direct3D/OpenGL experience can help a lot in figuring what these registers are meant to do.

Re: Hardware Support (Networking/Graphics etc)

Posted: Thu Feb 12, 2009 8:31 am
by jal
Combuster wrote:I never programmed an intel graphics card before
Intel (almost?) always provides full documentation, so when targeting a single platform, I'd choose one with all Intel components.


JAL