Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Oct 1996 22:35:17 +0200
From:      Mark Murray <mark@grondar.za>
To:        Soren Schmidt <sos@freefall.freebsd.org>
Cc:        CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-sys@freefall.freebsd.org
Subject:   Re: cvs commit: src/sys/i386/isa syscons.c 
Message-ID:  <199610262035.WAA13468@grumble.grondar.za>

next in thread | raw e-mail | index | archive | help
Soren Schmidt wrote:
>   Fixed side effects from calling add_keyboard_randomness() in the console
>   getc routine by not calling it.  add_keyboard_randomness() currently
>   always reenables interrupts on 386's and 486's.  This is very bad if the
>   console getc routine is called from the debugger and the debugger was
>   entered with interrupts disabled.

add_keyboard_randomness() calls add_timer_randomness(), which does this:

		disable_intr();
                outb(TIMER_MODE, TIMER_SEL0 | TIMER_LATCH);
                num ^= inb(TIMER_CNTR0) << 16;
                num ^= inb(TIMER_CNTR0) << 24;
                enable_intr();

If this was changed to not disable/enable the interrupts, would it cause
any trouble? I don't mind getting funny numbers out of the counter, that
just adds to entropy, but causing the counter device to misbehave would be
a bad thing.

If this was fixed, could this be added back to syscons?

M
--
Mark Murray
46 Harvey Rd, Claremont, Cape Town 7700, South Africa
+27 21 61-3768 GMT+0200
Finger mark@grondar.za for PGP key



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610262035.WAA13468>