1*4882a593SmuzhiyunBEDBUG Support for U-Boot 2*4882a593Smuzhiyun-------------------------- 3*4882a593Smuzhiyun 4*4882a593SmuzhiyunThese changes implement the bedbug (emBEDded deBUGger) debugger in U-Boot. 5*4882a593SmuzhiyunA specific implementation is made for the AMCC 405 processor but other flavors 6*4882a593Smuzhiyuncan be easily implemented. 7*4882a593Smuzhiyun 8*4882a593Smuzhiyun##################### 9*4882a593Smuzhiyun### Modifications ### 10*4882a593Smuzhiyun##################### 11*4882a593Smuzhiyun 12*4882a593Smuzhiyun./common/Makefile 13*4882a593Smuzhiyun Included cmd_bedbug.c and bedbug.c in the Makefile. 14*4882a593Smuzhiyun 15*4882a593Smuzhiyun./common/command.c 16*4882a593Smuzhiyun Added bedbug commands to command table. 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun./common/board.c 19*4882a593Smuzhiyun Added call to initialize debugger on startup. 20*4882a593Smuzhiyun 21*4882a593Smuzhiyun./arch/powerpc/cpu/ppc4xx/Makefile 22*4882a593Smuzhiyun Added bedbug_405.c to the Makefile. 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun./arch/powerpc/cpu/ppc4xx/start.S 25*4882a593Smuzhiyun Added code to handle the debug exception (0x2000) on the 405. 26*4882a593Smuzhiyun Also added code to handle critical exceptions since the debug 27*4882a593Smuzhiyun is treated as critical on the 405. 28*4882a593Smuzhiyun 29*4882a593Smuzhiyun./arch/powerpc/cpu/ppc4xx/traps.c 30*4882a593Smuzhiyun Added more detailed output for the program exception to tell 31*4882a593Smuzhiyun if it is an illegal instruction, privileged instruction or 32*4882a593Smuzhiyun a trap. Also added debug trap handler. 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun./include/ppc_asm.tmpl 35*4882a593Smuzhiyun Added code to handle critical exceptions 36*4882a593Smuzhiyun 37*4882a593Smuzhiyun################# 38*4882a593Smuzhiyun### New Stuff ### 39*4882a593Smuzhiyun################# 40*4882a593Smuzhiyun 41*4882a593Smuzhiyun./include/bedbug/ppc.h 42*4882a593Smuzhiyun./include/bedbug/regs.h 43*4882a593Smuzhiyun./include/bedbug/bedbug.h 44*4882a593Smuzhiyun./include/bedbug/elf.h [obsoleted by new include/elf.h] 45*4882a593Smuzhiyun./include/bedbug/tables.h 46*4882a593Smuzhiyun./include/cmd_bedbug.h 47*4882a593Smuzhiyun./common/cmd_bedbug.c 48*4882a593Smuzhiyun./common/bedbug.c 49*4882a593Smuzhiyun Bedbug library includes code for assembling and disassembling 50*4882a593Smuzhiyun PowerPC instructions to/from memory as well as handling 51*4882a593Smuzhiyun hardware breakpoints and stepping through code. These 52*4882a593Smuzhiyun routines are common to all PowerPC processors. 53*4882a593Smuzhiyun 54*4882a593Smuzhiyun./arch/powerpc/cpu/ppc4xx/bedbug_405.c 55*4882a593Smuzhiyun AMCC PPC405 specific debugger routines. 56*4882a593Smuzhiyun 57*4882a593Smuzhiyun 58*4882a593SmuzhiyunBedbug support for the MPC860 59*4882a593Smuzhiyun----------------------------- 60*4882a593Smuzhiyun 61*4882a593SmuzhiyunChanges: 62*4882a593Smuzhiyun 63*4882a593Smuzhiyun common/cmd_bedbug.c 64*4882a593Smuzhiyun Added call to initialize 860 debugger. 65*4882a593Smuzhiyun 66*4882a593Smuzhiyun arch/powerpc/cpu/mpc8xx/Makefile 67*4882a593Smuzhiyun Added new file "bedbug_860.c" to the makefile 68*4882a593Smuzhiyun 69*4882a593Smuzhiyun arch/powerpc/cpu/mpc8xx/start.S 70*4882a593Smuzhiyun Added handler for InstructionBreakpoint (0xfd00) 71*4882a593Smuzhiyun 72*4882a593Smuzhiyun arch/powerpc/cpu/mpc8xx/traps.c 73*4882a593Smuzhiyun Added new routine DebugException() 74*4882a593Smuzhiyun 75*4882a593SmuzhiyunNew Files: 76*4882a593Smuzhiyun 77*4882a593Smuzhiyun arch/powerpc/cpu/mpc8xx/bedbug_860.c 78*4882a593Smuzhiyun CPU-specific routines for 860 debug registers. 79