/SPARTAN/trunk/src/Makefile.config |
---|
20,7 → 20,7 |
#USERSPACE=__USERSPACE__ |
# Uncomment if you want to run in the test mode |
#TEST=__TEST__ |
TEST=__TEST__ |
TEST_FILE=test.c |
/SPARTAN/trunk/src/main/main.c |
---|
157,6 → 157,7 |
printf("config.cpu_count=%d\n", config.cpu_count); |
cpu_init(); |
calibrate_delay_loop(); |
timeout_init(); |
/SPARTAN/trunk/src/proc/scheduler.c |
---|
362,7 → 362,11 |
THREAD = NULL; |
} |
printf("Ahoj"); |
THREAD = find_best_thread(); |
// putchar('@'); |
printf("Lidi"); |
// printf("*1*"); |
spinlock_lock(&THREAD->lock); |
priority = THREAD->pri; |
/SPARTAN/trunk/arch/ia64/Makefile.inc |
---|
14,6 → 14,8 |
CFLAGS=$(CPPFLAGS) -mconstant-gp -nostdlib -fno-builtin -fno-unwind-tables -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 |
LFLAGS=-EL -M -T ../arch/ia64/_link.ld |
arch_sources= \ |
arch/start.S \ |
arch/asm.S \ |
22,4 → 24,7 |
arch/ia64.c \ |
arch/fpu_context.c \ |
arch/context.S \ |
arch/ski/ski.c |
arch/ski/ski.c \ |
arch/cpu/cpu.c \ |
arch/ivt.S \ |
arch/interrupt_handler.c |
/SPARTAN/trunk/arch/ia64/src/ivt.S |
---|
0,0 → 1,49 |
# |
# Copyright (C) 2005 Jakub Vana |
# 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. |
# |
.macro Handler o h |
.org IVT + \o |
br \h;; |
.endm |
.global IVT |
.align 32768 |
IVT: |
Handler 0x2c00 break_instruction |
Handler 0x5400 general_exception |
.align 32768 |
.byte 0 |
/SPARTAN/trunk/arch/ia64/src/cpu/cpu.c |
---|
0,0 → 1,36 |
#include <cpu.h> |
#include <print.h> |
#include <panic.h> |
extern int IVT; |
void cpu_arch_init(void) |
{ |
int *p=&IVT; |
__asm__ ( |
"mov r15 = %0;;" |
"mov cr2 = r15;;" |
: |
: "r" (p) |
: "r15" |
); |
} |
void gugux_pokus(void); |
void gugux_pokus(void) |
{ |
panic("\n\nGUGUX Exception\n\n"); |
} |
/SPARTAN/trunk/arch/ia64/src/interrupt_handler.c |
---|
0,0 → 1,47 |
/* |
* Copyright (C) 2005 Jakub Vana |
* 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 <panic.h> |
void general_exception(void); |
void general_exception(void) |
{ |
panic("\nGeneral Exception\n"); |
} |
void break_instruction(void); |
void break_instruction(void) |
{ |
panic("\nBreak Instruction\n"); |
} |
/SPARTAN/trunk/arch/ia64/src/dummy.s |
---|
33,7 → 33,6 |
.global userspace |
.global before_thread_runs_arch |
.global arch_late_init |
.global cpu_arch_init |
.global cpu_identify |
.global cpu_print_report |
.global cpu_priority_high |
49,7 → 48,6 |
calibrate_delay_loop: |
asm_delay_loop: |
arch_late_init: |
cpu_arch_init: |
cpu_identify: |
cpu_print_report: |
cpu_priority_high: |
/SPARTAN/trunk/arch/mips/src/putchar.c |
---|
34,9 → 34,9 |
void putchar(const char ch) |
{ |
__u32 status = cp0_status_read(); |
// __u32 status = cp0_status_read(); |
cp0_status_write(cp0_status_read() | cp0_status_erl_error_bit); |
// cp0_status_write(cp0_status_read() | cp0_status_erl_error_bit); |
*((char *) VIDEORAM) = ch; |
cp0_status_write(status); |
// cp0_status_write(status); |
} |