Changeset da1bafb in mainline for kernel/arch/mips32/include
- Timestamp:
- 2010-05-24T18:57:31Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0095368
- Parents:
- 666f492
- Location:
- kernel/arch/mips32/include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/mips32/include/asm.h
r666f492 rda1bafb 39 39 #include <config.h> 40 40 41 42 41 static inline void cpu_sleep(void) 43 42 { … … 47 46 48 47 /** Return base address of current stack 49 * 48 * 50 49 * Return the base address of the current stack. 51 50 * The stack is assumed to be STACK_SIZE bytes long. 52 51 * The stack must start on page boundary. 52 * 53 53 */ 54 54 static inline uintptr_t get_stack_base(void) 55 55 { 56 uintptr_t v;56 uintptr_t base; 57 57 58 58 asm volatile ( 59 "and % 0, $29, %1\n"60 : "=r" (v)61 : "r" (~(STACK_SIZE-1))59 "and %[base], $29, %[mask]\n" 60 : [base] "=r" (base) 61 : [mask] "r" (~(STACK_SIZE - 1)) 62 62 ); 63 63 64 return v;64 return base; 65 65 } 66 66 … … 78 78 static inline void pio_write_8(ioport8_t *port, uint8_t v) 79 79 { 80 *port = v; 80 *port = v; 81 81 } 82 82 83 83 static inline void pio_write_16(ioport16_t *port, uint16_t v) 84 84 { 85 *port = v; 85 *port = v; 86 86 } 87 87 88 88 static inline void pio_write_32(ioport32_t *port, uint32_t v) 89 89 { 90 *port = v; 90 *port = v; 91 91 } 92 92 -
kernel/arch/mips32/include/debugger.h
r666f492 rda1bafb 41 41 #define BKPOINTS_MAX 10 42 42 43 #define BKPOINT_INPROG (1 << 0) /**< Breakpoint was shot */ 44 #define BKPOINT_ONESHOT (1 << 1) /**< One-time breakpoint,mandatory for j/b 45 instructions */ 46 #define BKPOINT_REINST (1 << 2) /**< Breakpoint is set on the next 47 instruction, so that it could be 48 reinstalled on the previous one */ 49 #define BKPOINT_FUNCCALL (1 << 3) /**< Call a predefined function */ 43 /** Breakpoint was shot */ 44 #define BKPOINT_INPROG (1 << 0) 45 46 /** One-time breakpoint, mandatory for j/b instructions */ 47 #define BKPOINT_ONESHOT (1 << 1) 48 49 /** 50 * Breakpoint is set on the next instruction, so that it 51 * could be reinstalled on the previous one 52 */ 53 #define BKPOINT_REINST (1 << 2) 54 55 /** Call a predefined function */ 56 #define BKPOINT_FUNCCALL (1 << 3) 57 50 58 51 59 typedef struct { 52 uintptr_t address; /**< Breakpoint address */53 unative_t instruction; /**< Original instruction */60 uintptr_t address; /**< Breakpoint address */ 61 unative_t instruction; /**< Original instruction */ 54 62 unative_t nextinstruction; /**< Original instruction following break */ 55 int flags;/**< Flags regarding breakpoint */63 unsigned int flags; /**< Flags regarding breakpoint */ 56 64 size_t counter; 57 void (*bkfunc)(void * b, istate_t *istate);65 void (*bkfunc)(void *, istate_t *); 58 66 } bpinfo_t; 59 67 68 extern bpinfo_t breakpoints[BKPOINTS_MAX]; 69 60 70 extern void debugger_init(void); 61 void debugger_bpoint(istate_t *istate); 62 63 extern bpinfo_t breakpoints[BKPOINTS_MAX]; 71 extern void debugger_bpoint(istate_t *); 64 72 65 73 #endif -
kernel/arch/mips32/include/mm/as.h
r666f492 rda1bafb 27 27 */ 28 28 29 /** @addtogroup mips32mm 29 /** @addtogroup mips32mm 30 30 * @{ 31 31 */ … … 36 36 #define KERN_mips32_AS_H_ 37 37 38 #define KERNEL_ADDRESS_SPACE_SHADOWED_ARCH 038 #define KERNEL_ADDRESS_SPACE_SHADOWED_ARCH 0 39 39 40 40 #define KERNEL_ADDRESS_SPACE_START_ARCH (unsigned long) 0x80000000
Note:
See TracChangeset
for help on using the changeset viewer.
