Port-arm archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: TS 7200 kernel image size
On May 5, 2009, at 2:06 AM, Lloyd Parkes wrote:
I$ seems to be on, although it sure feels like it's off when using a
gzimg. Maybe the RedBoot go command switches it off (unlikely), or
the gzimg switches it off so that it doesn't have to manage it (more
likely)?
One might say that I was taking the easy way out when I wrote gzboot.
See sys/arch/evbarm/stand/gzboot/srtbegin.S:
ENTRY(start)
/*
* We assume we've been loaded VA==PA, or that the MMU
* is disabled. Make sure the MMU is disabled so that
* we don't have to care about the caches.
*/
mrc p15, 0, r2, c1, c0, 0
bic r2, r2, #CPU_CONTROL_MMU_ENABLE
mcr p15, 0, r2, c1, c0, 0
nop
nop
nop
Of course, if the MMU is off, you don't get caches on < ARMv6 (and I
don't know about ARMv6 because I've never done any low-level work on
one) because they're all virtually-indexed, etc.
gzboot relocates itself out of flash and into RAM (well, this is
configurable in the Makefile/ldscript per board), so you could always
add a board-specific setup hook that mapped RAM VA==PA and turned on
the MMU, I$, and D$. That would probably provide a ... monumental
speed-up.
OF course, before jumping into the kernel, you'd want to flush /
disable the caches and MMU in another board-specific hook.
This means that you'd have to add processor-specific routines to
evbarm/stand for managing the cache, but that probably wouldn't be
that big of a deal.
Cheers,
Lloyd
-- thorpej
Home |
Main Index |
Thread Index |
Old Index