CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2010/06/29 15:33:54
Modified files:
sys/arch/sparc/stand: Makefile.inc
sys/arch/sparc/stand/boot: Makefile boot.c
sys/arch/sparc/stand/bootxx: bootxx.c
sys/arch/sparc/stand/common: dvma.c promdev.c promdev.h srt0.S
version.c
sys/arch/sparc/stand/libsa: Makefile
Added files:
sys/arch/sparc/include: loadfile_machdep.h
sys/arch/sparc/stand/boot: loadfile_sparc.c
sys/arch/sparc/stand/common: mmu.c
Removed files:
sys/arch/sparc/stand/boot: loadfile.c
Log message:
In the boot blocks, stop assuming we have a 1:1 mapping of low physical
memory, but instead gather memory layout information and work with the MMU
(or the PROM) to make sure we can actually load the kernel image in a proper
contiguous physical memory area.
In order to do this, we look at the kernel image twice; during the first pass,
the kernel footprint is computed, and then after making sure it can be
loaded, the second pass loads the actual image.
Since such a logic doesn't work on media which can not seek backwards, such
as tapes, we check for the boot device being a tape and, in that case, assume
a fixed (generous) image size and don't load the kernel symbol table (to
avoid seeking backwards); since tape boot is supposed to be only used to
boot bsd.rd, this is something we can live with.
While there, lower the address the boot blocks are loaded in memory, because
the last crank did not work with some early sun4c OpenPROM, which only
map about 3.5MB of memory.
Memory games logic from NetBSD, tape handling by me.