Log in

View Full Version : Getting hardware infos about the local computer


SynApsus
March 7th, 2004, 05:54
Hello guys. This is my first thread here and I hope you will be able to answer me, I thank you in advance... ( sorry for my crap english I'm young and french )
That makes some time I code drivers, and I want now to identify the computer on which it is installed.
I found the BIOS int 11, which returns in AX a lot of info about the system. It would be perfect, but I don't know how to run a BIOS interrupt with my driver : it always crashes. I have probably forgotten something...
Or if you could help me by giving a method to identify the motherboard, for example, it would be great.
Thanks, with regards,
Syn[NGEN]

dELTA
March 7th, 2004, 08:33
What kind of driver are you writing? VXD, WDM, DOS? How does your current code snippet to call the interrupts look? Always try to give as much details as possible to increase the probability of getting help.

SynApsus
March 7th, 2004, 11:57
I am writing a WDM.
I tried to run my interruption with 3 methods, but no one functions.
First, a direct call to the int 11. ( --> reboot )
Second, I had put cli ant sti instructions before & after the int 11 ( ---> reboot )
Third time, I tried to call Hal!HalEnableSystemInterrupt() undocumented function. It fails, and the reboot follows...
Is there a protection in the eflags register ? in the control registers ?
Dunno at the moment, even after a little reading of the Intel's software developer manual.
If you have a beginning of answer ...

Kayaker
March 7th, 2004, 15:25
Hi

What information are you trying to retrieve exactly? Much can be found out about the basic system architecture from regular Win32 APIs such as GetSystemInfo, or from using NtQuerySystemInformation with the SystemProcessorInformation class (or ZwQuerySystemInformation if you want to do it from within your driver).

Other info could probably be found out from the Registry itself. If you need a way to find a certain bit of info that the System Properties control panel app displays for example, try disassembling sysdm.cpl and see if you can isolate how it does it. (Likely we're back to accessing the Registry and using NtQuerySystemInformation plus a few assorted other APIs).

With a little more info about what you want, I'm sure a solution is at hand.

Kayaker

SynApsus
March 7th, 2004, 15:52
I want to retrieve some info, which identifies a computer and only one; this info has to stay the same even if the processor is changed.
Of course if I wanted to have only info about the processor I had used cpuid or GetSystemInfo...
But the aim is different, I want to have very "hard" information like, dunno, the version number of the CMOS for example
Ant NtQuerySystemInfo doesn't return any value interesting to do this.
I know a lot of these values are in the registry, but I prefer ( for protection reasons, and to be sure ) get this info without it : too simple to add or delete registry info and to cheat with it. Am I clear now ?
I want to know, in priority, if it is possible to run a BIOS interruption in my device driver. It's a difficult question, I suppose it is simply because we are not anymore in real mode, but there is the moment to find a way to bypass it And I hope somebody knows how to help me !

Opcode
March 7th, 2004, 17:36
Quote:
[Originally Posted by SynApsus]
I want to know, in priority, if it is possible to run a BIOS interruption in my device driver. It's a difficult question, I suppose it is simply because we are not anymore in real mode, but there is the moment to find a way to bypass it And I hope somebody knows how to help me !

No, I donīt believe that its possible to use BIOS interrupts in to protected-mode using WDM programming.
Using SoftICE, you will see that all interrupts are redirected to ntoskrnl.exe.
Disassembly this file and you will don't see any call to BIOS, neither in to the HAL.
You will need to direct programming in hardware, the only complete book
that I recommend to you is:
"The indispensable PC hardware book" of Hans-Peter Messmer.
You don't need BIOS to get what you want !

Regards,
Opcode

Opcode
March 7th, 2004, 17:41
Use the "The Operating Systems Resource Center".
It's very useful.
At www.nondot.org/sabre/os/articles.

disavowed
March 7th, 2004, 17:58
Quote:
[Originally Posted by SynApsus]I want to have very "hard" information like, dunno, the version number of the CMOS for example
what about when people update their cmos? their system is still the same, but this version number would change

SynApsus
March 8th, 2004, 16:58
Thanks fo r your answers to all. And for disavowed, I'll answer no problem : if I sell a program, in this case I'll send a new key, that's all. Updating the CMOS is a lot more rare than changing the CPU...

disavowed
March 8th, 2004, 17:39
uh oh.. if i've updated my cmos more than i've updated my cpu, does that make me weird?

Woodmann
March 8th, 2004, 18:40
Quote:
uh oh.. if i've updated my cmos more than i've updated my cpu, does that make me weird?


No your not weird, I update my CPU every week

-cbo-

evlncrn8
March 8th, 2004, 19:02
Quote:
[Originally Posted by Woodmann]No your not weird, I update my CPU every week

-cbo-



aha, that'd be round about the same time you update the site then too? ;pp

SynApsus
March 10th, 2004, 14:02
hmm... no one of you appears to be able to help me... I'll one more time have to find the solution by myself.
I'm sure it IS possible, just because under NT when I compile .com executables, I can call this int 11h without any problem ...
Thank you anyway.

Syn- Following his lonely way

and a note for disavowed : yes it does make you weird