Subject: Re: new MI/MD interface for rnd(4)
To: Colin Wood <cwood@ichips.intel.com>
From: Jason R Thorpe <thorpej@zembu.com>
List: tech-ports
Date: 06/06/2000 15:19:14
On Tue, Jun 06, 2000 at 02:13:12PM -0700, Colin Wood wrote:
> yes, RDTSC should return a 64-bit number. hopefully these new routines
> are picking the proper 32 bits as the upper 32 bits (in EDX) only change
> every few seconds. if bill is just trying to read some random value, then
i guess only using the lower 32 bits is fine. relying on only 32-bits as
What `rnd' should be doing then is reading the 64-bit cycle counter
and then making off the top 32-bits, i.e.:
rndval = cpu_counter() & 0xffffffffUL;
--
-- Jason R. Thorpe <thorpej@zembu.com>