Re: CONFIG_MIPS_UNCACHED

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Kevin D. Kissell" wrote:
> 
> > > > > Since the kernel cache attribute is never initialized before
> > > > > ld_mmu_{whatever} is invoked, and since that Config field
> > > > > does not have a well-defined reset state on many MIPS
> > > > > CPUs, it would appear that we are in effect trusting the
> > > > > bootloader to have done something reasonable like
> > > > > set kseg0 to be non-cachable or write-through, either
> > > > > of which would be safe for the current code.
> > > >
> > > > I think you just proposed a fix: check current config register
> > > > when we turn off cache.  Thanks. :-)
> > >
> > > That's a heuristic at best.  If the config register comes up random,
> > > it can appear to be sane even though the cache is in fact uninitialized.
> > >
> >
> > For any practical reasons, we can assume there is a loader for Linux,
> > and we can assume loader does not run with a random config register.
> 
> That's a position that would sound reasonable to someone working
> on Linux for legacy DEC/SGI systems, but not one that I would
> expect to satisfy someone working on embedded Linux.  It would
> need to be governed by a config option, but I would think
> that ultimately we need to have a Linux that can be ROMed
> and branched to directly from the reset vector.  Why force
> everyone doing an embedded MIPS/Linux widget to re-invent
> the wheel?
> 

The currenct common practice in embedded world is:

1. during development stage, using a loader to download kernel to target.

2. during productization stage, use a separate rom loader to cold-start the
board and load the kernel from flash to RAM, assuming the kernel is on flash.

There are a couple of other vairants, but generally you do have a first stage
loader that will set up the environment right for Linux kernel.

Cold-starting a board and loading a kernel is highly board and system
specific.  Does not seem to make sense to get included in the kernel
structure.

Jun


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux