2 # $Id: dot.gdbinit_300MHz_32MB,v 1.2 2004/10/20 03:02:27 fujiwara Exp $
4 # NOTE: this file is generated by a script, "gen_gdbinit.pl".
5 # (Please type "gen_gdbinit.pl --help" and check the help message).
6 # $ Id: gen_gdbinit.pl,v 1.12 2004/07/26 09:56:10 takata Exp $
8 # target platform: m32700ut
16 # clk xin:cpu:bif:bus=25:300:75:75
18 set *(unsigned long *)0x00ef4008 = 0x00000000
19 set *(unsigned long *)0x00ef4004 = 0
21 # NOTE: Please change the master clock source from PLL-clock to Xin-clock
22 # and switch off PLL, before resetting the clock gear ratio.
24 set *(unsigned long *)0x00ef4024 = 2
25 set *(unsigned long *)0x00ef4020 = 2
26 set *(unsigned long *)0x00ef4010 = 0
27 set *(unsigned long *)0x00ef4014 = 0
28 set *(unsigned long *)0x00ef4004 = 5
30 set *(unsigned long *)0x00ef4008 = 0x00000200
33 # Initialize SDRAM controller
36 set *(unsigned long *)0x00ef6008 = 0x00000182
38 set *(unsigned long *)0x00ef600c = 0x00000001
42 set *(unsigned long *)0x00ef602c = 0x00000020
44 set *(unsigned long *)0x00ef6028 = 0x00051502
46 set *(unsigned long *)0x00ef6020 = 0x08000003
48 set *(unsigned long *)0x00ef6004 = 0x00010e24
50 set *(unsigned long *)0x00ef6024 = 0x00000001
53 SDRAM controller initialization
54 0x08000000 - 0x09ffffff (32MB)
57 # Initialize BSEL3 for UT-CFC
59 set $sfrbase = 0xa0ef0000
61 # set *(unsigned long *)($sfrbase + 0x5300) = 0x0b0b8000
62 # set *(unsigned long *)($sfrbase + 0x5304) = 0x00102204
63 # set *(unsigned long *)($sfrbase + 0x5300) = 0x1f1f8000
64 # set *(unsigned long *)($sfrbase + 0x5300) = 0x1f1f1fdf
65 # set *(unsigned long *)($sfrbase + 0x5304) = 0x0013220f
66 # set *(unsigned long *)($sfrbase + 0x5304) = 0x0013330f
69 CF controller initialization
75 set *(unsigned long *)0xffff0024=1
81 set *(unsigned long *)0xffff0024=0
85 define show_tlb_entries
88 set $nr_entries = $arg1
90 while ($i < $nr_entries)
91 set $tlb_tag = *(unsigned long*)$addr
92 set $tlb_data = *(unsigned long*)($addr + 4)
93 printf " [%2d] 0x%08lx : 0x%08lx - 0x%08lx\n", $i, $addr, $tlb_tag, $tlb_data
101 show_tlb_entries $itlb 0d32
105 show_tlb_entries $dtlb 0d32
108 # Initialize TLB entries
109 define init_tlb_entries
112 set $nr_entries = $arg1
114 while ($i < $nr_entries)
115 set *(unsigned long *)($addr + 0x4) = 0
117 set $addr = $addr + 8
123 init_tlb_entries $itlb 0d32
125 init_tlb_entries $dtlb 0d32
128 # Show current task structure
130 set $current = $spi & 0xffffe000
131 printf "$current=0x%08lX\n",$current
132 print *(struct task_struct *)$current
135 # Show user assigned task structure
137 set = $arg0 & 0xffffe000
138 printf "$task=0x%08lX\n",$task
139 print *(struct task_struct *)$task
142 Show user assigned task structure
143 arg0 : task structure address
146 # Show M32R registers
148 printf " R0[0x%08lX] R1[0x%08lX] R2[0x%08lX] R3[0x%08lX]\n",$r0,$r1,$r2,$r3
149 printf " R4[0x%08lX] R5[0x%08lX] R6[0x%08lX] R7[0x%08lX]\n",$r4,$r5,$r6,$r7
150 printf " R8[0x%08lX] R9[0x%08lX] R10[0x%08lX] R11[0x%08lX]\n",$r8,$r9,$r10,$r11
151 printf "R12[0x%08lX] FP[0x%08lX] LR[0x%08lX] SP[0x%08lX]\n",$r12,$fp,$lr,$sp
152 printf "PSW[0x%08lX] CBR[0x%08lX] SPI[0x%08lX] SPU[0x%08lX]\n",$psw,$cbr,$spi,$spu
153 printf "BPC[0x%08lX] PC[0x%08lX] ACCL[0x%08lX] ACCH[0x%08lX]\n",$bpc,$pc,$accl,$acch
154 printf "EVB[0x%08lX]\n",$evb
160 set *(unsigned int)0xfffffffc=0x60
165 set *(unsigned long *)0x00ef6020 = 0x08000003
168 set *(unsigned short *)0xb0301000 = 0x100
179 # Set kernel parameters
180 define set_kernel_parameters
181 set $param = (void*)0x08001000
183 # set *(unsigned long *)($param + 0x0010) = 0x08300000
185 # set *(unsigned long *)($param + 0x0014) = 0x00000000
187 set *(unsigned long *)($param + 0x0018) = 0d300000000
189 set *(unsigned long *)($param + 0x001c) = 0d75000000
192 set *(unsigned long *)($param + 0x0020) = 0d128
194 set {char[0x200]}($param + 0x100) = "console=ttyS0,115200n8x console=tty1 root=/dev/nfsroot nfsroot=192.168.0.1:/project/m32r-linux/export/rootfs,rsize=1024,wsize=1024 nfsaddrs=192.168.0.101:192.168.0.1:192.168.0.1:255.255.255.0:mappi001 mem=32M \0"
199 set_kernel_parameters
202 # set *(unsigned char *)0xffffffff = 0x03
208 define set_breakpoints