Chipsets

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
einsteinjunior
Member
Member
Posts: 90
Joined: Tue Sep 11, 2007 6:42 am

Chipsets

Post by einsteinjunior »

Hi out there.
Does anyone out there know how programming of a chipset is done?
Thanks.
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post by Brynet-Inc »

Well Mr Vague.. ;)

Can you be a little more... specific? :roll:
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
einsteinjunior
Member
Member
Posts: 90
Joined: Tue Sep 11, 2007 6:42 am

Post by einsteinjunior »

Ok then,
I wish to use USB on my OS and also directly probe the memory available in the system.But i don't want to go through the BIOS.
I know i can program the chipset registers for that.
How to proceed is the question.
Korona
Member
Member
Posts: 1000
Joined: Thu May 17, 2007 1:27 pm
Contact:

Post by Korona »

You cannot do that without having a driver for each chipset. Memory detection depends heavily on your chipset, there is no common way to probe for useable memory without using the BIOS.
User avatar
einsteinjunior
Member
Member
Posts: 90
Joined: Tue Sep 11, 2007 6:42 am

Post by einsteinjunior »

So how do i write a driver for a chipset?
There is this old version of linux working with some sort of "generic" chipset driver.
Thats exactly what i need.
User avatar
os64dev
Member
Member
Posts: 553
Joined: Sat Jan 27, 2007 3:21 pm
Location: Best, Netherlands

Post by os64dev »

einsteinjunior wrote:Ok then,
I wish to use USB on my OS and also directly probe the memory available in the system.But i don't want to go through the BIOS.
I know i can program the chipset registers for that.
How to proceed is the question.
einstein shame on you [-X direct probing is very hazardous for you system. Hence the int $15/$E820 function in the BIOS which is very reliable BTW.
Author of COBOS
User avatar
einsteinjunior
Member
Member
Posts: 90
Joined: Tue Sep 11, 2007 6:42 am

Post by einsteinjunior »

There is no shame on me!!!
Direct probing can be done SAFELY using the CHIPSET.
Got that?
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post by Brynet-Inc »

Typically a small EEPROM on SDRAM modules is interpreted by the BIOS, I'm assuming that's how the BIOS detects available RAM these days.. (Not direct probing..)

http://en.wikipedia.org/wiki/Serial_Presence_Detect
Last edited by Brynet-Inc on Tue Oct 16, 2007 9:06 am, edited 2 times in total.
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
Korona
Member
Member
Posts: 1000
Joined: Thu May 17, 2007 1:27 pm
Contact:

Post by Korona »

I do not think Linux uses a chipset driver to detect available memory. I guess Linux as well as Windows uses Int 0x15/ Function 0xE820 to detect memory (and then falls back to some other BIOS calls). There is no way to write a generic chipset driver that is able to detect every kind of memory that is present in the system.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Post by Brendan »

Hi,
einsteinjunior wrote:I wish to use USB on my OS and also directly probe the memory available in the system.But i don't want to go through the BIOS.
I know i can program the chipset registers for that.
How to proceed is the question.
The USB controller is the same as any other PCI card - use PCI configuration space to detect it, find/configure the resources it's using, etc. It's not "chipset specific" (even when there's USB controllers built into the chipset they behave exactly the same as a USB controller in a plug-in PCI card).

For memory detection, every chipset does it differently and it's impossible to detect RAM using chipset registers while your code is running from RAM because you need to severely mess with the RAM chips. The BIOS can do it because the BIOS is designed specifically for the chipset and runs from ROM.

Rather than using chipset registers for memory detection, you could manually probe for RAM (e.g. write a value at an address and read it back to see if it was stored). This is a highly dodgy method with many problems. For example, you can't tell the different between RAM and memory mapped I/O (e.g. video card display memory). It's also very slow - e.g. for a 3 GHz CPU with 4 GB of RAM it could take 16 seconds.

Lastly, detecting "present RAM" is mostly useless anyway - you need to detect "usable/free RAM". This is partly because the BIOS uses some RAM for other things, like SMM (System Management Mode) that the OS has no control over, and partly because the BIOS can put tables in RAM for the OS to use that your OS might want later.

Basically, if your OS can't use BIOS functions (or firmware) for memory detection then it has severe design flaws - fixing those design flaws makes a lot more sense than using any unreliable hack.


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
User avatar
einsteinjunior
Member
Member
Posts: 90
Joined: Tue Sep 11, 2007 6:42 am

Post by einsteinjunior »

I am primarily not interested in direct memory probing using chipset since i can do it using BIOS.What i really need is a chipset driver for USB.
Thanks.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Post by Brendan »

Hi,
einsteinjunior wrote:I am primarily not interested in direct memory probing using chipset since i can do it using BIOS.What i really need is a chipset driver for USB.
Hmm...

Are you sure you don't need a generic USB driver for PCI, or does it have to be for a specific chipset (e.g. a chipset with broken/dodgy USB hardware that doesn't follow standards)?


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
User avatar
AndrewAPrice
Member
Member
Posts: 2309
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Post by AndrewAPrice »

Are you sure what you're looking for isn't BIOS calls? (Still possibly in protected mode using v86 emulation).
My OS is Perception.
Crazed123
Member
Member
Posts: 248
Joined: Thu Oct 21, 2004 11:00 pm

Post by Crazed123 »

We're in OS Design and Theory right now? You know, the place without hardware-hacking newbies asking utterly underspecified questions?
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Post by Candy »

Let me fix that then. USB implementation is only barely theory or design, mostly... implementation...
Post Reply