Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/hpc/stand/hpcboot Added support PXA270.
details: https://anonhg.NetBSD.org/src/rev/58a91ec9e1b2
branches: trunk
changeset: 753683:58a91ec9e1b2
user: nonaka <nonaka%NetBSD.org@localhost>
date: Tue Apr 06 16:20:27 2010 +0000
description:
Added support PXA270.
diffstat:
sys/arch/hpc/stand/hpcboot/arm/arm.asm | 246 +------------
sys/arch/hpc/stand/hpcboot/arm/arm_arch.h | 10 +-
sys/arch/hpc/stand/hpcboot/arm/arm_pxa2x0.cpp | 414 +++++++++++++++++++++-
sys/arch/hpc/stand/hpcboot/arm/arm_pxa2x0.h | 7 +-
sys/arch/hpc/stand/hpcboot/arm/arm_pxa2x0_asm.asm | 243 ++++++++++++
sys/arch/hpc/stand/hpcboot/arm/arm_sa1100.cpp | 23 +-
sys/arch/hpc/stand/hpcboot/arm/arm_sa1100.h | 5 +-
sys/arch/hpc/stand/hpcboot/arm/arm_sa1100_asm.asm | 270 ++++++++++++++
sys/arch/hpc/stand/hpcboot/file_manager.cpp | 5 +-
sys/arch/hpc/stand/hpcboot/hpcboot.config | 4 +-
sys/arch/hpc/stand/hpcboot/hpcmenu.cpp | 14 +-
sys/arch/hpc/stand/hpcboot/menu/menu.cpp | 56 ++-
sys/arch/hpc/stand/hpcboot/res/hpcmenu.rc | 8 +-
sys/arch/hpc/stand/hpcboot/res/resource.h | 6 +-
14 files changed, 1041 insertions(+), 270 deletions(-)
diffs (truncated from 1648 to 300 lines):
diff -r 72ada3ff68d6 -r 58a91ec9e1b2 sys/arch/hpc/stand/hpcboot/arm/arm.asm
--- a/sys/arch/hpc/stand/hpcboot/arm/arm.asm Tue Apr 06 16:18:24 2010 +0000
+++ b/sys/arch/hpc/stand/hpcboot/arm/arm.asm Tue Apr 06 16:20:27 2010 +0000
@@ -1,4 +1,4 @@
-; $NetBSD: arm.asm,v 1.8 2008/05/03 23:49:14 martin Exp $
+; $NetBSD: arm.asm,v 1.9 2010/04/06 16:20:28 nonaka Exp $
;
; Copyright (c) 2001 The NetBSD Foundation, Inc.
; All rights reserved.
@@ -33,10 +33,13 @@
;arm.obj
;
; dummy buffer for WritebackDCache
+ EXPORT |dcachesize| [DATA]
EXPORT |dcachebuf| [DATA]
AREA |.data|, DATA
+|dcachesize|
+ DCD 8192 ; for SA1100
|dcachebuf|
- % 8192 ; D-cache size
+ % 65536 ; max D-cache size
AREA |.text|, CODE, PIC
@@ -91,14 +94,17 @@
EXPORT |WritebackDCache|
|WritebackDCache| PROC
- ldr r0, [pc, #16] ; dcachebuf
- add r1, r0, #8192 ; cache-size is 8Kbyte.
+ ldr r0, [pc, #24] ; dcachebuf
+ ldr r1, [pc, #24]
+ ldr r1, [r1] ; dcache-size
+ add r1, r1, r0
|wbdc1|
ldr r2, [r0], #32 ; line-size is 32byte.
teq r1, r0
bne |wbdc1|
mov pc, lr
DCD |dcachebuf|
+ DCD |dcachesize|
ENDP ; |WritebackDCache|
EXPORT |InvalidateDCache|
@@ -112,8 +118,10 @@
EXPORT |WritebackInvalidateDCache|
|WritebackInvalidateDCache| PROC
- ldr r0, [pc, #20] ; dcachebuf
- add r1, r0, #8192
+ ldr r0, [pc, #28] ; dcachebuf
+ ldr r1, [pc, #28]
+ ldr r1, [r1] ; dcache-size
+ add r1, r1, r0
|wbidc1|
ldr r2, [r0], #32
teq r1, r0
@@ -121,6 +129,7 @@
mcr p15, 0, r0, c7, c6, 0
mov pc, lr
DCD |dcachebuf|
+ DCD |dcachesize|
ENDP ; |WritebackInvalidateDCache|
;
@@ -276,229 +285,4 @@
ENDP ; |GetCop15Reg14|
; Reg15 Test, clock, and idle (W)
- ; FlatJump (kaddr_t bootinfo, kaddr_t pvec, kaddr_t stack
- ; kaddr_t jump)
- ; bootinfo boot information block address.
- ; pvec page vector of kernel.
- ; stack physical address of stack
- ; jump physical address of boot function
- ; *** MMU and pipeline behavier are SA-1100 specific. ***
- EXPORT |FlatJump|
-|FlatJump| PROC
- ; disable interrupt
- mrs r4, cpsr
- orr r4, r4, #0xc0
- msr cpsr, r4
- ; disable MMU, I/D-Cache, Writebuffer.
- ; interrupt vector address is 0xffff0000
- ; 32bit exception handler/address range.
- ldr r4, [pc, #24]
- ; Disable WB/Cache/MMU
- mcr p15, 0, r4, c1, c0, 0
- ; Invalidate I/D-cache.
- mcr p15, 0, r4, c7, c7, 0 ; Fetch translated fetch
- ; Invalidate TLB entries.
- mcr p15, 0, r4, c8, c7, 0 ; Fetch translated decode
- ; jump to kernel entry physical address.
- mov pc, r3 ; Fetch translated execute
- ; NOTREACHED
- nop ; Fetch nontranslated cache access
- nop ; Fetch nontranslated writeback
- mov pc, lr ; Fetch nontranslated
- DCD 0x00002030
- ENDP ; |FlatJump|
-;
-; UART test
-;
- ; boot_func (uint32_t mapaddr, uint32_t bootinfo, uint32_t flags)
- ;
- EXPORT |boot_func|
-|boot_func| PROC
- nop ; Cop15 hazard
- nop ; Cop15 hazard
- nop ; Cop15 hazard
- mov sp, r2 ; set bootloader stack
-; mov r4, r0
-; mov r5, r1
-; bl colorbar
-; mov r0, r4
-; mov r1, r5
- bl boot
- nop ; NOTREACHED
- nop
- ENDP ; |boot_func|
-
- EXPORT |colorbar|
-|colorbar| PROC
- stmfd sp!, {r4-r7, lr}
- adr r4, |$FBADDR|
- ldr r4, [r4]
-
- mov r7, #8
- add r0, r0, r7
-|color_loop|
- mov r6, r0
- and r6, r6, #7
- orr r6, r6, r6, LSL #8
- orr r6, r6, r6, LSL #16
- add r5, r4, #0x9600
-|fb_loop|
- str r6, [r4], #4
- cmp r4, r5
- blt |fb_loop|
-
- subs r7, r7, #1
- bne |color_loop|
-
- ldmfd sp!, {r4-r7, pc}
-|$FBADDR|
- DCD 0xc0003000 ; use WindowsCE default.
- ENDP ; |colorbar|
-
- EXPORT |boot|
-|boot| PROC
-;
-; UART test code
-;
-; ; print boot_info address (r0) and page_vector start address (r1).
-; mov r4, r0
-; mov r5, r1
-; mov r0, #'I'
-; bl btputc
-; mov r0, r4
-; bl hexdump
-; mov r0, #'P'
-; bl btputc
-; mov r0, r5
-; bl hexdump
-; mov r7, r4
-; mov r2, r5 ; start
-
- mov r7, r0 ; if enabled above debug print, remove this.
- mov r2, r1 ; if enabled above debug print, remove this.
-|page_loop|
- mvn r0, #0 ; ~0
- cmp r2, r0
- beq |page_end| ; if (next == ~0) goto page_end
-
- mov r1, r2 ; p = next
- ldr r2, [r1] ; next
- ldr r3, [r1, #4] ; src
- ldr r4, [r1, #8] ; dst
- ldr r5, [r1, #12] ; sz
-
- cmp r3, r0
- add r6, r4, r5 ; end address
- bne |page_memcpy4| ; if (src != ~0) goto page_memcpy4
-
- mov r0, #0
-|page_memset| ; memset (dst, 0, sz) uncached.
- str r0, [r4], #4
- cmp r4, r6
- blt |page_memset|
- b |page_loop|
-
-|page_memcpy4| ; memcpy (dst, src, sz) uncached.
- ldr r0, [r3], #4
- ldr r5, [r3], #4
- str r0, [r4], #4
- cmp r4, r6
- strlt r5, [r4], #4
- cmplt r4, r6
- blt |page_memcpy4|
-
- b |page_loop|
-|page_end|
- ;
- ; jump to kernel
- ;
-; mov r0, #'E'
-; bl btputc
-; ldr r0, [r7]
-; bl hexdump
-; ldr r0, [r7]
-; ldr r0, [r0]
-; bl hexdump
-
- ; set stack pointer
- mov r5, #4096
- add r6, r6, #8192
- sub r5, r5, #1
- bic sp, r6, r5
-
- ; set bootargs
- ldr r4, [r7]
- ldr r0, [r7, #4]
- ldr r1, [r7, #8]
- ldr r2, [r7, #12]
- mov pc, r4
- ; NOTREACHED
-
-|infinite_loop|
- nop
- nop
- nop
- nop
- nop
- b |infinite_loop|
- ENDP ; |boot|
-
-|btputc| PROC
- adr r1, |$UARTTXBSY|
- ldr r1, [r1]
-|btputc_busy|
- ldr r2, [r1]
- and r2, r2, #1
- cmp r2, #1
- beq |btputc_busy|
- adr r1, |$UARTTXADR|
- ldr r1, [r1]
- str r0, [r1]
- mov pc, lr
- ENDP ;|btputc|
-
-|hexdump| PROC
- stmfd sp!, {r4-r5, lr}
- mov r4, r0
- mov r0, #0x30
- bl btputc
- mov r0, #0x78
- bl btputc
- mov r0, r4
- ; Transmit register address
- adr r1, |$UARTTXADR|
- ldr r1, [r1]
- ; Transmit busy register address
- adr r2, |$UARTTXBSY|
- ldr r2, [r2]
- mov r5, #8
-|hex_loop|
- mov r3, r0, LSR #28
- cmp r3, #9
- addgt r3, r3, #0x41 - 10
- addle r3, r3, #0x30
-|hex_busyloop|
- ldr r4, [r2]
- and r4, r4, #1
- cmp r4, #1
- beq |hex_busyloop|
- str r3, [r1]
- mov r0, r0, LSL #4
- subs r5, r5, #1
- bne |hex_loop|
- mov r0, #0x0d
- bl btputc
- mov r0, #0x0a
- bl btputc
- ldmfd sp!, {r4-r5, pc}
- ENDP ;|hexdump|
-
-|$UARTTXADR|
- DCD 0x80050014
-|$UARTTXBSY|
- DCD 0x80050020
-
- EXPORT |boot_func_end| [ DATA ]
-|boot_func_end| DCD 0x0
-
END
diff -r 72ada3ff68d6 -r 58a91ec9e1b2 sys/arch/hpc/stand/hpcboot/arm/arm_arch.h
--- a/sys/arch/hpc/stand/hpcboot/arm/arm_arch.h Tue Apr 06 16:18:24 2010 +0000
+++ b/sys/arch/hpc/stand/hpcboot/arm/arm_arch.h Tue Apr 06 16:20:27 2010 +0000
@@ -1,4 +1,4 @@
-/* -*-C++-*- $NetBSD: arm_arch.h,v 1.6 2008/04/28 20:23:20 martin Exp $ */
Home |
Main Index |
Thread Index |
Old Index