2 # $Id: dot.gdbinit.vdec2,v 1.2 2004/11/11 02:03:15 takata Exp $
9 # Initialize SDRAM controller for Mappi
12 set *(unsigned long *)0x00ef6008=0x00000182
14 set *(unsigned long *)0x00ef600c=0x00000001
18 set *(unsigned long *)0x00ef602c=0x00000020
20 set *(unsigned long *)0x00ef6028=0x00041302
22 set *(unsigned long *)0x00ef6020=0x08000004
24 set *(unsigned long *)0x00ef6004=0x00010705
26 set *(unsigned long *)0x00ef6024=0x00000001
29 Mappi SDRAM controller initialization
30 0x08000000 - 0x0bffffff (64MB)
33 # Initialize SDRAM controller for Mappi
36 set *(unsigned long *)0x00ef6008=0x00000182
38 set *(unsigned long *)0x00ef602c=0x00000020
40 set *(unsigned long *)0x00ef6028=0x00010002
42 set *(unsigned long *)0x00ef6020=0x08000004
44 set *(unsigned long *)0x00ef6004=0x00010107
46 set *(unsigned long *)0x00ef600c=0x00000001
50 set *(unsigned long *)0x00ef6024=0x00000001
54 Mappi SDRAM controller initialization
55 0x08000000 - 0x0bffffff (64MB)
58 # Initialize LAN controller for Mappi
60 # Set BSEL1 (BSEL3 for the Chaos's bselc)
61 #set *(unsigned long *)0x00ef5004 = 0x0fff330f
62 #set *(unsigned long *)0x00ef5004 = 0x01113301
64 # set *(unsigned long *)0x00ef5004 = 0x02011101
65 # set *(unsigned long *)0x00ef5004 = 0x04441104
68 # set *(unsigned long *)0x00ef5014 = 0x0ccc310c
69 # set *(unsigned long *)0x00ef5014 = 0x0303310f
70 # set *(unsigned long *)0x00ef5014 = 0x01011102 -> NG
71 # set *(unsigned long *)0x00ef5014 = 0x03033103
73 set *(unsigned long *)0x00ef500c = 0x0b0b1304
74 set *(unsigned long *)0x00ef5010 = 0x03033302
75 # set *(unsigned long *)0x00ef5018 = 0x02223302
81 set *(unsigned long *)0xffff0024=1
87 set *(unsigned long *)0xffff0024=0
91 define show_tlb_entries
95 set $tlb_tag = *(unsigned long*)$addr
96 set $tlb_data = *(unsigned long*)($addr + 4)
97 printf " [%2d] 0x%08lx : 0x%08lx - 0x%08lx\n", $i, $addr, $tlb_tag, $tlb_data
104 show_tlb_entries $itlb
108 show_tlb_entries $dtlb
112 define set_cache_type
113 set $mctype = (void*)0xfffffff8
115 # set *(unsigned long *)($mctype) = 0x0000c000
116 # m32102 i-cache only
117 set *(unsigned long *)($mctype) = 0x00008000
118 # m32102 d-cache only
119 # set *(unsigned long *)($mctype) = 0x00004000
122 set $param = (void*)0x08001000
123 set *(unsigned long *)($param) = 0x60ff6102
127 # Show current task structure
129 set $current = $spi & 0xffffe000
130 printf "$current=0x%08lX\n",$current
131 print *(struct task_struct *)$current
134 # Show user assigned task structure
136 set $task = $arg0 & 0xffffe000
137 printf "$task=0x%08lX\n",$task
138 print *(struct task_struct *)$task
141 Show user assigned task structure
142 arg0 : task structure address
145 # Show M32R registers
147 printf " R0[0x%08lX] R1[0x%08lX] R2[0x%08lX] R3[0x%08lX]\n",$r0,$r1,$r2,$r3
148 printf " R4[0x%08lX] R5[0x%08lX] R6[0x%08lX] R7[0x%08lX]\n",$r4,$r5,$r6,$r7
149 printf " R8[0x%08lX] R9[0x%08lX] R10[0x%08lX] R11[0x%08lX]\n",$r8,$r9,$r10,$r11
150 printf "R12[0x%08lX] FP[0x%08lX] LR[0x%08lX] SP[0x%08lX]\n",$r12,$fp,$lr,$sp
151 printf "PSW[0x%08lX] CBR[0x%08lX] SPI[0x%08lX] SPU[0x%08lX]\n",$psw,$cbr,$spi,$spu
152 printf "BPC[0x%08lX] PC[0x%08lX] ACCL[0x%08lX] ACCH[0x%08lX]\n",$bpc,$pc,$accl,$acch
153 printf "EVB[0x%08lX]\n",$evb
155 set $mests = *(unsigned long *)0xffff000c
156 set $mdeva = *(unsigned long *)0xffff0010
157 printf "MESTS[0x%08lX] MDEVA[0x%08lX]\n",$mests,$mdeva
166 # set $evb=0x08000000
176 # Set kernel parameters
177 define set_kernel_parameters
178 set $param = (void*)0x08001000
181 set {long}($param+0x00)=0
183 #set {long}($param+0x04)=0
185 #set {long}($param+0x08)=0x00000100
187 #set {long}($param+0x0C)=0
189 set {long}($param+0x10)=0x082a0000
191 set {long}($param+0x14)=0d6200000
194 set *(unsigned long *)($param + 0x0018) = 0d25000000
196 set *(unsigned long *)($param + 0x001c) = 0d25000000
198 set *(unsigned long *)($param + 0x0020) = 0d128
201 set {char[0x200]}($param + 0x100) = "console=ttyS0,115200n8x root=/dev/nfsroot nfsroot=192.168.0.1:/project/m32r-linux/export/root.2.6 nfsaddrs=192.168.0.102:192.168.0.1:192.168.0.1:255.255.255.0:mappi: \0"
208 set_kernel_parameters