diff options
Diffstat (limited to 'main/cpu/arm')
-rw-r--r-- | main/cpu/arm/arm.h | 58 | ||||
-rw-r--r-- | main/cpu/arm/cache_arm.c | 108 | ||||
-rw-r--r-- | main/cpu/arm/except_arm.c | 64 | ||||
-rw-r--r-- | main/cpu/arm/gdbregs_arm.c | 8 | ||||
-rw-r--r-- | main/cpu/arm/ldatags.c | 654 | ||||
-rw-r--r-- | main/cpu/arm/misc_arm.c | 18 | ||||
-rw-r--r-- | main/cpu/arm/regs_arm.c | 6 | ||||
-rw-r--r-- | main/cpu/arm/strace_arm.c | 203 | ||||
-rw-r--r-- | main/cpu/arm/vectors_arm.S | 42 |
9 files changed, 581 insertions, 580 deletions
diff --git a/main/cpu/arm/arm.h b/main/cpu/arm/arm.h index 8c9c53e..e56a382 100644 --- a/main/cpu/arm/arm.h +++ b/main/cpu/arm/arm.h @@ -25,47 +25,47 @@ * Original author: Ed Sutter (ed.sutter@alcatel-lucent.com) * */ -#define PSR_THUMB_STATE 0x00000020 -#define PSR_IMASK_IRQ 0x00000080 -#define PSR_IMASK_FRQ 0x00000040 -#define PSR_CONDITION_NEGATIVE 0x80000000 -#define PSR_CONDITION_ZERO 0x40000000 -#define PSR_CONDITION_CARRY 0x20000000 -#define PSR_CONDITION_OVERFLOW 0x10000000 -#define PSR_MODE_MASK 0x0000001f +#define PSR_THUMB_STATE 0x00000020 +#define PSR_IMASK_IRQ 0x00000080 +#define PSR_IMASK_FRQ 0x00000040 +#define PSR_CONDITION_NEGATIVE 0x80000000 +#define PSR_CONDITION_ZERO 0x40000000 +#define PSR_CONDITION_CARRY 0x20000000 +#define PSR_CONDITION_OVERFLOW 0x10000000 +#define PSR_MODE_MASK 0x0000001f /* Mode bits within PSR: */ -#define ABORT_MODE 0x00000017 -#define FASTINTRQST_MODE 0x00000011 -#define INTRQST_MODE 0x00000012 -#define SUPERVISOR_MODE 0x00000013 -#define SYSTEM_MODE 0x0000001f -#define UNDEFINED_MODE 0x0000001b -#define USER_MODE 0x00000010 +#define ABORT_MODE 0x00000017 +#define FASTINTRQST_MODE 0x00000011 +#define INTRQST_MODE 0x00000012 +#define SUPERVISOR_MODE 0x00000013 +#define SYSTEM_MODE 0x0000001f +#define UNDEFINED_MODE 0x0000001b +#define USER_MODE 0x00000010 /* Exception types: */ -#define EXCTYPE_UNDEF 1 -#define EXCTYPE_ABORTP 2 -#define EXCTYPE_ABORTD 3 -#define EXCTYPE_IRQ 4 -#define EXCTYPE_FIRQ 5 -#define EXCTYPE_SWI 6 -#define EXCTYPE_NOTASSGN 7 +#define EXCTYPE_UNDEF 1 +#define EXCTYPE_ABORTP 2 +#define EXCTYPE_ABORTD 3 +#define EXCTYPE_IRQ 4 +#define EXCTYPE_FIRQ 5 +#define EXCTYPE_SWI 6 +#define EXCTYPE_NOTASSGN 7 /* Link register adjustments for each exception: * These adjustments are used by the exception handler to establish the * address at which the exception occurred. */ -#define LRADJ_UNDEF 4 -#define LRADJ_ABORTP 4 -#define LRADJ_ABORTD 8 -#define LRADJ_IRQ 4 -#define LRADJ_FIRQ 4 -#define LRADJ_SWI 4 +#define LRADJ_UNDEF 4 +#define LRADJ_ABORTP 4 +#define LRADJ_ABORTD 8 +#define LRADJ_IRQ 4 +#define LRADJ_FIRQ 4 +#define LRADJ_SWI 4 -/* Vector numbers used by assign_handler and the mon_assignhandler() +/* Vector numbers used by assign_handler and the mon_assignhandler() * API function... */ #define VEC_RST 0 diff --git a/main/cpu/arm/cache_arm.c b/main/cpu/arm/cache_arm.c index cc471da..d33ac7c 100644 --- a/main/cpu/arm/cache_arm.c +++ b/main/cpu/arm/cache_arm.c @@ -30,7 +30,7 @@ * To "clean a cache" is to force a write of the dirty cache lines * from the cache out to main memory and clear the dirty bits in the * cache line. - * + * * This conflicts with uMon's general use of the terms "flush" and * "invalidate". For uMon, "flush" refers to what ARM calls "clean" * and "invalidate" refers to what ARM calls "flush". ARRGGHH!! @@ -43,35 +43,35 @@ int arm_cleanDcache(char *base, int size) { - return(0); + return(0); } int arm_flushIcache(char *base, int size) { - /* Flush (i.e. "invlidate in uMon terminology) entire instruction - * cache (ignore incoming args). - */ - asm(" MOV r0, #0"); - asm(" MCR p15, 0, r0, c7, c5, 0"); - return(0); + /* Flush (i.e. "invlidate in uMon terminology) entire instruction + * cache (ignore incoming args). + */ + asm(" MOV r0, #0"); + asm(" MCR p15, 0, r0, c7, c5, 0"); + return(0); } /* cacheInitForTarget(): - Enable instruction cache only... + Enable instruction cache only... */ void cacheInitForTarget() { - asm(" MRC p15, 0, r0, c1, c0, 0"); - asm(" ORR r0, r0, #0x1000"); /* bit 12 is ICACHE enable*/ - asm(" MCR p15, 0, r0, c1, c0, 0"); + asm(" MRC p15, 0, r0, c1, c0, 0"); + asm(" ORR r0, r0, #0x1000"); /* bit 12 is ICACHE enable*/ + asm(" MCR p15, 0, r0, c1, c0, 0"); - /* Flush instruction cache */ - arm_flushIcache(0,0); + /* Flush instruction cache */ + arm_flushIcache(0,0); - dcacheFlush = arm_cleanDcache; - icacheInvalidate = arm_flushIcache; + dcacheFlush = arm_cleanDcache; + icacheInvalidate = arm_flushIcache; } /* MRC/MCR assembler syntax (for ARM general): @@ -79,46 +79,46 @@ cacheInitForTarget() * <MCR|MRC>{cond} p#,<expression1>,Rd,cn,cm{,<expression2>} * * Where: - * - MRC move from coprocessor to ARM register (L=1) - * - MCR move from ARM register to coprocessor (L=0) - * - {cond} two character condition mnemonic (see list below) - * - p# the unique number of the required coprocessor - * - <expression1> evaluated to a constant and placed in the CP Opc field - * - Rd is an expression evaluating to a valid ARM processor register - * number - * - cn and cm are expressions evaluating to the valid coprocessor register - * numbers CRn and CRm respectively - * - <expression2> where present is evaluated to a constant and placed in - * the CP field + * - MRC move from coprocessor to ARM register (L=1) + * - MCR move from ARM register to coprocessor (L=0) + * - {cond} two character condition mnemonic (see list below) + * - p# the unique number of the required coprocessor + * - <expression1> evaluated to a constant and placed in the CP Opc field + * - Rd is an expression evaluating to a valid ARM processor register + * number + * - cn and cm are expressions evaluating to the valid coprocessor register + * numbers CRn and CRm respectively + * - <expression2> where present is evaluated to a constant and placed in + * the CP field * * Examples - * - MRC 2,5,R3,c5,c6 ;request coproc 2 to perform operation 5 - * ;on c5 and c6, and transfer the (single - * ;32-bit word) result back to R3 - * - MCR 6,0,R4,c6 ;request coproc 6 to perform operation 0 - * ;on R4 and place the result in c6 - * - MRCEQ 3,9,R3,c5,c6,2 ;conditionally request coproc 2 to - * ;perform - * ;operation 9 (type 2) on c5 and c6, and - * ;transfer the result back to R3 + * - MRC 2,5,R3,c5,c6 ;request coproc 2 to perform operation 5 + * ;on c5 and c6, and transfer the (single + * ;32-bit word) result back to R3 + * - MCR 6,0,R4,c6 ;request coproc 6 to perform operation 0 + * ;on R4 and place the result in c6 + * - MRCEQ 3,9,R3,c5,c6,2 ;conditionally request coproc 2 to + * ;perform + * ;operation 9 (type 2) on c5 and c6, and + * ;transfer the result back to R3 * * Condition codes: - * EQ (equal) - Z set - * NE (not equal) - Z clear - * CS (unsigned higher or same) - C set - * CC (unsigned lower) - C clear - * MI (negative) - N set - * PL (positive or zero) - N clear - * VS (overflow) - V set - * VC (no overflow) - V clear - * HI (unsigned higher) - C set and Z clear - * LS (unsigned lower or same) - C clear or Z set - * GE (greater or equal) - N set and V set, or N clear and V clear - * LT (less than) - N set and V clear, or N clear and V set - * GT (greater than) - Z clear, and either N set and Vset, - * or N clear and V clear - * LE (less than or equal) - Z set, or N set and V clear, - * or N clear and V set - * AL - always - * NV - never + * EQ (equal) - Z set + * NE (not equal) - Z clear + * CS (unsigned higher or same) - C set + * CC (unsigned lower) - C clear + * MI (negative) - N set + * PL (positive or zero) - N clear + * VS (overflow) - V set + * VC (no overflow) - V clear + * HI (unsigned higher) - C set and Z clear + * LS (unsigned lower or same) - C clear or Z set + * GE (greater or equal) - N set and V set, or N clear and V clear + * LT (less than) - N set and V clear, or N clear and V set + * GT (greater than) - Z clear, and either N set and Vset, + * or N clear and V clear + * LE (less than or equal) - Z set, or N set and V clear, + * or N clear and V set + * AL - always + * NV - never */ diff --git a/main/cpu/arm/except_arm.c b/main/cpu/arm/except_arm.c index f9e4f30..51230cc 100644 --- a/main/cpu/arm/except_arm.c +++ b/main/cpu/arm/except_arm.c @@ -33,7 +33,7 @@ #include "warmstart.h" ulong ExceptionAddr; -int ExceptionType; +int ExceptionType; /*********************************************************************** * @@ -43,9 +43,9 @@ int ExceptionType; void umon_exception(ulong addr, ulong type) { - ExceptionAddr = addr; - ExceptionType = type; - monrestart(EXCEPTION); + ExceptionAddr = addr; + ExceptionType = type; + monrestart(EXCEPTION); } /*********************************************************************** @@ -57,35 +57,35 @@ umon_exception(ulong addr, ulong type) char * ExceptionType2String(int type) { - char *string; + char *string; - switch(type) { - case EXCTYPE_UNDEF: - string = "Undefined instruction"; - break; - case EXCTYPE_ABORTP: - string = "Abort prefetch"; - break; - case EXCTYPE_ABORTD: - string = "Abort data"; - break; - case EXCTYPE_IRQ: - string = "IRQ"; - break; - case EXCTYPE_FIRQ: - string = "Fast IRQ"; - break; - case EXCTYPE_NOTASSGN: - string = "Not assigned"; - break; - case EXCTYPE_SWI: - string = "Software Interrupt"; - break; - default: - string = "???"; - break; - } - return(string); + switch(type) { + case EXCTYPE_UNDEF: + string = "Undefined instruction"; + break; + case EXCTYPE_ABORTP: + string = "Abort prefetch"; + break; + case EXCTYPE_ABORTD: + string = "Abort data"; + break; + case EXCTYPE_IRQ: + string = "IRQ"; + break; + case EXCTYPE_FIRQ: + string = "Fast IRQ"; + break; + case EXCTYPE_NOTASSGN: + string = "Not assigned"; + break; + case EXCTYPE_SWI: + string = "Software Interrupt"; + break; + default: + string = "???"; + break; + } + return(string); } void diff --git a/main/cpu/arm/gdbregs_arm.c b/main/cpu/arm/gdbregs_arm.c index 11953a9..0f48aa3 100644 --- a/main/cpu/arm/gdbregs_arm.c +++ b/main/cpu/arm/gdbregs_arm.c @@ -27,10 +27,10 @@ * Original author: Ed Sutter (ed.sutter@alcatel-lucent.com) * */ -#define CPU_PC_REG "PC" +#define CPU_PC_REG "PC" static char *gdb_regtbl[] = { - "R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7", - "R8", "R9", "R10", "R11", "R12", "R13", "R14", "PC", - "R0", "CPSR", + "R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7", + "R8", "R9", "R10", "R11", "R12", "R13", "R14", "PC", + "R0", "CPSR", }; diff --git a/main/cpu/arm/ldatags.c b/main/cpu/arm/ldatags.c index f647f2d..8565742 100644 --- a/main/cpu/arm/ldatags.c +++ b/main/cpu/arm/ldatags.c @@ -33,25 +33,25 @@ #include "tfs.h" #include "tfsprivate.h" -#define __PACKED__ __attribute__ ((packed)) -#define TAG_SIZE(a) ((sizeof(a) + sizeof(struct tag_hdr))/4) -#define STR_LEN(string) (sizeof(string) - 1) - -#define MEM32_SIZE "mem32_size=" -#define MEM32_START "mem32_start=" -#define CORE_FLAGS "core_flags=" -#define CORE_PGSIZE "core_pgsize=" -#define CORE_ROOTDEV "core_rootdev=" -#define INITRD_SIZE "initrd_size=" -#define INITRD_START "initrd_start=" -#define RAMDISK_FLAGS "ramdisk_flags=" -#define RAMDISK_SIZE "ramdisk_size=" -#define RAMDISK_START "ramdisk_start=" -#define SERIAL_HI "serial_hi=" -#define SERIAL_LO "serial_lo=" -#define CMDLINE "cmdline=" -#define CMDLINE_APP "cmdline_append=" -#define REVISION "revision=" +#define __PACKED__ __attribute__ ((packed)) +#define TAG_SIZE(a) ((sizeof(a) + sizeof(struct tag_hdr))/4) +#define STR_LEN(string) (sizeof(string) - 1) + +#define MEM32_SIZE "mem32_size=" +#define MEM32_START "mem32_start=" +#define CORE_FLAGS "core_flags=" +#define CORE_PGSIZE "core_pgsize=" +#define CORE_ROOTDEV "core_rootdev=" +#define INITRD_SIZE "initrd_size=" +#define INITRD_START "initrd_start=" +#define RAMDISK_FLAGS "ramdisk_flags=" +#define RAMDISK_SIZE "ramdisk_size=" +#define RAMDISK_START "ramdisk_start=" +#define SERIAL_HI "serial_hi=" +#define SERIAL_LO "serial_lo=" +#define CMDLINE "cmdline=" +#define CMDLINE_APP "cmdline_append=" +#define REVISION "revision=" void sno_mac_warning(int); void initrd_file_warning(int); @@ -60,382 +60,376 @@ void initrd_file_warning(int); extern int atag_space, end_atag_space; #endif -#define CLISIZE 1024 +#define CLISIZE 1024 /* Tag specification defaults: */ -#define RAMDISK_MAJOR 1 -#define PAGE_SIZE 4096 -#define PHYS_OFFSET 0x20000000 -#define MEM_SIZE 0x01e00000 +#define RAMDISK_MAJOR 1 +#define PAGE_SIZE 4096 +#define PHYS_OFFSET 0x20000000 +#define MEM_SIZE 0x01e00000 /* Tag identifiers: */ -#define ATAG_NONE 0x00000000 -#define ATAG_CORE 0x54410001 -#define ATAG_MEM 0x54410002 -#define ATAG_VIDEOTEXT 0x54410003 -#define ATAG_RAMDISK 0x54410004 -#define ATAG_INITRD 0x54410005 -#define ATAG_INITRD2 0x54420005 -#define ATAG_SERIAL 0x54410006 -#define ATAG_REVISION 0x54410007 -#define ATAG_VIDEOLFB 0x54410008 -#define ATAG_CMDLINE 0x54410009 -#define ATAG_ACORN 0x41000101 -#define ATAG_MEMCLK 0x41000402 -#define ATAG_SNOMAC ATAG_SERIAL +#define ATAG_NONE 0x00000000 +#define ATAG_CORE 0x54410001 +#define ATAG_MEM 0x54410002 +#define ATAG_VIDEOTEXT 0x54410003 +#define ATAG_RAMDISK 0x54410004 +#define ATAG_INITRD 0x54410005 +#define ATAG_INITRD2 0x54420005 +#define ATAG_SERIAL 0x54410006 +#define ATAG_REVISION 0x54410007 +#define ATAG_VIDEOLFB 0x54410008 +#define ATAG_CMDLINE 0x54410009 +#define ATAG_ACORN 0x41000101 +#define ATAG_MEMCLK 0x41000402 +#define ATAG_SNOMAC ATAG_SERIAL /* Tag structures: */ struct tag_hdr { - ulong size; - ulong tag; -}__PACKED__; + ulong size; + ulong tag; +} __PACKED__; struct tag_core { - ulong flags; - ulong pgsize; - ulong rootdev; -}__PACKED__; + ulong flags; + ulong pgsize; + ulong rootdev; +} __PACKED__; struct tag_mem32 { - ulong size; - ulong start; -}__PACKED__; + ulong size; + ulong start; +} __PACKED__; union tag_snomac { - struct tag_serial { - ulong hi; - ulong lo; - } serial; - struct tag_mac { - char mac[8]; /* only use first 6 bytes */ - } mac; -}__PACKED__; + struct tag_serial { + ulong hi; + ulong lo; + } serial; + struct tag_mac { + char mac[8]; /* only use first 6 bytes */ + } mac; +} __PACKED__; struct tag_initrd { - ulong start; - ulong size; -}__PACKED__; + ulong start; + ulong size; +} __PACKED__; struct tag_ramdisk { - ulong flags; - ulong size; - ulong start; -}__PACKED__; + ulong flags; + ulong size; + ulong start; +} __PACKED__; struct tag_cmdline { - char cmdline[CLISIZE]; -}__PACKED__; + char cmdline[CLISIZE]; +} __PACKED__; struct tag_revno { - ulong rev; -}__PACKED__; + ulong rev; +} __PACKED__; struct init_tags { - struct tag_hdr hdr1; - struct tag_core core; - struct tag_hdr hdr2; - struct tag_mem32 mem; - struct tag_hdr hdr3; - union tag_snomac snomac; - struct tag_hdr hdr4; - struct tag_ramdisk ramdisk; - struct tag_hdr hdr5; - struct tag_initrd initrd; - struct tag_hdr hdr6; - struct tag_cmdline cmdline; - struct tag_hdr hdr7; - struct tag_revno revno; - struct tag_hdr hdr_last; -}__PACKED__; + struct tag_hdr hdr1; + struct tag_core core; + struct tag_hdr hdr2; + struct tag_mem32 mem; + struct tag_hdr hdr3; + union tag_snomac snomac; + struct tag_hdr hdr4; + struct tag_ramdisk ramdisk; + struct tag_hdr hdr5; + struct tag_initrd initrd; + struct tag_hdr hdr6; + struct tag_cmdline cmdline; + struct tag_hdr hdr7; + struct tag_revno revno; + struct tag_hdr hdr_last; +} __PACKED__; /* This is the default tag list. All entries in this list can * be overridden by sub-commands within the ldatags command. */ static struct init_tags inittag = { - { TAG_SIZE(struct tag_core), ATAG_CORE }, - { 1, PAGE_SIZE, 0xff }, + { TAG_SIZE(struct tag_core), ATAG_CORE }, + { 1, PAGE_SIZE, 0xff }, - { TAG_SIZE(struct tag_mem32), ATAG_MEM }, - { MEM_SIZE, PHYS_OFFSET }, + { TAG_SIZE(struct tag_mem32), ATAG_MEM }, + { MEM_SIZE, PHYS_OFFSET }, - { TAG_SIZE(union tag_snomac), ATAG_SNOMAC }, - { {0xffffffff, 0xffffffff} }, + { TAG_SIZE(union tag_snomac), ATAG_SNOMAC }, + { {0xffffffff, 0xffffffff} }, - { TAG_SIZE(struct tag_ramdisk), ATAG_RAMDISK }, - { 0, 0, 0 }, + { TAG_SIZE(struct tag_ramdisk), ATAG_RAMDISK }, + { 0, 0, 0 }, - { TAG_SIZE(struct tag_initrd), ATAG_INITRD2 }, - { 0, 0 }, + { TAG_SIZE(struct tag_initrd), ATAG_INITRD2 }, + { 0, 0 }, - { TAG_SIZE(struct tag_cmdline), ATAG_CMDLINE }, - { {0} }, + { TAG_SIZE(struct tag_cmdline), ATAG_CMDLINE }, + { {0} }, - { TAG_SIZE(struct tag_revno), ATAG_REVISION }, - { 0 }, + { TAG_SIZE(struct tag_revno), ATAG_REVISION }, + { 0 }, - { 0, ATAG_NONE }, + { 0, ATAG_NONE }, }; char *ldatagsHelp[] = { - "Install ARM tags for Linux startup.", - "[-a:cf:imv] [sub-cmd1 sub-cmd2 ...]", - "Options:", - " -a {addr} tag list address", - " -c clear tag list memory", - " -f {fname} initrd filename", - " -i init default tag list", - " -m load MAC address into serial_no tag", - " -v enable verbosity", - "Sub-commands:", - " " CORE_FLAGS "{value}", - " " CORE_PGSIZE "{value}", - " " CORE_ROOTDEV "{value}", - " " MEM32_SIZE "{value}", - " " MEM32_START "{value}", - " " SERIAL_LO "{value} (serial hi/lo overrides -m)", - " " SERIAL_HI "{value}", - " " INITRD_SIZE "{value} (initrd size/start overrides -f)", - " " INITRD_START "{value}", - " " RAMDISK_FLAGS "{value}", - " " RAMDISK_SIZE "{value}", - " " RAMDISK_START "{value}", - " " REVISION "{value}", - " " CMDLINE "{string}", - " " CMDLINE_APP "{string}", - 0 + "Install ARM tags for Linux startup.", + "[-a:cf:imv] [sub-cmd1 sub-cmd2 ...]", + "Options:", + " -a {addr} tag list address", + " -c clear tag list memory", + " -f {fname} initrd filename", + " -i init default tag list", + " -m load MAC address into serial_no tag", + " -v enable verbosity", + "Sub-commands:", + " " CORE_FLAGS "{value}", + " " CORE_PGSIZE "{value}", + " " CORE_ROOTDEV "{value}", + " " MEM32_SIZE "{value}", + " " MEM32_START "{value}", + " " SERIAL_LO "{value} (serial hi/lo overrides -m)", + " " SERIAL_HI "{value}", + " " INITRD_SIZE "{value} (initrd size/start overrides -f)", + " " INITRD_START "{value}", + " " RAMDISK_FLAGS "{value}", + " " RAMDISK_SIZE "{value}", + " " RAMDISK_START "{value}", + " " REVISION "{value}", + " " CMDLINE "{string}", + " " CMDLINE_APP "{string}", + 0 }; int ldatags(int argc,char *argv[]) { - TFILE *tfp; - char *eadd, *initrd_fname; - struct init_tags *tagaddr; - int opt, verbose, arg, clear, init, mac, len; - int sno_mac_warned, initrd_file_warned; - - initrd_fname = 0; - sno_mac_warned = initrd_file_warned = 0; - mac = init = verbose = clear = 0; + TFILE *tfp; + char *eadd, *initrd_fname; + struct init_tags *tagaddr; + int opt, verbose, arg, clear, init, mac, len; + int sno_mac_warned, initrd_file_warned; + + initrd_fname = 0; + sno_mac_warned = initrd_file_warned = 0; + mac = init = verbose = clear = 0; #ifdef ATAG_SPACE_DEFINED - tagaddr = (struct init_tags *)&atag_space; + tagaddr = (struct init_tags *)&atag_space; #else - tagaddr = (struct init_tags *)getAppRamStart(); + tagaddr = (struct init_tags *)getAppRamStart(); #endif - while((opt=getopt(argc,argv,"a:cf:imv")) != -1) { - switch(opt) { - case 'a': /* Override default tag list address. */ - tagaddr = (struct init_tags *)strtoul(optarg,0,0); - break; - case 'c': /* Clear the tag list space. */ - clear++; - break; - case 'f': /* Initrd filename. */ - initrd_fname = optarg; - break; - case 'i': /* Initialize tag list with defaults. */ - init++; - break; - case 'm': /* Load MAC address into list. */ - mac++; - break; - case 'v': /* Enable verbosity. */ - verbose++; - break; - default: - return(CMD_PARAM_ERROR); - } - } + while((opt=getopt(argc,argv,"a:cf:imv")) != -1) { + switch(opt) { + case 'a': /* Override default tag list address. */ + tagaddr = (struct init_tags *)strtoul(optarg,0,0); + break; + case 'c': /* Clear the tag list space. */ + clear++; + break; + case 'f': /* Initrd filename. */ + initrd_fname = optarg; + break; + case 'i': /* Initialize tag list with defaults. */ + init++; + break; + case 'm': /* Load MAC address into list. */ + mac++; + break; + case 'v': /* Enable verbosity. */ + verbose++; + break; + default: + return(CMD_PARAM_ERROR); + } + } #ifdef ATAG_SPACE_DEFINED - /* If the ATAG space is allocated externally (usually in rom.lnk file), - * then if at this point the tag address still points to that space, - * we must start by verifying that the allocated space is large enough - * to hold the init_tags structure... - */ - if (tagaddr == (struct init_tags *)&atag_space) { - if (((int)&end_atag_space - (int)&atag_space) < sizeof(struct init_tags)) { - printf("Error: the size of struct init_tags (%d) is larger than\n", - sizeof(struct init_tags)); - printf(" the size of the allocated atag space (%d bytes).\n", - ((int)&end_atag_space - (int)&atag_space)); - return(CMD_FAILURE); - } - } + /* If the ATAG space is allocated externally (usually in rom.lnk file), + * then if at this point the tag address still points to that space, + * we must start by verifying that the allocated space is large enough + * to hold the init_tags structure... + */ + if(tagaddr == (struct init_tags *)&atag_space) { + if(((int)&end_atag_space - (int)&atag_space) < sizeof(struct init_tags)) { + printf("Error: the size of struct init_tags (%d) is larger than\n", + sizeof(struct init_tags)); + printf(" the size of the allocated atag space (%d bytes).\n", + ((int)&end_atag_space - (int)&atag_space)); + return(CMD_FAILURE); + } + } #endif - if (clear) { - memset((char *)tagaddr,0,sizeof(struct init_tags)); - if (verbose) - printf("Tagspace at 0x%lx cleared\n",(long)tagaddr); - return(CMD_SUCCESS); - } - - /* If -i specified, then load default tag list for starters... - */ - if (init) - memcpy((char *)tagaddr,(char *)&inittag,sizeof(struct init_tags)); - - /* Insert this board's MAC address: - */ - if (mac) { - memset(tagaddr->snomac.mac.mac,0,8); - eadd = getenv("ETHERADD"); - if (eadd) { - if (EtherToBin(eadd,(uchar *)tagaddr->snomac.mac.mac) < 0) - return(CMD_FAILURE); - } - else { - printf("ETHERADD shell var not set.\n"); - return(CMD_FAILURE); - } - } - - if (initrd_fname) { - tfp = tfsstat(initrd_fname); - if (!tfp) { - printf("No such file: %s\n",initrd_fname); - return(CMD_FAILURE); - } - tagaddr->initrd.size = (ulong)TFS_SIZE(tfp); - tagaddr->initrd.start = (ulong)TFS_BASE(tfp); - } - - /* Process the command line arguments: - */ - for(arg=optind;arg<argc;arg++) { - if (strncmp(argv[arg],CORE_FLAGS,STR_LEN(CORE_FLAGS)) == 0) { - tagaddr->core.flags = - strtoul(argv[arg]+STR_LEN(CORE_FLAGS),0,0); - } - else if (strncmp(argv[arg],CORE_PGSIZE,STR_LEN(CORE_PGSIZE)) == 0) { - tagaddr->core.pgsize = - strtoul(argv[arg]+STR_LEN(CORE_PGSIZE),0,0); - } - else if (strncmp(argv[arg],CORE_ROOTDEV,STR_LEN(CORE_ROOTDEV)) == 0) { - tagaddr->core.rootdev = - strtoul(argv[arg]+STR_LEN(CORE_ROOTDEV),0,0); - } - else if (strncmp(argv[arg],MEM32_SIZE,STR_LEN(MEM32_SIZE)) == 0) { - tagaddr->mem.size = - strtoul(argv[arg]+STR_LEN(MEM32_SIZE),0,0); - } - else if (strncmp(argv[arg],MEM32_START,STR_LEN(MEM32_START)) == 0) { - tagaddr->mem.start = - strtoul(argv[arg]+STR_LEN(MEM32_START),0,0); - } - else if (strncmp(argv[arg],INITRD_SIZE,STR_LEN(INITRD_SIZE)) == 0) { - if (initrd_fname) - initrd_file_warning(initrd_file_warned++); - tagaddr->initrd.size = - strtoul(argv[arg]+STR_LEN(INITRD_SIZE),0,0); - } - else if (strncmp(argv[arg],INITRD_START,STR_LEN(INITRD_START)) == 0) { - if (initrd_fname) - initrd_file_warning(initrd_file_warned++); - tagaddr->initrd.start = - strtoul(argv[arg]+STR_LEN(INITRD_START),0,0); - } - else if (strncmp(argv[arg],RAMDISK_FLAGS,STR_LEN(RAMDISK_FLAGS)) == 0) { - tagaddr->ramdisk.flags = - strtoul(argv[arg]+STR_LEN(RAMDISK_FLAGS),0,0); - } - else if (strncmp(argv[arg],RAMDISK_SIZE,STR_LEN(RAMDISK_SIZE)) == 0) { - tagaddr->ramdisk.size = - strtoul(argv[arg]+STR_LEN(RAMDISK_SIZE),0,0); - } - else if (strncmp(argv[arg],RAMDISK_START,STR_LEN(RAMDISK_START)) == 0) { - tagaddr->ramdisk.start = - strtoul(argv[arg]+STR_LEN(RAMDISK_START),0,0); - } - else if (strncmp(argv[arg],SERIAL_HI,STR_LEN(SERIAL_HI)) == 0) { - if (mac) - sno_mac_warning(sno_mac_warned++); - mac = 0; - tagaddr->snomac.serial.hi = - strtoul(argv[arg]+STR_LEN(SERIAL_HI),0,0); - } - else if (strncmp(argv[arg],SERIAL_LO,STR_LEN(SERIAL_LO)) == 0) { - if (mac) - sno_mac_warning(sno_mac_warned++); - mac = 0; - tagaddr->snomac.serial.lo = - strtoul(argv[arg]+STR_LEN(SERIAL_LO),0,0); - } - else if (strncmp(argv[arg],CMDLINE,STR_LEN(CMDLINE)) == 0) { - len = strlen(argv[arg]+STR_LEN(CMDLINE)); - if (len > CLISIZE-1) - printf("Kernel cli too big (%d>%d)\n",len,CLISIZE); - else - strcpy(tagaddr->cmdline.cmdline,argv[arg]+STR_LEN(CMDLINE)); - } - else if (strncmp(argv[arg],CMDLINE_APP,STR_LEN(CMDLINE_APP)) == 0) { - len = strlen(argv[arg]+STR_LEN(CMDLINE_APP)); - len += strlen(tagaddr->cmdline.cmdline); - if (len > CLISIZE-1) - printf("Kernel cli too big (%d>%d)\n",len,CLISIZE); - else - strcat(tagaddr->cmdline.cmdline,argv[arg]+STR_LEN(CMDLINE_APP)); - } - else if (strncmp(argv[arg],REVISION,STR_LEN(REVISION)) == 0) { - tagaddr->revno.rev = - strtoul(argv[arg]+STR_LEN(REVISION),0,0); - } - else { - printf("Unrecognized sub-command: %s\n",argv[arg]); - return(CMD_FAILURE); - } - } - - if (verbose) { - printf("ATAGS (%d bytes) at 0x%lx...\n", - sizeof(struct init_tags),(long)tagaddr); - printf(" Core (flags/pgsize/rootdev) = 0x%lx/0x%0lx/0x%lx\n", - tagaddr->core.flags,tagaddr->core.pgsize,tagaddr->core.rootdev); - printf(" Mem32 (size/offset) = 0x%08lx/0x%08lx\n", - tagaddr->mem.size,tagaddr->mem.start); - if (mac) { - printf(" Mac = %02x:%02x:%02x:%02x:%02x:%02x\n", - tagaddr->snomac.mac.mac[0], tagaddr->snomac.mac.mac[1], - tagaddr->snomac.mac.mac[2], tagaddr->snomac.mac.mac[3], - tagaddr->snomac.mac.mac[4], tagaddr->snomac.mac.mac[5]); - } - else { - printf(" Serial (hi/lo) = 0x%08lx/0x%08lx\n", - tagaddr->snomac.serial.hi, tagaddr->snomac.serial.lo); - } - printf(" Ramdisk (flags/size/start) = 0x%lx/0x%lx/0x%lx\n", - tagaddr->ramdisk.flags, tagaddr->ramdisk.size, - tagaddr->ramdisk.start); - - printf(" Initrd (size/start) = 0x%lx/0x%lx\n", - tagaddr->initrd.size, tagaddr->initrd.start); - - printf(" Cmdline = <%s>\n",tagaddr->cmdline.cmdline); - } - - return(CMD_SUCCESS); + if(clear) { + memset((char *)tagaddr,0,sizeof(struct init_tags)); + if(verbose) { + printf("Tagspace at 0x%lx cleared\n",(long)tagaddr); + } + return(CMD_SUCCESS); + } + + /* If -i specified, then load default tag list for starters... + */ + if(init) { + memcpy((char *)tagaddr,(char *)&inittag,sizeof(struct init_tags)); + } + + /* Insert this board's MAC address: + */ + if(mac) { + memset(tagaddr->snomac.mac.mac,0,8); + eadd = getenv("ETHERADD"); + if(eadd) { + if(EtherToBin(eadd,(uchar *)tagaddr->snomac.mac.mac) < 0) { + return(CMD_FAILURE); + } + } else { + printf("ETHERADD shell var not set.\n"); + return(CMD_FAILURE); + } + } + + if(initrd_fname) { + tfp = tfsstat(initrd_fname); + if(!tfp) { + printf("No such file: %s\n",initrd_fname); + return(CMD_FAILURE); + } + tagaddr->initrd.size = (ulong)TFS_SIZE(tfp); + tagaddr->initrd.start = (ulong)TFS_BASE(tfp); + } + + /* Process the command line arguments: + */ + for(arg=optind; arg<argc; arg++) { + if(strncmp(argv[arg],CORE_FLAGS,STR_LEN(CORE_FLAGS)) == 0) { + tagaddr->core.flags = + strtoul(argv[arg]+STR_LEN(CORE_FLAGS),0,0); + } else if(strncmp(argv[arg],CORE_PGSIZE,STR_LEN(CORE_PGSIZE)) == 0) { + tagaddr->core.pgsize = + strtoul(argv[arg]+STR_LEN(CORE_PGSIZE),0,0); + } else if(strncmp(argv[arg],CORE_ROOTDEV,STR_LEN(CORE_ROOTDEV)) == 0) { + tagaddr->core.rootdev = + strtoul(argv[arg]+STR_LEN(CORE_ROOTDEV),0,0); + } else if(strncmp(argv[arg],MEM32_SIZE,STR_LEN(MEM32_SIZE)) == 0) { + tagaddr->mem.size = + strtoul(argv[arg]+STR_LEN(MEM32_SIZE),0,0); + } else if(strncmp(argv[arg],MEM32_START,STR_LEN(MEM32_START)) == 0) { + tagaddr->mem.start = + strtoul(argv[arg]+STR_LEN(MEM32_START),0,0); + } else if(strncmp(argv[arg],INITRD_SIZE,STR_LEN(INITRD_SIZE)) == 0) { + if(initrd_fname) { + initrd_file_warning(initrd_file_warned++); + } + tagaddr->initrd.size = + strtoul(argv[arg]+STR_LEN(INITRD_SIZE),0,0); + } else if(strncmp(argv[arg],INITRD_START,STR_LEN(INITRD_START)) == 0) { + if(initrd_fname) { + initrd_file_warning(initrd_file_warned++); + } + tagaddr->initrd.start = + strtoul(argv[arg]+STR_LEN(INITRD_START),0,0); + } else if(strncmp(argv[arg],RAMDISK_FLAGS,STR_LEN(RAMDISK_FLAGS)) == 0) { + tagaddr->ramdisk.flags = + strtoul(argv[arg]+STR_LEN(RAMDISK_FLAGS),0,0); + } else if(strncmp(argv[arg],RAMDISK_SIZE,STR_LEN(RAMDISK_SIZE)) == 0) { + tagaddr->ramdisk.size = + strtoul(argv[arg]+STR_LEN(RAMDISK_SIZE),0,0); + } else if(strncmp(argv[arg],RAMDISK_START,STR_LEN(RAMDISK_START)) == 0) { + tagaddr->ramdisk.start = + strtoul(argv[arg]+STR_LEN(RAMDISK_START),0,0); + } else if(strncmp(argv[arg],SERIAL_HI,STR_LEN(SERIAL_HI)) == 0) { + if(mac) { + sno_mac_warning(sno_mac_warned++); + } + mac = 0; + tagaddr->snomac.serial.hi = + strtoul(argv[arg]+STR_LEN(SERIAL_HI),0,0); + } else if(strncmp(argv[arg],SERIAL_LO,STR_LEN(SERIAL_LO)) == 0) { + if(mac) { + sno_mac_warning(sno_mac_warned++); + } + mac = 0; + tagaddr->snomac.serial.lo = + strtoul(argv[arg]+STR_LEN(SERIAL_LO),0,0); + } else if(strncmp(argv[arg],CMDLINE,STR_LEN(CMDLINE)) == 0) { + len = strlen(argv[arg]+STR_LEN(CMDLINE)); + if(len > CLISIZE-1) { + printf("Kernel cli too big (%d>%d)\n",len,CLISIZE); + } else { + strcpy(tagaddr->cmdline.cmdline,argv[arg]+STR_LEN(CMDLINE)); + } + } else if(strncmp(argv[arg],CMDLINE_APP,STR_LEN(CMDLINE_APP)) == 0) { + len = strlen(argv[arg]+STR_LEN(CMDLINE_APP)); + len += strlen(tagaddr->cmdline.cmdline); + if(len > CLISIZE-1) { + printf("Kernel cli too big (%d>%d)\n",len,CLISIZE); + } else { + strcat(tagaddr->cmdline.cmdline,argv[arg]+STR_LEN(CMDLINE_APP)); + } + } else if(strncmp(argv[arg],REVISION,STR_LEN(REVISION)) == 0) { + tagaddr->revno.rev = + strtoul(argv[arg]+STR_LEN(REVISION),0,0); + } else { + printf("Unrecognized sub-command: %s\n",argv[arg]); + return(CMD_FAILURE); + } + } + + if(verbose) { + printf("ATAGS (%d bytes) at 0x%lx...\n", + sizeof(struct init_tags),(long)tagaddr); + printf(" Core (flags/pgsize/rootdev) = 0x%lx/0x%0lx/0x%lx\n", + tagaddr->core.flags,tagaddr->core.pgsize,tagaddr->core.rootdev); + printf(" Mem32 (size/offset) = 0x%08lx/0x%08lx\n", + tagaddr->mem.size,tagaddr->mem.start); + if(mac) { + printf(" Mac = %02x:%02x:%02x:%02x:%02x:%02x\n", + tagaddr->snomac.mac.mac[0], tagaddr->snomac.mac.mac[1], + tagaddr->snomac.mac.mac[2], tagaddr->snomac.mac.mac[3], + tagaddr->snomac.mac.mac[4], tagaddr->snomac.mac.mac[5]); + } else { + printf(" Serial (hi/lo) = 0x%08lx/0x%08lx\n", + tagaddr->snomac.serial.hi, tagaddr->snomac.serial.lo); + } + printf(" Ramdisk (flags/size/start) = 0x%lx/0x%lx/0x%lx\n", + tagaddr->ramdisk.flags, tagaddr->ramdisk.size, + tagaddr->ramdisk.start); + + printf(" Initrd (size/start) = 0x%lx/0x%lx\n", + tagaddr->initrd.size, tagaddr->initrd.start); + + printf(" Cmdline = <%s>\n",tagaddr->cmdline.cmdline); + } + + return(CMD_SUCCESS); } void sno_mac_warning(int already_warned) { - if (already_warned) - return; + if(already_warned) { + return; + } - printf("Warning: serialno command overrides -m option.\n"); + printf("Warning: serialno command overrides -m option.\n"); } void initrd_file_warning(int already_warned) { - if (already_warned) - return; + if(already_warned) { + return; + } - printf("Warning: initrd command overrides -f option.\n"); + printf("Warning: initrd command overrides -f option.\n"); } diff --git a/main/cpu/arm/misc_arm.c b/main/cpu/arm/misc_arm.c index 355245c..e43ea0a 100644 --- a/main/cpu/arm/misc_arm.c +++ b/main/cpu/arm/misc_arm.c @@ -32,10 +32,10 @@ void putpsr(unsigned long psr) { - volatile unsigned register reg; + volatile unsigned register reg; - reg = psr; - asm volatile ("msr CPSR_c, %0" : "=r" (reg)); + reg = psr; + asm volatile("msr CPSR_c, %0" : "=r"(reg)); } /* @@ -46,9 +46,9 @@ putpsr(unsigned long psr) unsigned long getpsr(void) { - volatile unsigned register reg; - asm volatile ("mrs %0, CPSR" : "=r" (reg)); - return(reg); + volatile unsigned register reg; + asm volatile("mrs %0, CPSR" : "=r"(reg)); + return(reg); } /* getsp(): @@ -58,7 +58,7 @@ getpsr(void) unsigned long getsp(void) { - volatile unsigned register reg; - asm volatile ("mov %0, r13" : "=r" (reg)); - return(reg); + volatile unsigned register reg; + asm volatile("mov %0, r13" : "=r"(reg)); + return(reg); } diff --git a/main/cpu/arm/regs_arm.c b/main/cpu/arm/regs_arm.c index 13180f0..b88d315 100644 --- a/main/cpu/arm/regs_arm.c +++ b/main/cpu/arm/regs_arm.c @@ -26,7 +26,7 @@ * */ static char *regnames[] = { - "R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7", - "R8", "R9", "R10", "R11", "R12", "SP", "LR", - "PC", "CPSR" + "R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7", + "R8", "R9", "R10", "R11", "R12", "SP", "LR", + "PC", "CPSR" }; diff --git a/main/cpu/arm/strace_arm.c b/main/cpu/arm/strace_arm.c index 8dd7456..f74b82e 100644 --- a/main/cpu/arm/strace_arm.c +++ b/main/cpu/arm/strace_arm.c @@ -53,104 +53,111 @@ char *StraceHelp[] = { int Strace(int argc,char *argv[]) { - TFILE *tfp; - char *symfile, *stopat, fname[64]; - ulong *framepointer, pc, fp, offset; - int tfd, opt, maxdepth, pass, verbose; - - tfd = fp = 0; - maxdepth = 20; - verbose = 0; - stopat = 0; - pc = ExceptionAddr; - while ((opt=getopt(argc,argv,"d:rs:v")) != -1) { - switch(opt) { - case 'd': - maxdepth = atoi(optarg); - break; - case 'r': - showregs(); - break; - case 's': - stopat = optarg; - break; - case 'v': - verbose = 1; - break; - default: - return(0); - } - } - - if (!fp) - getreg("R11", &fp); - - framepointer = (ulong *)fp; - - /* Start by detecting the presence of a symbol table file... */ - symfile = getenv("SYMFILE"); - if (!symfile) - symfile = SYMFILE; - - tfp = tfsstat(symfile); - if (tfp) { - tfd = tfsopen(symfile,TFS_RDONLY,0); - if (tfd < 0) - tfp = (TFILE *)0; - } - - /* Show current position: */ - printf(" 0x%08lx",pc); - if (tfp) { - AddrToSym(tfd,pc,fname,&offset); - printf(": %s()",fname); - if (offset) - printf(" + 0x%lx",offset); - } - putchar('\n'); - - /* Now step through the stack frame... */ - pass = 0; - while(maxdepth) { - if (pass != 0) - framepointer = (ulong *)*(framepointer - 3); - - pc = *(framepointer - 1); - - if (verbose) { - printf("fp=0x%lx,*fp=0x%lx,pc=%lx\n", (ulong)framepointer, - (ulong)*framepointer,pc); - } - - if (((ulong)framepointer & 3) || (!framepointer) || - (!*framepointer) || (!pc)) { - break; - } - - printf(" 0x%08lx",pc); - if (tfp) { - int match; - - match = AddrToSym(tfd,pc,fname,&offset); - printf(": %s()",fname); - if (offset) - printf(" + 0x%lx",offset); - if ((!match) || ((stopat != 0) && (strcmp(fname,stopat) == 0))) { - putchar('\n'); - break; - } - } - putchar('\n'); - maxdepth--; - pass++; - } - - if (!maxdepth) - printf("Max depth termination\n"); - - if (tfp) { - tfsclose(tfd,0); - } + TFILE *tfp; + char *symfile, *stopat, fname[64]; + ulong *framepointer, pc, fp, offset; + int tfd, opt, maxdepth, pass, verbose; + + tfd = fp = 0; + maxdepth = 20; + verbose = 0; + stopat = 0; + pc = ExceptionAddr; + while((opt=getopt(argc,argv,"d:rs:v")) != -1) { + switch(opt) { + case 'd': + maxdepth = atoi(optarg); + break; + case 'r': + showregs(); + break; + case 's': + stopat = optarg; + break; + case 'v': + verbose = 1; + break; + default: + return(0); + } + } + + if(!fp) { + getreg("R11", &fp); + } + + framepointer = (ulong *)fp; + + /* Start by detecting the presence of a symbol table file... */ + symfile = getenv("SYMFILE"); + if(!symfile) { + symfile = SYMFILE; + } + + tfp = tfsstat(symfile); + if(tfp) { + tfd = tfsopen(symfile,TFS_RDONLY,0); + if(tfd < 0) { + tfp = (TFILE *)0; + } + } + + /* Show current position: */ + printf(" 0x%08lx",pc); + if(tfp) { + AddrToSym(tfd,pc,fname,&offset); + printf(": %s()",fname); + if(offset) { + printf(" + 0x%lx",offset); + } + } + putchar('\n'); + + /* Now step through the stack frame... */ + pass = 0; + while(maxdepth) { + if(pass != 0) { + framepointer = (ulong *)*(framepointer - 3); + } + + pc = *(framepointer - 1); + + if(verbose) { + printf("fp=0x%lx,*fp=0x%lx,pc=%lx\n", (ulong)framepointer, + (ulong)*framepointer,pc); + } + + if(((ulong)framepointer & 3) || (!framepointer) || + (!*framepointer) || (!pc)) { + break; + } + + printf(" 0x%08lx",pc); + if(tfp) { + int match; + + match = AddrToSym(tfd,pc,fname,&offset); + printf(": %s()",fname); + if(offset) { + printf(" + 0x%lx",offset); + } + if((!match) || ((stopat != 0) && (strcmp(fname,stopat) == 0))) { + putchar('\n'); + break; + } + } + putchar('\n'); + maxdepth--; + pass++; + } + + if(!maxdepth) { + printf("Max depth termination\n"); + } + + if(tfp) { + tfsclose(tfd,0); + } return(0); } #endif diff --git a/main/cpu/arm/vectors_arm.S b/main/cpu/arm/vectors_arm.S index c4389ed..54d9ef2 100644 --- a/main/cpu/arm/vectors_arm.S +++ b/main/cpu/arm/vectors_arm.S @@ -29,37 +29,37 @@ #include "arm.h" - .global undefined_instruction +.global undefined_instruction undefined_instruction: - mov r1, #EXCTYPE_UNDEF - b umon_exception +mov r1, #EXCTYPE_UNDEF +b umon_exception - .global software_interrupt +.global software_interrupt software_interrupt: - mov r1, #EXCTYPE_SWI - b umon_exception +mov r1, #EXCTYPE_SWI +b umon_exception - .global abort_prefetch +.global abort_prefetch abort_prefetch: - mov r1, #EXCTYPE_ABORTP - b umon_exception +mov r1, #EXCTYPE_ABORTP +b umon_exception - .global abort_data +.global abort_data abort_data: - mov r1, #EXCTYPE_ABORTD - b umon_exception +mov r1, #EXCTYPE_ABORTD +b umon_exception - .global not_assigned +.global not_assigned not_assigned: - mov r1, #EXCTYPE_NOTASSGN - b umon_exception +mov r1, #EXCTYPE_NOTASSGN +b umon_exception - .global interrupt_request +.global interrupt_request interrupt_request: - mov r1, #EXCTYPE_IRQ - b umon_exception +mov r1, #EXCTYPE_IRQ +b umon_exception - .global fast_interrupt_request +.global fast_interrupt_request fast_interrupt_request: - mov r1, #EXCTYPE_FIRQ - b umon_exception +mov r1, #EXCTYPE_FIRQ +b umon_exception |