Chipsets
- einsteinjunior
- Member
- Posts: 90
- Joined: Tue Sep 11, 2007 6:42 am
Chipsets
Hi out there.
Does anyone out there know how programming of a chipset is done?
Thanks.
Does anyone out there know how programming of a chipset is done?
Thanks.
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
- einsteinjunior
- Member
- Posts: 90
- Joined: Tue Sep 11, 2007 6:42 am
- einsteinjunior
- Member
- Posts: 90
- Joined: Tue Sep 11, 2007 6:42 am
einstein shame on you direct probing is very hazardous for you system. Hence the int $15/$E820 function in the BIOS which is very reliable BTW.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.
Author of COBOS
- einsteinjunior
- Member
- Posts: 90
- Joined: Tue Sep 11, 2007 6:42 am
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
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
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.
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.
Hi,
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
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).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.
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.
- einsteinjunior
- Member
- Posts: 90
- Joined: Tue Sep 11, 2007 6:42 am
Hi,
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
Hmm...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.
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.
- AndrewAPrice
- Member
- Posts: 2309
- Joined: Mon Jun 05, 2006 11:00 pm
- Location: USA (and Australia)
Are you sure what you're looking for isn't BIOS calls? (Still possibly in protected mode using v86 emulation).
My OS is Perception.