[Alug] Kernel Dumping garbage to Port 80h
wayne.stallwood at btinternet.com
Mon Sep 23 01:08:01 BST 2002
How about rather than getting the cpu_khz from the system map, using the
Bogomips value, Isn't the kernel already aware of this (I thought it used
bogomips for some other timing)
But I may give your suggestion a go anyway
On Sunday 22 September 2002 23:09, Paul wrote:
> Hi Wayne
> Another alternative to generating a delay of a fixed period would be to use
> the 8254 or the APIC timer - Neither is a portable solution, and both
> liable to lcoking up the system if you are not carefull. On balance,
> perhaps dummy IO writes is the easiest method...
> On the other hand, a software loop might avoid any IO conflicts..
> extern unsigned long cpu_khz; /* clock frequency exported by the kernel */
> /* grep /boot/System.map for it - It should be there for 2.4.x kernels. */
> for (t=0; t<(time_delay/cpu_khz; t++) ;
> Regards, Paul.
> On Sunday 22 Sep 2002 9:15 pm, Wayne Stallwood wrote:
> > I thought that a sleep call would be the obvious solution, but I keep
> > thinking that there is a reason Linus didn't do this, I was put off the
> > dummy jumps as Linus infers that this causes a problem on faster
> > machines, given that this was written at a time when a P500 was a fast
> > machine and I am sitting on a 1Ghz Athlon I think there may be some issue
> > with doing this.
> main at lists.alug.org.uk
> Unsubscribe? See message headers or the web site above!
More information about the main