Page 1 of 1
accessing SMBIOS information.
Posted: Mon Mar 03, 2008 9:32 pm
by naiksidd_85
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.
Posted: Mon Mar 03, 2008 10:50 pm
by 01000101
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.
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");}
}
Pe@cE
Re: accessing SMBIOS information.
Posted: Tue Mar 04, 2008 3:24 am
by Brendan
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
Posted: Tue Mar 04, 2008 3:44 am
by naiksidd_85
true I will think in that manner It was just an Idea as I first need to detect what devices are present and where..
validating the devices is what i am thinking later on
Posted: Tue Mar 04, 2008 1:33 pm
by AlfaOmega08
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]