News:

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

Computer Make and Model identifier

Started by Shooter, March 20, 2011, 02:33:05 PM

Previous topic - Next topic

Shooter

Edgar,
Correction... the set of computers it seemed not to work on WERE the new computers. I got "INTEL_" as the caption, and "D945GLF2", neither of which is very helpful considering I can't seem to find anything anywhere what "D945GLF2" means. Outside of that, it's a great tiny program.  :clap:

-Shooter
Never use direct references to anything ever. Bury everything in
macros. Bury the macros in include files. Reference those include
files indirectly from other include files. Use macros to reference
those include files.

donkey

Intel D945GLF2 is the computers model number, should be on the back of the box, if not then its a custom build and they never updated the mobo's SMBIOS. In the end it would be the same as an Intel D945GLF2:

http://browse.geekbench.ca/geekbench2/view/91733
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

Shooter

Quote from: donkey on March 22, 2011, 10:25:28 PM
Intel D945GLF2 is the computers model number, should be on the back of the box, if not then its a custom build and they never updated the mobo's SMBIOS. In the end it would be the same as an Intel D945GLF2:

http://browse.geekbench.ca/geekbench2/view/91733

How did you find that? I used several different search engines and not one of them came back with squat. However, that page doesn't say that it's a Dell computer, or even what model, but it's still cool that you found something on it.
Never use direct references to anything ever. Bury everything in
macros. Bury the macros in include files. Reference those include
files indirectly from other include files. Use macros to reference
those include files.

donkey

Quote from: Shooter on March 22, 2011, 10:38:33 PM
How did you find that? I used several different search engines and not one of them came back with squat.

http://www.google.ca/search?q=Intel+D945GLF2

1,700 results
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

donkey

There is an alternate way that at least under Win7 appears to work.

invoke GetSystemFirmwareTable,0x52534D42,0,0,0 // Setting buffer and size to zero returns the bytes needed
// Round up to 1K boundary
add rax,1023
and rax,-1024
mov rbx,rax
invoke GlobalAlloc,GMEM_FIXED,rbx
mov [pSMB_Buffer],rax

invoke GetSystemFirmwareTable,0x52534D42,0,[pSMB_Buffer],ebx


This is what I've figured out so far (mostly guesses)

0059CA38:  00 02 05 25-E8 05 00 00-00 18 00 00-01 02 00 E0   ...%è..........à
0059CA48:  03 1F 90 9E-CB 7F 00 00-00 00 33 07-01 00 FF FF   ..?žË....3...ÿÿ
0059CA58:  44 65 6C 6C-20 49 6E 63-2E 00 31 2E-30 2E 31 31   Dell Inc..1.0.11
0059CA68:  00 30 31 2F-33 31 2F 32-30 30 38 00-00 01 1B 01   .01/31/2008.....
0059CA78:  00 01 02 03-04 44 45 4C-4C 44 00 10-46 80 35 B8   .....DELLD..F€5¸
0059CA88:  C0 4F 59 46-31 06 05 06-44 65 6C 6C-20 49 6E 63   ÀOYF1...Dell Inc


Byte 1 = 0 ???
Byte 2&3 = SMBIOS 2.5
Byte 4 = ??? DMI revision (according to docs)
dword = Size of data
Byte 9 = 0 ???
Byte 10 = offset to start of data starting from Byte 9


That would put the first field at the string "Dell Inc." which is the first in the spec followed by BIOS revision and release date.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

Shooter

Quote from: donkey on March 22, 2011, 11:18:52 PM
http://www.google.ca/search?q=Intel+D945GLF2

1,700 results

I only googled the "D945GLF2" and it didn't come up with anything before, but with the "INTEL_" I got about 1700 hits. Strange.
Never use direct references to anything ever. Bury everything in
macros. Bury the macros in include files. Reference those include
files indirectly from other include files. Use macros to reference
those include files.

Shooter

Quote from: donkey on March 23, 2011, 12:43:00 AM
There is an alternate way that at least under Win7 appears to work.

