public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Where to call L2 cache enabling code from?
@ 2006-04-14 15:05 Steve Snyder
  2006-04-14 15:46 ` Alan Cox
  0 siblings, 1 reply; 5+ messages in thread
From: Steve Snyder @ 2006-04-14 15:05 UTC (permalink / raw)
  To: Linux Kernel Mailing List

I have a machine in which the BIOS does not enable the Pentium3's L2 cache 
at boot time.  At what point in the kernel init process can/should I call 
the code to enable the cache?

Thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Where to call L2 cache enabling code from?
  2006-04-14 15:05 Where to call L2 cache enabling code from? Steve Snyder
@ 2006-04-14 15:46 ` Alan Cox
  2006-04-14 16:49   ` Steve Snyder
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Cox @ 2006-04-14 15:46 UTC (permalink / raw)
  To: Steve Snyder; +Cc: Linux Kernel Mailing List

On Gwe, 2006-04-14 at 11:05 -0400, Steve Snyder wrote:
> I have a machine in which the BIOS does not enable the Pentium3's L2 cache 
> at boot time.  At what point in the kernel init process can/should I call 
> the code to enable the cache?

What part of the cache setup is not done correctly ? The mtrr registers
or other things ?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Where to call L2 cache enabling code from?
  2006-04-14 15:46 ` Alan Cox
@ 2006-04-14 16:49   ` Steve Snyder
  2006-04-14 17:00     ` Dave Jones
  0 siblings, 1 reply; 5+ messages in thread
From: Steve Snyder @ 2006-04-14 16:49 UTC (permalink / raw)
  To: Alan Cox; +Cc: Linux Kernel Mailing List

On Friday 14 April 2006 11:46 am, Alan Cox wrote:
> On Gwe, 2006-04-14 at 11:05 -0400, Steve Snyder wrote:
> > I have a machine in which the BIOS does not enable the Pentium3's L2
> > cache at boot time.  At what point in the kernel init process
> > can/should I call the code to enable the cache?
>
> What part of the cache setup is not done correctly ? The mtrr registers
> or other things ?

It's not that the kernel is failing in any respect.  The BIOS simply does 
not enable the on-CPU L2 cache at power-on.  (The machine originally 
shipped with a Pentium2, and doesn't know how to enable the L2 cache on 
the Pentium3 that is now running in it.)

I've got a small device driver that enables the L2 cache.  It works fine 
when build as a module and loaded after booting has completed.  My goal 
is to move the code into the kernel so that it is run early in the kernel 
init process.  I expect that having the L2 cache go from "0KB" to 256KB 
will improve boot time greatly, as well as informing the kernel from the 
get-go of the true capabilities of this processor.

Getting the code into the kernel image is a no-brainer.  But once it is 
built into the kernel, at what point should I call it?

Thanks for the response.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Where to call L2 cache enabling code from?
  2006-04-14 16:49   ` Steve Snyder
@ 2006-04-14 17:00     ` Dave Jones
  2006-04-14 17:08       ` Zan Lynx
  0 siblings, 1 reply; 5+ messages in thread
From: Dave Jones @ 2006-04-14 17:00 UTC (permalink / raw)
  To: Steve Snyder; +Cc: Alan Cox, Linux Kernel Mailing List

On Fri, Apr 14, 2006 at 12:49:49PM -0400, Steve Snyder wrote:
 > On Friday 14 April 2006 11:46 am, Alan Cox wrote:
 > > On Gwe, 2006-04-14 at 11:05 -0400, Steve Snyder wrote:
 > > > I have a machine in which the BIOS does not enable the Pentium3's L2
 > > > cache at boot time.  At what point in the kernel init process
 > > > can/should I call the code to enable the cache?
 > >
 > > What part of the cache setup is not done correctly ? The mtrr registers
 > > or other things ?
 > 
 > It's not that the kernel is failing in any respect.  The BIOS simply does 
 > not enable the on-CPU L2 cache at power-on.  (The machine originally 
 > shipped with a Pentium2, and doesn't know how to enable the L2 cache on 
 > the Pentium3 that is now running in it.)
 > 
 > I've got a small device driver that enables the L2 cache.  It works fine 
 > when build as a module and loaded after booting has completed.  My goal 
 > is to move the code into the kernel so that it is run early in the kernel 
 > init process.  I expect that having the L2 cache go from "0KB" to 256KB 
 > will improve boot time greatly, as well as informing the kernel from the 
 > get-go of the true capabilities of this processor.
 > 
 > Getting the code into the kernel image is a no-brainer.  But once it is 
 > built into the kernel, at what point should I call it?

arch/i386/kernel/cpu/intel.c has a bunch of workarounds for various
issues.  Is there a valid use-case for ever booting with cache disabled
though? If so, this should probably be a boot-time option to enable it.

		Dave

-- 
http://www.codemonkey.org.uk

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Where to call L2 cache enabling code from?
  2006-04-14 17:00     ` Dave Jones
@ 2006-04-14 17:08       ` Zan Lynx
  0 siblings, 0 replies; 5+ messages in thread
From: Zan Lynx @ 2006-04-14 17:08 UTC (permalink / raw)
  To: Dave Jones; +Cc: Steve Snyder, Alan Cox, Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 490 bytes --]

On Fri, 2006-04-14 at 12:00 -0500, Dave Jones wrote:
[snip]
> arch/i386/kernel/cpu/intel.c has a bunch of workarounds for various
> issues.  Is there a valid use-case for ever booting with cache disabled
> though? If so, this should probably be a boot-time option to enable it.

Yes, disabling the cache is useful to debug bad hardware.  If the CPU
cache is bad, then disabling it might make things work again and you
know what needs to be replaced.
-- 
Zan Lynx <zlynx@acm.org>

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-04-14 17:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-14 15:05 Where to call L2 cache enabling code from? Steve Snyder
2006-04-14 15:46 ` Alan Cox
2006-04-14 16:49   ` Steve Snyder
2006-04-14 17:00     ` Dave Jones
2006-04-14 17:08       ` Zan Lynx

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox