]> cvs.zerfleddert.de Git - linexec-j720/blame - asm/asmstuff.asm
fix linebreaks
[linexec-j720] / asm / asmstuff.asm
CommitLineData
77a37381 1 TTL C:\pocket\asmstuff\asmstuff.cpp
c5f1f439 2
77a37381 3 AREA |.drectve|, DRECTVE
4 DCB "-defaultlib:coredll.lib "
5 DCB "-defaultlib:corelibc.lib "
c5f1f439 6
77a37381 7 EXPORT |?read_mmu@@YAHXZ| ; read_mmu
8 AREA |.pdata|, PDATA
9|$T231| DCD |?read_mmu@@YAHXZ|
10 DCD 0x40000200
11 AREA |.text|, CODE
12|?read_mmu@@YAHXZ| PROC ; read_mmu
13|$M229|
c5f1f439 14
77a37381 15 mrc p15, 0, r0, c2, c0, 0
16 mov pc, lr
c5f1f439 17
77a37381 18|$M230|
19 ENDP ; |?read_mmu@@YAHXZ|, read_mmu
c5f1f439 20
77a37381 21 EXPORT |?IntOff@@YAXXZ| ; IntOff
22 AREA |.pdata|, PDATA
23|$T235| DCD |?IntOff@@YAXXZ|
24 DCD 0x40000100
25 AREA |.text|, CODE
26|?IntOff@@YAXXZ| PROC ; IntOff
27|$M233|
c5f1f439 28
77a37381 29 mrs r4,cpsr
30 orr r1,r4,#0xef
31 msr cpsr_c,r1
32 mov pc, lr
c5f1f439 33
77a37381 34|$M234|
35 ENDP ; |?IntOff@@YAXXZ|, IntOff
c5f1f439 36
37
77a37381 38 EXPORT |?DRAMloader@@YAXII@Z| ; DRAMloader
39 AREA |.pdata|, PDATA
40|$T239| DCD |?DRAMloader@@YAXII@Z|
41 DCD 0x40001004
42 AREA |.text|, CODE
43|?DRAMloader@@YAXII@Z| PROC ; DRAMloader
c5f1f439 44
77a37381 45 mov r12, sp
46 stmdb sp!, {r0, r1} ; stmfd
47 stmdb sp!, {r12, lr} ; stmfd
48 sub sp, sp, #8
c5f1f439 49
77a37381 50|$M237|
c5f1f439 51
77a37381 52 ldr r3, [sp, #0x10] ; 0x10 = 16
53 str r3, [sp]
54 ldr r2, [sp, #0x14] ; 0x14 = 20
55 str r2, [sp, #4]
c5f1f439 56
77a37381 57 ldr r1, [sp] ; jump address
58 ldr r2, [sp, #4] ; machine number
c5f1f439 59
77a37381 60 ldr r0, =0x3fff
61 mcr p15, 0, r0, c7, c10, 4 ;Enable access
c5f1f439 62 mrc p15, 0, r0, c2, c0, 0
77a37381 63 mov r0, r0
c5f1f439 64
65 mrc p15, 0, r3, c1, c0, 0 ;/* disable the MMU */
66 and r3, r3, #0xfffffffe ; xscale says p needs to be 0 ???
67 mov r3, #0x120
77a37381 68 mcr p15, 0, r3, c1, c0, 0 ;/* disable the MMU */
69 mrc p15, 0, r0, c2, c0, 0
70 mov r0, r0
71
c5f1f439 72; Jump into do_it and the kernel
77a37381 73 mov pc,r1 ; machine number is in register r2
c5f1f439 74
77a37381 75|$M238|
76 ENDP ; |?DRAMloader@@YAXII@Z|, DRAMloader
77 END
c5f1f439 78
Impressum, Datenschutz