System Management BIOS: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
Frank (talk | contribs)
m System Managenent BIOS moved to System Management BIOS: Spelling Error in title
Frank (talk | contribs)
Some grammer fixes and some rewording
Line 1:
System Management [[BIOS]] (SMBIOS) is a standard developed by [http://dmft.org DMFT].
ThisThe standardpurpose consistof inthis givestandard informationsis aboutto allow the operating system to retrieve information about the OSPC.
 
On booting, the SMBIOS, putswill put a table somewhere in the memory. By readingparsing this table weit canis knowpossible allto theaccess componentinformation ofabout the computer, your OS isand runningits oncapabilities.
 
== Locating the SMBIOS Entry Point Table ==
The SMBIOS Entry Point Table is somewhere between the addresses 0xF0000 and 0xFFFFF. You can find it by looking for the string "_SM_" in that piece of memory.
 
The SMBIOS Entry Point Table is located somewhere between the addresses 0xF0000 and 0xFFFFF. You canTo find itthe byspecific lookinglocation forof the stringstart "_SM_"of the table it is necessary to insearch that pieceregion of memory for the string "_SM_".
I use this:
 
One example of how this can be done is demonstrated in the below code.
char *mem = (char *) 0xF0000;
while ((Bit32u) mem < 0x100000) {
Line 21 ⟶ 23:
}
 
To== readParsing the Entry Point Table, I use a structure like this:==
 
The entry point table has the following structure
struct SMBIOSEntryPoint {
char EntryPointString[4]; //This is _SM_
Line 39 ⟶ 43:
};
 
TableAddress contains the address of the Tabletable wichthat containcontains all the structures with the infosinformation ofabout the pcPC.
FromAll of the structures are located from [TableAddress] to [TableAddress + TableLength], there are all data.
The structures are located directly adjacent to each other in memory, with a new structure beginning as soon as another one ends.
At the end of one structure, another starts.
Each structure is composed of a header, a structure specific table, and a string table.
 
The header is:
The format of the header is as follows.
struct SMBIOSHeader {
uchar Type;
Line 50 ⟶ 55:
};
 
SoLocated at TableAddress you findis a SMBIOSHeaderSMBIOS Structheader.
The value of Type indicates wichwhat element arethe structure contains youinformation seeingabout. (0 = BIOS, 1 = System, 2 = Chassis, 3 = Processors, ...)
Length indicates the size of header + data table. The strings are not included in the countlength.
 
AtImmediately after the end of the header, you can findis the data table. At the end of thatthe data table (Address + Length), the strings section starts. Each string is NULL terminated and is limited ofto 64 characters.
 
eg: the BIOS Struct (Type 0) is like this:
Line 75 ⟶ 80:
db 0 ; End of structure
 
At the end of the biosBIOS table, another table will start.
The last structure has type 127.