accessing SMBIOS information.

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
naiksidd_85
Member
Member
Posts: 76
Joined: Thu Jan 17, 2008 1:15 am

accessing SMBIOS information.

Post 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.
Learning a lot these days THANKS to OSdev users
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Post 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
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: accessing SMBIOS information.

Post 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
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
naiksidd_85
Member
Member
Posts: 76
Joined: Thu Jan 17, 2008 1:15 am

Post 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
Learning a lot these days THANKS to OSdev users
User avatar
AlfaOmega08
Member
Member
Posts: 226
Joined: Wed Nov 07, 2007 12:15 pm
Location: Italy

Post 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]
Post Reply