News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

How to retrieve BIOS content ?

Started by Maser, January 21, 2007, 02:04:54 PM

Previous topic - Next topic

Maser

Hi every body

After couple of weeks research about how to retrieve BIOS content, Today I came to know that reading BIOS could be possible by SMBIOS.

I got useful code at http://cri.univ-mlv.fr/liam/downloads/liam-client-devel-win32-1.0.zip ,through available .exe file i could retrieve all the information of the system but unfortunately while trying to execute the source code I got so many problems.

I appreciate if u try above code at said location or give me another hint.

Thanks,

Maser.



 

MichaelW

Interesting source code, but I suspect unnecessarily complex for your needs. What sort of problems are you having?

BTW, a recent SMBIOS specification is available here:

http://www.dmtf.org/standards/smbios

eschew obfuscation

Maser

Quote from: MichaelW on January 21, 2007, 06:38:54 PM
Interesting source code, but I suspect unnecessarily complex for your needs. What sort of problems are you having?

BTW, a recent SMBIOS specification is available here:

http://www.dmtf.org/standards/smbios




Hi Michael W

In fact i would like to retrieve information of the system in detail, as follow:
1. Processor (No of Processors, Unique ID, speed, Family,Version, Manufacturer,Type)
2. Bios (Version, Release Date,Vender)
3. mother board (Unique ID, Manufacturer, Product Name ,Version)

4. No of Slots on MB
5. RAM (Type and its size)
6. Cache Memory size.

Unfortunately the source code which you have seen, does not include tow Include files ,they are SMBCOM.INC and WINDOWS.INC than I could not execute it.
among above items 2 and 3 are very important for me.
I do have another Idea that is writing a device driver for this purpose.

Please let me know if u hav got any idea.
tanx

Maser

sinsi

Looking at the SMBIOS specs, wouldn't using real-mode be easier? All of the info that you want is available either from
the SMBIOS tables or using CPUID, and Windows won't get in the way (and possibly give wrong info).

MichaelW - thanks for the link to the specs, once again you have given me priceless info... :U
Light travels faster than sound, that's why some people seem bright until you hear them.

MichaelW

SMBIOS.EXE is a 16-bit real-mode program. As far as I have been able to determine there are no 32-bit segments defined, and the only reference to protected-mode anything is in the DOSCALL0 macro in DOSCALL.INC, which is not called from any of the source files. The include files are more or less general purpose, and most of the included components are not referenced anywhere in the source. As far as I can tell both of the missing include files have something to do with a Windows-aware version running under Windows, not with a Win32 version.

http://www.google.com/search?hl=en&q=SMBCOM.INC

eschew obfuscation

Maser

hi every body
Today i got disappointed to get needed information from BIOS so i decided to get them from windows registry.
Is there any body to know how can I retrieve System info from registry with win32?

Maser

MichaelW

#6
The attachment is a proof of concept app that uses WinIo to access the SMBIOS structures. The code includes no safety/sanity checks, etc, and smbios.inc is just barely a start. The WinIo stuff is here.

Edit:

There is a mistake in the design of FindStructure that will limit it to finding the first structure of the specified type. The point of passing a start address was so the procedure could be used to find more than one structure of a specified type, because for some types there can be more than one instance of the structure.


[attachment deleted by admin]
eschew obfuscation

Mark_Larson

you can also look at the ACPI tables, which have the same type of information.  SMBIOS and DMI ( a similar spec) where mostly written for DOS programs, whereas ACPI was written to be used for Windows or Linux.  Matter of fact when ACPI is first accessed from Windows, the BIOS interrupts and does some stuff via SMI.  You can use any of the various specs ACPI, DMI, SMBIOS from Windows or DOS.  A system usually supports either SMBIOS or DMI but not both.  You can write a Win32 console program to access the stuff from Windows (I hate writing 16-bit programs, ewww). 

Dells support both SMBIOS and DMI.  Initially we only supported SMBIOS.  We had to add support for DMI after a big customer ( millions of systems) requested it.  The sales guy had a month to give me the request, but he waited until two days before it was do to tell me he needed it.  I had to add the entire DMI spec, plus testing it in 2 days.  I worked 32 hours in 2 days and got it done.  The customer tested it with a test app they had written that was thorough.  No bugs! go me ;)

I also added more detail in how to do it from DOS in this thread of yours:
http://www.masm32.com/board/index.php?topic=6550.0
BIOS programmers do it fastest, hehe.  ;)

My Optimization webpage
htttp://www.website.masmforum.com/mark/index.htm