From: John Hodge Date: Fri, 6 Jan 2012 13:39:57 +0000 (+0800) Subject: Kernel/armv7 - Debug output added X-Git-Tag: rel0.14~20 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=1501fe53f7cc9d2d7bcb30abac636a8afbee2f8b;p=tpg%2Facess2.git Kernel/armv7 - Debug output added --- diff --git a/Kernel/arch/armv7/Makefile b/Kernel/arch/armv7/Makefile index 1bb9496d..4e36774c 100644 --- a/Kernel/arch/armv7/Makefile +++ b/Kernel/arch/armv7/Makefile @@ -15,4 +15,4 @@ A_OBJ += mm_phys.o mm_virt.o proc.o proc.ao #main.c: Makefile.BuildNum.$(ARCH) -POSTBUILD = objcopy $(BIN) -F binary $(BIN) +POSTBUILD = arm-elf-objcopy $(BIN) -O binary $(BIN) diff --git a/Kernel/arch/armv7/start.S b/Kernel/arch/armv7/start.S index 817dca1f..7c1be8c5 100644 --- a/Kernel/arch/armv7/start.S +++ b/Kernel/arch/armv7/start.S @@ -18,30 +18,46 @@ ivt_fiq: b . @ 0x1C FIQ (Fast interrupt) .globl _start _start: - ldr r0, =DEBUG_UART_PADDR - ldr r1, 'A' - str r0, r1 + ldr r2, =UART0_PADDR + mov r1, #'A' + str r1, [r2] ldr r0, =kernel_table0-KERNEL_BASE mcr p15, 0, r0, c2, c0, 1 @ Set TTBR1 to r0 mcr p15, 0, r0, c2, c0, 0 @ Set TTBR0 to r0 too (for identity) + mov r1, #'c' + str r1, [r2] + mov r0, #1 mcr p15, 0, r0, c2, c0, 2 @ Set TTCR to 1 (50/50 split) + + mov r1, #'e' + str r1, [r2] mov r0, #3 mcr p15, 0, r0, c3, c0, 0 @ Set Domain 0 to Manager + mov r1, #'s' + str r1, [r2] + @ Enable VMSA mrc p15, 0, r0, c1, c0, 0 orr r0, r0, #1 orr r0, r0, #1 << 23 mcr p15, 0, r0, c1, c0, 0 + ldr r2, =0xF1000000 + mov r1, #'s' + str r1, [r2] + @ Enable access faults on domains 0 & 1 mov r0, #0x55 @ 01010101b mcr p15, 0, r0, c3, c0, 0 + mov r1, #'2' + str r1, [r2] + @ @ Check for security extensions @ @@ -55,6 +71,8 @@ _start: orreq r0, #0x2000 mcreq p15, 0, r0, c1, c0, 0 + mov r1, #'-' + str r1, [r2] @ Prepare for interrupts cps #18 @ IRQ Mode @@ -63,6 +81,13 @@ _start: ldr sp, =abortstack+0x1000 cps #19 + mov r1, #'a' + str r1, [r2] + mov r1, #'r' + str r1, [r2] + mov r1, #'m' + str r1, [r2] + ldr sp, =0x80000000-4 @ Set up stack (top of user range) ldr r0, =kmain mov pc, r0 @@ -309,5 +334,5 @@ kernel_exception_map: stack: .space MM_KSTACK_SIZE, 0 @ Original kernel stack -; vim: ts=8, ft=armv7 +// vim: ts=8, ft=armv7