Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ Driver
Anyone who know this? I search the microsoft, It only explain briefly, I see that the windows 7 64bits driver needs a signature。what is that means?
Posted 5-May-11 17:29pm
Edited 5-May-11 18:01pm
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

The fundamental difference is the compiler used, and the size of an int - 32bits vs 64bits
 
64bit operating systems (win7, xp64) need 64bit drivers to access devices, similarly a 32bit OS needs 32bit drivers - they generally operate in kernel space, which is why they need to be native to the chip architecture
 
In the past, anyone could write a driver and bolt it into your system; drivers, though not hard to write, have very low-level access to the OS and hardware, and a poorly written one could cause chaos - so there are now a couple of safeguards
 
Code Signing - it's more difficult to install a driver that hasn't been digitally signed
 
Kernel Mode Signing - you must have a kernel mode driver signed by microsoft, after passing compliance
 
details here
 
http://msdn.microsoft.com/en-us/windows/hardware/gg487317[^]
  Permalink  
Comments
markfilan at 6-May-11 0:50am
   
if i have the source code of 32bits driver,what I have 2 do ,to make it to be a 64bits driver?recompile?or re write a different driver ,since the architectures are different。
barneyman at 6-May-11 0:54am
   
if it's a 'simple' driver that's not hitting hardware, a recompile would probably get you close - you'll also have to check that the change in INT size didn't alter anything too
 
If it's a hardware driver, you may have a lot more work to do
markfilan at 6-May-11 1:48am
   
thanks for help........
markfilan at 6-May-11 4:02am
   
the driver interact with hid driver which microsoft supplied ,so i think it should be easy。thanks again。
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

There is no big difference between 32-bit and 64-bit drivers. They are just for different CPU architectures, and the codes for different architectures are incompatible. Win32 applications can work on both 64-bit architectures (I64 (Itanium) and x86-64), but not drivers.
 
The drives are signed so it's possible to check up if they are authentic. This can help to understand the idea:
http://en.wikipedia.org/wiki/Digital_signature[^],
see also http://en.wikipedia.org/wiki/Asymmetric_key_algorithm[^].
 
For driver signing, see http://msdn.microsoft.com/en-us/library/ff549499(v=vs.85).aspx[^].
 
—SA
  Permalink  
Comments
markfilan at 6-May-11 3:00am
   
thanks a lot.
SAKryukov at 6-May-11 3:11am
   
You're welcome.
Will you formally accept this answer (green button)?
--SA
Kurt Degiorgio at 9-May-11 10:59am
   
Reason for 2: when it comes to developing drivers 64bit and 32 bit makes a huge difference Your 32 bit designed driver generally wont work if you just compile it with a 64 compiler (by wont work I mean it will crash the OS a lot) to name a few areas that give problems ptr sizes are different , structures are processed differently also the most problematic area is if the user space application you are communicating with is 32bit. (you can geuss what type of problems arise here)
SAKryukov at 9-May-11 21:14pm
   
You're absolutely right. Whatever you named is correct; and all of these items are not big difference. Not that we disagree in anything at all. You just voted with no point. You're unhappy with just a words "no big difference". This is just words. If you understand what is really important, you can see that changing the figure 32 to 64 change nothing but... this figure. Pointer sizes double, registers are replaced with 64-bit equivalents. That's all! If driver is written in C, the difference in code will be nearly invisible.
 
So, I have to repeat in case it is not clear: no big difference.
--SA
Kurt Degiorgio at 10-May-11 3:30am
   
Yes on paper you are right but my point is in reality you can not design a 32 bit driver and expect it too work on a 64bit machine by just "re-compiling it" it simply won't wont work. As such in a professional environment when developing driver if you are targeting 64bit platforms as well you will need to design your driver with this in mind. I can give you countless horror stories of 32bit designed drivers crashing on 64 bit machines. remember kernel mode programming is different from user mode programming since you have too deal with different IRQL levels and paged memory something which the OS abstracts at user mode.
(just my 2 cents)
SAKryukov at 10-May-11 13:27pm
   
OK, maybe you know better; and I simply do not understand these big differences. I know some kernel-mode programming, but I did it only in Assembly where you really cannot "recompile" but need to re-write almost every line. But I really don't understand how the size of registers and pointers can affect, say, IRQ levels. Let me put it this way: I'm mostly familiar with transition between 16-bit and 32-bit architectures. That was really a change that had very little to do with address size; but it was absolutely different architecture (depending on OS architecture though). So, when I said "not a big difference" in my answer, I referred to that situation. So our discussion is more of the cultural clash... :-)
--SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Just looking at your title, 32bits, 64bits refers the way that computer process data. In other words it define the architecture that memory address length, handling by the processor. If you have an old CPU you may have to use 32bit support OS, but for the newer once it should be 64bits versions. More importantly, having 64bit OS doesn't run all the application faster because they may be tested and optimized on 32bits OS. So you must choose the best accordingly.
 
I'm not sure what you have really means by signature. If you can please post the message so I can comment more on it. Anyway driver signatures are kind of certifications that vendors attache with it. Most of the time signatures are comes with commercial applications, which are NOT free of charge. There are some third party tools to disable those, but I don't like to discuss about them. It's not ethical at all.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 718
1 OriginalGriff 420
2 CPallini 385
3 George Jonsson 231
4 Richard Deeming 145
0 OriginalGriff 5,450
1 CPallini 4,500
2 Sergey Alexandrovich Kryukov 4,272
3 George Jonsson 3,057
4 Gihan Liyanage 2,445


Advertise | Privacy | Mobile
Web01 | 2.8.140916.1 | Last Updated 6 May 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100