Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1776 → Rev 1777

/kernel/trunk/genarch/src/ofw/ofw.c
26,7 → 26,7
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
 
/** @addtogroup genarch
/** @addtogroup genarch
* @{
*/
/** @file
128,6 → 128,5
return (void *) ofw_call("claim", 3, 1, addr, size, align);
}
 
/** @}
/** @}
*/
 
/kernel/trunk/arch/sparc64/include/boot/boot.h
26,7 → 26,7
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
 
/** @addtogroup sparc64
/** @addtogroup sparc64
* @{
*/
/** @file
36,10 → 36,9
#define __sparc64_BOOT_H__
 
#define VMA 0x400000
#define LMA 0x4000
#define LMA VMA
 
#endif
 
/** @}
/** @}
*/
 
/kernel/trunk/arch/sparc64/Makefile.inc
31,7 → 31,7
 
BFD_NAME = elf64-sparc
BFD_ARCH = sparc
BFD = elf64-sparc
BFD = binary
TARGET = sparc64-linux-gnu
TOOLCHAIN_DIR = /usr/local/sparc64/bin
 
/kernel/trunk/arch/sparc64/src/start.S
43,56 → 43,8
 
.global kernel_image_start
kernel_image_start:
0:
b 1f
nop
 
/*
* This header forces SILO to load the kernel at 0x4000.
* More precisely, SILO will think this is an old version of Linux.
*/
.ascii "HdrS"
.word 0
.half 0
 
.align 8
 
1:
flushw ! flush all but the active register window
 
/*
* Prepare to copy the kernel image to 4M.
*/
 
set LMA, %g1 ! source address
set VMA, %g2 ! destination address
set hardcoded_ktext_size, %g3 ! link address of hardcoded_ktext_size
set hardcoded_kdata_size, %g4 ! link address of hardcoded_kdata_size
 
sub %g3, %g2, %g3 ! offset of hardcoded_ktext_size from the beginning of the load address
sub %g4, %g2, %g4 ! offset of hardcoded_kdata_size from the beginning of the load address
ldx [%g3 + %g1], %g3 ! hardcoded_ktext_size -> %g3
ldx [%g4 + %g1], %g4 ! hardcoded_kdata_size -> %g4
 
add %g3, %g4, %g3 ! size of kernel text and data
 
/*
* Start copying the kernel from higher addresses towards lower addresses.
*/
 
2: dec %g3
ldub [%g1 + %g3], %g4
stb %g4, [%g2 + %g3]
cmp %g3, 0
bnz 2b
nop
 
set relocated, %g1
jmp %g1
nop
 
relocated:
set ofw, %l0
 
call ofw_init