Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2298 → Rev 2300

/branches/arm/kernel/arch/arm32/include/machine.h
50,6 → 50,8
 
void machine_debug_putc(char ch);
 
void machine_cpu_halt(void);
 
#endif
 
/** @}
/branches/arm/kernel/arch/arm32/Makefile.inc
74,6 → 74,7
arch/$(ARCH)/src/arm32.c \
arch/$(ARCH)/src/context.S \
arch/$(ARCH)/src/dummy.S \
arch/$(ARCH)/src/panic.S \
arch/$(ARCH)/src/cpu/cpu.c \
arch/$(ARCH)/src/ddi/ddi.c \
arch/$(ARCH)/src/mm/as.c \
/branches/arm/kernel/arch/arm32/src/asm.S
30,10 → 30,6
.text
 
.global memsetb
memsetb:
b _memsetb
 
 
.global memcpy
.global memcpy_from_uspace
.global memcpy_to_uspace
40,6 → 36,9
.global memcpy_from_uspace_failover_address
.global memcpy_to_uspace_failover_address
 
memsetb:
b _memsetb
 
memcpy:
memcpy_from_uspace:
memcpy_to_uspace:
/branches/arm/kernel/arch/arm32/src/arm32.c
98,7 → 98,7
init.tasks[i].addr = bootinfo.tasks[i].addr;
init.tasks[i].size = bootinfo.tasks[i].size;
}
 
}
 
void arch_pre_mm_init(void)
248,6 → 248,13
 
while(1) ;
}
 
 
void cpu_halt(void)
{
machine_cpu_halt();
}
 
/** @}
*/
 
/branches/arm/kernel/arch/arm32/src/panic.S
0,0 → 1,36
#
# Copyright (c) 2007 Michal Kebrt
# 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.
#
 
.text
 
.global panic_printf
 
panic_printf:
bl debug_printf
bl cpu_halt
 
/branches/arm/kernel/arch/arm32/src/dummy.S
32,33 → 32,14
.global asm_delay_loop
.global dummy
 
#.global arch_grab_console
#.global arch_release_console
 
.global cpu_halt
.global fpu_context_restore
.global fpu_context_save
.global fpu_enable
.global fpu_init
 
#.global interrupts_disable
#.global interrupts_enable
#.global interrupts_read
#.global interrupts_restore
#.global memcpy
#.global memcpy_from_uspace
#.global memcpy_to_uspace
#.global memsetb
 
.global panic_printf
.global symbol_table
.global sys_tls_set
 
#.global tlb_invalidate_asid
#.global tlb_invalidate_pages
 
#.global userspace
calibrate_delay_loop:
mov pc, lr // return
 
65,13 → 46,6
asm_delay_loop:
mov pc, lr // return
 
cpu_halt:
# stop gxemul
ldr r1, =0x10000010
eor r2, r2
strb r3, [r1, r2]
bkpt
 
fpu_context_restore:
mov pc, lr // return
84,14 → 58,6
fpu_init:
mov pc, lr // return
panic_printf:
bl debug_printf
# stop gxemul
ldr r1, =0x10000010
eor r2, r2
strb r3, [r1, r2]
bkpt
 
symbol_table:
bkpt
 
/branches/arm/kernel/arch/arm32/src/drivers/gxemul.c
46,6 → 46,7
/** Address of devices. */
#define GXEMUL_VIDEORAM 0x10000000
#define GXEMUL_KBD 0x10000000
#define GXEMUL_HALT_OFFSET 0x10
#define GXEMUL_RTC 0x15000000
#define GXEMUL_RTC_FREQ_OFFSET 0x100
#define GXEMUL_RTC_ACK_OFFSET 0x110
293,13 → 294,30
return *((int*)(GXEMUL_MP + GXEMUL_MP_MEMSIZE_OFFSET));
}
 
void machine_debug_putc(char ch) {
void machine_debug_putc(char ch)
{
char * addr = 0;
if (!hw_map_init_called) {
*((volatile char *) GXEMUL_KBD) = ch;
addr = (char *) GXEMUL_KBD;
} else {
*((char *) gxemul_hw_map.videoram) = ch;
addr = (char *) gxemul_hw_map.videoram;
}
 
*(addr) = ch;
}
 
void machine_cpu_halt(void)
{
char * addr = 0;
if (!hw_map_init_called) {
addr = (char *) GXEMUL_KBD;
} else {
addr = (char *) gxemul_hw_map.videoram;
}
*(addr + GXEMUL_HALT_OFFSET) = '\0';
}
 
 
/** @}
*/