Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 59 → Rev 60

/SPARTAN/trunk/arch/ia64/Makefile.inc
12,7 → 12,7
DEFS=-DARCH=$(ARCH)
CPPFLAGS=$(DEFS) -nostdinc -I../include
CFLAGS=$(CPPFLAGS) -nostdlib -fno-builtin -Wmissing-prototypes -Werror -O3
LFLAGS=-EL -n -M -no-check-sections -T ../arch/ia64/_link.ld
LFLAGS=-EL -M -no-check-sections -T ../arch/ia64/_link.ld
 
arch_sources= \
arch/start.S \
/SPARTAN/trunk/arch/ia64/src/asm.S
33,8 → 33,8
/*
* Switch the role of first two arguments
*/
sub r33 = r32, r33 ;;
sub r33 = r33, r32 ;;
add r32 = r32, r33 ;;
sub r33 = r33, r32
sub r33 = r32, r33
br _memcopy
/SPARTAN/trunk/arch/ia64/src/context.S
77,7 → 77,7
mov ar.pfs = loc0
add r8 = r0, r0, 1 /* context_save returns 1 */
br.ret.sptk.many rp
br.ret.sptk.many b0
 
context_restore:
alloc loc0 = ar.pfs, 1, 2, 0, 0
125,4 → 125,4
mov ar.pfs = loc0
mov r8 = r0 /* context_restore returns 0 */
br.ret.sptk.many rp
br.ret.sptk.many b0
/SPARTAN/trunk/arch/ia64/src/fake.s
69,5 → 69,5
map_page_to_frame:
memsetb:
panic:
br.ret.sptk.many rp
br.ret.sptk.many b0
 
/SPARTAN/trunk/arch/ia64/src/start.S
28,6 → 28,23
 
#include <arch/ski/ski.h>
 
.section K_TEXT_START
.global k_text_start
k_text_start:
 
.section K_TEXT_END
.global k_text_end
k_text_end:
 
.section K_DATA_START
.global k_data_start
k_data_start:
 
.section K_DATA_END
.global k_data_end
k_data_end:
 
 
.text
 
.global kernel_image_start
35,16 → 52,36
stack0:
kernel_image_start:
# initialize gp (Global Pointer) register
mov r1=kernel_image_start;
movl r1=k_text_start;
 
# set stack pointer to some sane value
mov r12=stack0
movl r12=stack0
 
#
# Initialize hardcoded_* variables.
# (IA-64 port doesn't get these values from linker.)
#
movl r8 = k_text_start ;;
movl r9 = k_text_end ;;
sub r8 = r9, r8 ;;
addl r10 = @gprel(hardcoded_ktext_size), gp;;
st4 [r10] = r8 ;;
 
movl r8 = k_data_start ;;
movl r9 = k_data_end ;;
sub r8 = r9, r8 ;;
addl r10 = @gprel(hardcoded_kdata_size), gp;;
st4 [r10] = r8 ;;
addl r10 = @gprel(hardcoded_load_address), gp;;
st8 [r10] = r1
# initialize Ski console using SSC (Simulator System Call)
mov r15=SKI_CONSOLE_INIT
break 0x80000
 
br.call.sptk.many rp=main_bsp
br.call.sptk.many b0=main_bsp
 
0:
br 0b
 
/SPARTAN/trunk/arch/ia64/_link.ld
12,7 → 12,7
 
SECTIONS {
.image 0x0000000000001000: AT (0x0000000000001000) {
ktext_start = .;
*(K_TEXT_START)
*(.text .stub .text.* .gnu.linkonce.t.*)
*(.interp)
*(.hash)
50,8 → 50,8
*(.init)
*(.plt)
*(.fini)
ktext_end = .;
kdata_start = .;
*(K_TEXT_END)
*(K_DATA_START)
*(.rodata .rodata.* .gnu.linkonce.r.*)
*(.rodata1)
*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
79,23 → 79,9
*(.scommon)
*(.dynbss)
*(.bss .bss.* .gnu.linkonce.b.*)
*(COMMON)
kdata_end = .;
*(COMMON);
*(K_DATA_END)
}
 
. = ABSOLUTE(hardcoded_ktext_size);
.patch_1 : {
LONG(ktext_end - ktext_start);
}
 
. = ABSOLUTE(hardcoded_kdata_size);
.patch_2 : {
LONG(kdata_end - kdata_start);
}
 
. = ABSOLUTE(hardcoded_load_address);
.patch_3 : {
QUAD(0x0000000000001000);
}
 
}