invoke GetSystemFirmwareTable,0x52534D42,0,0,0 // Setting buffer and size to zero returns the bytes needed
// Round up to 1K boundary
add rax,1023
and rax,-1024
mov rbx,rax
invoke GlobalAlloc,GMEM_FIXED,rbx
mov [pSMB_Buffer],rax

invoke GetSystemFirmwareTable,0x52534D42,0,[pSMB_Buffer],ebx


This is what I've figured out so far (mostly guesses)

0059CA38:  00 02 05 25-E8 05 00 00-00 18 00 00-01 02 00 E0   ...%è..........à
0059CA48:  03 1F 90 9E-CB 7F 00 00-00 00 33 07-01 00 FF FF   ..?žË....3...ÿÿ
0059CA58:  44 65 6C 6C-20 49 6E 63-2E 00 31 2E-30 2E 31 31   Dell Inc..1.0.11
0059CA68:  00 30 31 2F-33 31 2F 32-30 30 38 00-00 01 1B 01   .01/31/2008.....
0059CA78:  00 01 02 03-04 44 45 4C-4C 44 00 10-46 80 35 B8   .....DELLD..F€5¸
0059CA88:  C0 4F 59 46-31 06 05 06-44 65 6C 6C-20 49 6E 63   ÀOYF1...Dell Inc


Byte 1 = 0 ???
Byte 2&3 = SMBIOS 2.5
Byte 4 = ??? DMI revision (according to docs)
dword = Size of data
Byte 9 = 0 ???
Byte 10 = offset to start of data starting from Byte 9


That would put the first field at the string "Dell Inc." which is the first in the spec followed by BIOS revision and release date.


I was wondering if I could 'peek' into the BIOS and read it that way, but I wasn't sure A) If that was always possible, and B) If every computer placed the mfg data in the exact same location.
Never use direct references to anything ever. Bury everything in
macros. Bury the macros in include files. Reference those include
files indirectly from other include files. Use macros to reference
those include files.

donkey

Quote from: Shooter on March 23, 2011, 01:06:44 AM
I was wondering if I could 'peek' into the BIOS and read it that way, but I wasn't sure A) If that was always possible, and B) If every computer placed the mfg data in the exact same location.

A) As you can see yes, you can, though the header is altered the data is consistent with the raw SMBIOS data
B) Yes, the structure of the SMBIOS has to be the same, otherwise the OS vendors would have to write thousands of special case handlers. However the structure contains inline variable length string data so its not just a simple offset, you have to parse the data to find what you want.. The white papers for the standards are found at http://dmtf.org/standards/smbios
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

MichaelW

The attachment contains what I have. Note that the EXE will not work under Windows XP, or probably any later version. To run the EXE under Windows 2000 you will need WinIo.dll and WinIo.sys, available from the Internals web site, link in the post here:

http://www.masm32.com/board/index.php?topic=3894.0

eschew obfuscation

lingo

"Since my program is dependent on the model I guess I'm gonna have to go the long route.  I've never dealt directly with a class like that before, so I guess I might be callin' on some help in the future on this one, particularly in converting it to MASM code." by Shooter

Shooter,
I rewrote it in MASM and now it is easier to use... :wink
Pls, download and use WMI Code Creator v1.0 too, from link...

Shooter

Quote from: lingo on March 26, 2011, 07:02:59 PM
I rewrote it in MASM and now it is easier to use... :wink
Pls, download and use WMI Code Creator v1.0 too, from link...

Lingo,
I'm a little confused... are you saying that your code will convert the WMI Code Creator v1.0's output to MASM, or did I misunderstand something there?

-Shooter

(By the way, NICE little program there, the WMI Code Creator.)
Never use direct references to anything ever. Bury everything in
macros. Bury the macros in include files. Reference those include
files indirectly from other include files. Use macros to reference
those include files.

donkey

#41
Quote from: Shooter on March 27, 2011, 01:40:17 PM
Lingo,
I'm a little confused... are you saying that your code will convert the WMI Code Creator v1.0's output to MASM, or did I misunderstand something there?

-Shooter

You use the Code Creator to get the sever name and namespace then copy and paste them into his source and re-assemble, it does not convert any code, that much is evident in the source he attached.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable