Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 77 → Rev 78

/SPARTAN/trunk/src/main/main.c
56,7 → 56,7
#include <arch/faddr.h>
 
char *project = "SPARTAN kernel";
char *copyright = "Copyright (C) 2001-2005 Jakub Jermar, Copyright (C) 2005 HelenOS project";
char *copyright = "Copyright (C) 2001-2005 Jakub Jermar\nCopyright (C) 2005 HelenOS project";
 
config_t config;
context_t ctx;
/SPARTAN/trunk/arch/ia64/include/ski/ski.h
29,7 → 29,10
#ifndef __SKI_H__
#define __SKI_H__
 
#define SKI_CONSOLE_INIT 20
#define SKI_CONSOLE_PUTC 31
#define SKI_INIT_CONSOLE 20
#define SKI_PUTCHAR 31
 
extern void ski_init_console(void);
extern void ski_putchar(const char ch);
#endif
/SPARTAN/trunk/arch/ia64/Makefile.inc
21,4 → 21,5
arch/putchar.c \
arch/ia64.c \
arch/fpu_context.c \
arch/context.S
arch/context.S \
arch/ski/ski.c
/SPARTAN/trunk/arch/ia64/src/ia64.c
26,3 → 26,14
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
 
#include <arch.h>
#include <arch/ski/ski.h>
 
void arch_pre_mm_init(void)
{
}
 
void arch_post_mm_init(void)
{
ski_init_console();
}
/SPARTAN/trunk/arch/ia64/src/ski/ski.c
0,0 → 1,54
/*
* Copyright (C) 2005 Jakub Jermar
* 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.
*/
 
#include <arch/ski/ski.h>
 
void ski_init_console(void)
{
__asm__ (
"mov r15=%0\n"
"break 0x80000\n"
:
: "i" (SKI_INIT_CONSOLE)
: "r15", "r8"
);
}
 
void ski_putchar(const char ch)
{
__asm__ (
"mov r15=%0\n"
"mov r32=%1\n" /* r32 is in0 */
"break 0x80000\n" /* modifies r8 */
:
: "i" (SKI_PUTCHAR), "r" (ch)
: "r15", "in0", "r8"
);
if (ch == '\n') ski_putchar('\r');
}
/SPARTAN/trunk/arch/ia64/src/fake.s
33,8 → 33,6
.global userspace
.global before_thread_runs_arch
.global arch_late_init
.global arch_post_mm_init
.global arch_pre_mm_init
.global cpu_arch_init
.global cpu_halt
.global cpu_identify
54,8 → 52,6
calibrate_delay_loop:
asm_delay_loop:
arch_late_init:
arch_post_mm_init:
arch_pre_mm_init:
cpu_arch_init:
cpu_halt:
cpu_identify:
/SPARTAN/trunk/arch/ia64/src/putchar.c
27,19 → 27,9
*/
 
#include <putchar.h>
#include <arch/types.h>
#include <arch/ski/ski.h>
 
void putchar(const char ch)
{
__asm__ (
"mov r15=%0\n"
"mov r32=%1\n" /* r32 is in0 */
"break 0x80000\n" /* modifies r8 */
:
: "i" (SKI_CONSOLE_PUTC), "r" (ch)
: "r15", "in0", "r8"
);
if (ch == '\n') putchar('\r');
ski_putchar(ch);
}
/SPARTAN/trunk/arch/ia64/src/start.S
26,8 → 26,6
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
 
#include <arch/ski/ski.h>
 
.section K_TEXT_START
.global k_text_start
k_text_start:
51,13 → 49,13
#
movl r8 = k_text_start ;;
movl r9 = k_text_end ;;
sub r8 = r9, r8 ;;
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 ;;
sub r8 = r9, r8
addl r10 = @gprel(hardcoded_kdata_size), gp;;
st4 [r10] = r8 ;;
64,10 → 62,6
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 b0=main_bsp
 
0: