;bdiGDB configuration file for P1020RDB ;-------------------------------------- ; ; The values used to configure the memory controller ; are the ones U-boot uses to setup my system. ; Your system may need different ones !!! ; ; This configuration is not usable for U-boot debugging. ; Use it to debug example code loaded into SDRAM. ; ; [INIT] ; ;================= setup TLB entries =================== ; Move the 256kB L2SRAM to the initial MMU page WM32 0xFF720E44 0x0000001C ;L2ERRDIS: disable parity error WM32 0xFF720000 0x50010000 ;L2CTL WM32 0xFF720100 0xFFFC0000 ;L2SRBAR0: map to 0x0_FFFC0000 WM32 0xFF720104 0x00000000 ;L2SRBAREA0 WM32 0xFF720000 0x90010000 ;L2CTL ; ; load and execute some boot code WM32 0xfffffffc 0x48000000 ;loop EXEC 0xfffffffc ; ; load TLB entries, helper code @ 0xfffff000 WM32 0xfffff000 0x7c0007a4 ;tlbwe WM32 0xfffff004 0x7c0004ac ;msync WM32 0xfffff008 0x48000000 ;loop WSPR 628 0x00000000 ;MAS4: WSPR 630 0x00000000 ;MAS7: ; ; 64 MB TLB1 #0 0xfc000000 - 0xffffffff WSPR 624 0x10000000 ;MAS0: WSPR 625 0x80000800 ;MAS1: WSPR 626 0xfc00000a ;MAS2: WSPR 627 0xfc000015 ;MAS3: EXEC 0xfffff000 ; ; 1 GB TLB1 #1 0x80000000 - 0xbfffffff WSPR 624 0x10010000 ;MAS0: WSPR 625 0x80000a00 ;MAS1: WSPR 626 0x8000000a ;MAS2: WSPR 627 0x80000015 ;MAS3: EXEC 0xfffff000 ; ; 256 MB TLB1 #2 0xe0000000 - 0xefffffff WSPR 624 0x10020000 ;MAS0: WSPR 625 0x80000900 ;MAS1: WSPR 626 0xe000000a ;MAS2: WSPR 627 0xe0000015 ;MAS3: EXEC 0xfffff000 ; ; 256 MB TLB1 #3 0xc0000000 - 0xcfffffff WSPR 624 0x10030000 ;MAS0: WSPR 625 0x80000900 ;MAS1: WSPR 626 0xc000000a ;MAS2: WSPR 627 0xc0000015 ;MAS3: EXEC 0xfffff000 ; ; 256 MB TLB1 #4 0xd0000000 - 0xdfffffff WSPR 624 0x10040000 ;MAS0: WSPR 625 0x80000800 ;MAS1: WSPR 626 0xd000000a ;MAS2: WSPR 627 0xd0000015 ;MAS3: EXEC 0xfffff000 ; ; 1 GB TLB1 #5 0x00000000 - 0x3fffffff WSPR 624 0x10050000 ;MAS0: WSPR 625 0x80000a00 ;MAS1: WSPR 626 0x00000000 ;MAS2: WSPR 627 0x00000015 ;MAS3: EXEC 0xfffff000 ; ; ; Remove the L2SRAM from the initial MMU page WM32 0xFF720000 0x10010000 ;L2CTL WM32 0xFF720000 0x10000000 ;L2CTL ;================= end setup TLB entries ===================== ; ; ;================= setup memory controller =================== ; Let CCSRBAR at 0xff700000 ;WM32 0xff700000 0x000e0000 ;CCSRBAR to 0xe0000000 ; ; Initialize LAWBAR's WM32 0xff700C08 0x00000000 ;LAWBAR0 : @0x00000000 WM32 0xff700C10 0x80f0001e ;LAWAR0 : DDR/SDRAM 2GB WM32 0xff700C28 0x000c0000 ;LAWBAR1 : @0xc0000000 WM32 0xff700C30 0x8040001d ;LAWAR1 : Local Bus 1GB WM32 0xff700C48 0x00080000 ;LAWBAR2 : @0x80000000 WM32 0xff700C50 0x8000001d ;LAWAR2 : PCI 1GB ; ; Setup chip select WM32 0xff705004 0xff000ff7 ;OR0 : Flash WM32 0xff705000 0xef001001 ;BR0 : 16MB at 0xe8000000 ; ; Setup DDR2 WM32 0xff702000 0x0000001f ;CS0_BNDS WM32 0xff702008 0x00000000 ;CS1_BNDS WM32 0xff702080 0x80014202 ;CS0_CONFIG WM32 0xff702084 0x00000000 ;CS1_CONFIG WM32 0xff7020C0 0x00000000 ;CS0_CONFIG_2 WM32 0xff7020C4 0x00000000 ;CS1_CONFIG_2 WM32 0xff702100 0x00030000 ;TIMING_CFG_3 WM32 0xff702104 0x55770802 ;TIMING_CFG_0 WM32 0xff702108 0x5f599543 ;TIMING_CFG_1 WM32 0xff70210C 0x0fa074d1 ;TIMING_CFG_2 WM32 0xff702110 0x43080000 ;DDR_CFG WM32 0xff702114 0x24401010 ;DDR_CFG_2 WM32 0xff702118 0x00040852 ;DDR_MODE WM32 0xff70211C 0x00000000 ;DDR_MODE_2 WM32 0xff702124 0x0a280100 ;DDR_INTERVAL WM32 0xff702128 0xdeadbeef ;DDR_DATA_INIT WM32 0xff702130 0x02800000 ;DDR_CLK_CNTL WM32 0xff702148 0x00000000 ;DDR_INIT_ADDR WM32 0xff70214C 0x00000000 ;DDR_INIT_EXT_ADDR WM32 0xff702160 0x00000000 ;TIMING_CFG_4 WM32 0xff702164 0x00000000 ;TIMING_CFG_5 WM32 0xff702170 0x00000000 ;DDR_ZQ_CNTL WM32 0xff702174 0x00000000 ;DDR_WRLVL_CNTL WM32 0xff702B28 0x00000000 ;DDRCDR_1 WM32 0xff702B2C 0x00000000 ;DDRCDR_2 DELAY 100 WM32 0xff702110 0xc3080000 ;DDR_CFG DELAY 1000 ; ;================= end setup memory controller =============== ; ; Setup debug vector for program execution WSPR 63 0x00000000 ;IVPR : Exceptions at 0x00000000 WSPR 406 0x0000700 ;IVOR6 : Program exception WSPR 415 0x0001500 ;IVOR15 : Debug exception WM32 0x00000700 0x48000000 ;write valid instruction WM32 0x00001500 0x48000000 ;write valid instruction ; [TARGET] CPUTYPE P1020 ;the CPU type ;JTAGCLOCK 0 ;BDI2000: use 16 MHz JTAG clock JTAGCLOCK 1 ;BDI3000: use 16 MHz JTAG clock STARTUP HALT ;halt core #0 at boot vector BREAKMODE HARD ;SOFT or HARD, HARD uses PPC hardware breakpoint STEPMODE HWBP ;JTAG or HWBP, HWPB uses a hardware breakpoint WAKEUP 200 ;give reset time to complete POWERUP 5000 ;start delay after power-up detected in ms [HOST] IP 151.120.25.112 PROMPT P1020> FILE E:\temp\dump1024k.bin FORMAT BIN 0x00100000 [FLASH] CHIPTYPE MIRRORX16 ;S29GL128P CHIPSIZE 0x1000000 ;Chipsize is 16MB BUSWIDTH 16 WORKSPACE 0x00010000 ;workspace in DDR SDRAM FILE E:\temp\dump256k.bin FORMAT BIN 0xefc00000 ERASE 0xefc00000 0x20000 4 ;erase 4 sectors [REGS] FILE $regP1020.def