Partially revert r219672. After r198295, kernel need to seed randomness as

soon as possible for stack protector.  However, dummy timecounter does not
have enough entropy and we don't need to sacrifice Pentium class and later.

Pointed out by:	Maxim Dounin (mdounin at mdounin dot ru)
This commit is contained in:
Jung-uk Kim 2011-03-15 21:45:10 +00:00
parent a8f8643e3a
commit 1f5cdd5a99
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=219679

View File

@ -69,10 +69,14 @@ void swi_vm(void *);
static __inline uint64_t
get_cyclecount(void)
{
#if defined(I486_CPU) || defined(KLD_MODULE)
struct bintime bt;
binuptime(&bt);
return ((uint64_t)bt.sec << 56 | bt.frac >> 8);
#else
return (rdtsc());
#endif
}
#endif