rdrand failing on i7-4960x

rdrand failing on i7-4960x

I verified that it is supported on this chip by issuing CPUID, EAX=1, and find bit 30 set in ECX. However, when trying the loop below, RAX and CF are zeroed on first call and stay zero forever. I tried same code on an I7-4770K and it works fine, native and in a Hyper-V VM running on that system.

Does anyone know why this wouldn't work on the 4960x? Is something needed to kickstart the hardware rand generator?

thanks,

top: rdrand

       jnc top

       ret

 

 

6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Thanks, I have already seen that doc and there is not anything in it other than use CPUID to verify support(I already did that) and issue the command, checking CF afterwards.

It is a one-instruction process, not much to it, and I am sure my code is OK because it works on other processors.

 I am looking for someone that has experience with rdrand and access to, or experience with, i7-4960x.

thanks,

 

Maybe you should post your question on ISA forum.

Ed: When / if you find the answer, please post it. I, too, wish to use that command - it solves a pressing need.

There are many projects in Physics and Applied Mathematics where a good random generator is useful. However, I would hesitate using it for high security cryptographic jobs: Are the numbers really random?   Recall the time when code of PGP encryption was 'munitions' and 'not allowed for export', long before September 11th. How come NSA allowed the rdrand mnemonic?  When the System offers a good cryptographic solution to anyone (including every terrorist) for free, be wary.

@zalia64

You raised an interesting question.

Login to leave a comment.