Reputation: 27021
After reading some stuff it seems I can map the SMBIOS memory and parse it. I have no idea on how to go about this. I can't use any managed code as I would like this to be compilable under any OS.
Does anyone have any code examples how to go about this?
Upvotes: 3
Views: 6596
Reputation: 349
if you can run DOS programs (e.g. 32-bit Windows) it is mapped to f000:f000 Otherwise, you would need to figure out a way to map it yourself or find an API to help you (as suggested in previous posts).
Upvotes: 0
Reputation: 8178
I wrote a reusable class to read all the SMBIOS stuff.
It is very clean code with a proper error handling and easy to extend. You can derive a class from this class that uses the parsed data to display it or do whatever you want with it.
You find also a link to the actual SMBios documentation in the code's comments.
You can download it from my homepage: ftp://ftp.netcult.ch/mirror/elmue/SMBiosClass.zip
Elmue
Upvotes: 1
Reputation: 116325
For Linux I guess you should have a look at the dmidecode source (GPL) for concrete code...
Using and parsing dmidecode output may be all you need...
Upvotes: 2
Reputation: 55445
On most systems, it is not mapped into user-mode accessible memory, so you need to call some system API.
On Windows, you can call GetSystemFirmwareTable.
Upvotes: 9