/SPARTAN/trunk/arch/sparc64/boot/boot.S |
---|
0,0 → 1,34 |
# |
# Copyright (C) 2005 Martin Decky |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions |
# are met: |
# |
# - Redistributions of source code must retain the above copyright |
# notice, this list of conditions and the following disclaimer. |
# - Redistributions in binary form must reproduce the above copyright |
# notice, this list of conditions and the following disclaimer in the |
# documentation and/or other materials provided with the distribution. |
# - The name of the author may not be used to endorse or promote products |
# derived from this software without specific prior written permission. |
# |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
.global start |
start: |
b start |
nop |
/SPARTAN/trunk/arch/sparc64/boot/_link.ld |
---|
0,0 → 1,20 |
/* |
* boot[sparc64] linker script |
* |
*/ |
OUTPUT_FORMAT(a.out-sunos-big) |
ENTRY(start) |
SECTIONS { |
.text 0x8000: AT (0x8000) { |
*(.text); |
*(.rodata); |
*(.rodata.*); |
*(.data); /* initialized data */ |
*(.sdata); |
*(.sdata2); |
*(.sbss); |
*(.bss); /* uninitialized static variables */ |
} |
} |
/SPARTAN/trunk/arch/sparc64/boot/Makefile |
---|
1,9 → 1,30 |
.PHONY: nothing build clean |
BINUTILS_DIR=/usr/local/sparc64/bin |
TARGET=sparc64-linux-gnu |
.PHONY: nothing build |
nothing: |
build: |
touch boot.bin |
build: boot.bin |
cp boot.bin ../../../load.bin |
CC=$(BINUTILS_DIR)/$(TARGET)-gcc |
AS=$(BINUTILS_DIR)/$(TARGET)-as |
LD=$(BINUTILS_DIR)/$(TARGET)-ld |
CPPFLAGS=$(DEFS) -nostdinc -I../include |
CFLAGS=$(CPPFLAGS) -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O2 |
LFLAGS=-no-check-sections -N -T _link.ld -s |
boot.bin: boot.aout |
dd if=/dev/zero of=$@ bs=512 count=16 |
dd if=boot.aout of=$@ bs=512 seek=1 conv=notrunc |
boot.aout: boot.o |
$(LD) $(LFLAGS) boot.o -o $@ |
boot.o: boot.S |
$(CC) $(CFLAGS) -c boot.S -o $@ |
clean: |
-rm *.bin |
-rm *.o *.bin *.aout |
/SPARTAN/trunk/arch/sparc64/include/context.h |
---|
33,7 → 33,7 |
#include <typedefs.h> |
#include <align.h> |
#define STACK_ITEM_SIZE 16 |
#define STACK_ITEM_SIZE 8 |
/* |
* One item is put onto the stack to support get_stack_base(). |
/SPARTAN/trunk/arch/sparc64/src/dummy.s |
---|
93,5 → 93,5 |
dummy: |
0: |
ba,pt %xcc, 0b |
b 0b |
nop |
/SPARTAN/trunk/arch/sparc64/src/start.S |
---|
31,5 → 31,5 |
.global kernel_image_start |
kernel_image_start: |
0: |
ba 0b |
b 0b |
nop |
/SPARTAN/trunk/arch/sparc64/_link.ld |
---|
39,4 → 39,10 |
kdata_end = .; |
} |
/DISCARD/ : { |
*(.comment); |
*(.note*); |
} |
} |