Hi all,
I think I have troubled you all for detecting keyboard already .
I was now thinking of getting information of the devices directly from SMBIOS
(i hope it can be done).
according to me instead of detecting the devices one by one if i can read the values from structure I can be sure of what devices have come up.
I am still reading the specs provided by DMTF.
I was wondering if some one has worked on it.
also i need suggestions from you guys if this is the good idea.
accessing SMBIOS information.
- naiksidd_85
- Member
- Posts: 76
- Joined: Thu Jan 17, 2008 1:15 am
accessing SMBIOS information.
Learning a lot these days THANKS to OSdev users
I think its a good idea to parse the MP tables as they have very valuble info and ways to wake up other processors through finding the APICs.
heres a snippet from one of my experimental kernels. it detects the _MP_ signature from the multiple possible locations, and then from there you can parse the various tables yourself.
Pe@cE
heres a snippet from one of my experimental kernels. it detects the _MP_ signature from the multiple possible locations, and then from there you can parse the various tables yourself.
Code: Select all
void Find_MP_FPS()
{
unsigned long i;
for(i = 0x9FC00; i < 0xA0000; i++)
{
if(*(unsigned long *)i == 0x5F504D5F)
{
printf("MP_FPS Located @ 0x%X (BIOS ROM) \n", i);
MP_FPS_BASE = i;
}
}
for(i = 0xF0000; i < 0x100000; i++)
{
if(*(unsigned long *)i == 0x5F504D5F)
{
printf("MP_FPS Located @ 0x%X (EBDA) \n", i);
MP_FPS_BASE = i;
}
}
if(MP_FPS_BASE){Parse_MP_FPS();}
else{printf("_MP_ Signature not found! \n");}
}
Website: https://joscor.com
Re: accessing SMBIOS information.
Hi,
A hammer is designed for hitting things, and a screwdriver is designed for doing up screws. You wouldn't use a hammer to do up screws, and you wouldn't use a screwdriver to hit things.
SMBIOS is designed for hardware maintenance purposes - e.g. creating a catalogue of hardware on your LAN so you can keep track of it all for spare parts, upgrades, insurance, etc. ACPI, MPS, PCI, PnP, etc are designed for software to use for hardware detection and configuration. I wouldn't use SMBIOS for hardware detection and configuration, and I wouldn't use ACPI, MPS, PCI, PnP, etc for hardware maintenance purposes.
For a simple example, SMBIOS might tell you there's 2 RAM slots that both contain 32 MB of 72-pin EDO plus 2 empty RAM slots. ACPI (actually Int 0x15, eax = 0xE820) will tell you which areas of the physical address space are *usable* RAM. The OS cares which areas are usable RAM, but doesn't care what type it is or how many RAM slots it's in. Of course if you were upgrading the computers on your LAN, you won't care which areas of the physical address space are usable RAM, but you will care about how many empty RAM slots there are and what type of RAM you'd need.
Cheers,
Brendan
A hammer is designed for hitting things, and a screwdriver is designed for doing up screws. You wouldn't use a hammer to do up screws, and you wouldn't use a screwdriver to hit things.
SMBIOS is designed for hardware maintenance purposes - e.g. creating a catalogue of hardware on your LAN so you can keep track of it all for spare parts, upgrades, insurance, etc. ACPI, MPS, PCI, PnP, etc are designed for software to use for hardware detection and configuration. I wouldn't use SMBIOS for hardware detection and configuration, and I wouldn't use ACPI, MPS, PCI, PnP, etc for hardware maintenance purposes.
For a simple example, SMBIOS might tell you there's 2 RAM slots that both contain 32 MB of 72-pin EDO plus 2 empty RAM slots. ACPI (actually Int 0x15, eax = 0xE820) will tell you which areas of the physical address space are *usable* RAM. The OS cares which areas are usable RAM, but doesn't care what type it is or how many RAM slots it's in. Of course if you were upgrading the computers on your LAN, you won't care which areas of the physical address space are usable RAM, but you will care about how many empty RAM slots there are and what type of RAM you'd need.
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.
- naiksidd_85
- Member
- Posts: 76
- Joined: Thu Jan 17, 2008 1:15 am
- AlfaOmega08
- Member
- Posts: 226
- Joined: Wed Nov 07, 2007 12:15 pm
- Location: Italy
I'm working on SMBIOS in this days, I find it useful to detect hardware.
If you need to start a driver, you can look for the device you have to use in SMBIOS, and the use the correct driver, can't you?
EDIT: I'm also writing a page on the wiki about SMBIOS. Can I ask someone to correct my bad english and check that I'm not writing bad things?[/url]
If you need to start a driver, you can look for the device you have to use in SMBIOS, and the use the correct driver, can't you?
EDIT: I'm also writing a page on the wiki about SMBIOS. Can I ask someone to correct my bad english and check that I'm not writing bad things?[/url]