Changeset 7f1c620 in mainline for arch/mips32
- Timestamp:
- 2006-07-04T17:17:56Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0ffa3ef5
- Parents:
- 991779c5
- Location:
- arch/mips32
- Files:
-
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/mips32/include/arg.h
r991779c5 r7f1c620 43 43 */ 44 44 45 typedef __addressva_list;45 typedef uintptr_t va_list; 46 46 47 47 #define va_start(ap, lst) \ … … 49 49 50 50 #define va_arg(ap, type) \ 51 (((type *)((ap) = (va_list)( (sizeof(type) <= 4) ? (( __address)((ap) + 2*4 - 1) & (~3)) : ((__address)((ap) + 2*8 -1) & (~7)) )))[-1])51 (((type *)((ap) = (va_list)( (sizeof(type) <= 4) ? ((uintptr_t)((ap) + 2*4 - 1) & (~3)) : ((uintptr_t)((ap) + 2*8 -1) & (~7)) )))[-1]) 52 52 53 53 #define va_copy(dst,src) ((dst)=(src)) -
arch/mips32/include/asm.h
r991779c5 r7f1c620 53 53 * The stack must start on page boundary. 54 54 */ 55 static inline __addressget_stack_base(void)55 static inline uintptr_t get_stack_base(void) 56 56 { 57 __addressv;57 uintptr_t v; 58 58 59 59 __asm__ volatile ("and %0, $29, %1\n" : "=r" (v) : "r" (~(STACK_SIZE-1))); … … 63 63 64 64 extern void cpu_halt(void); 65 extern void asm_delay_loop( __u32t);66 extern void userspace_asm( __address ustack, __addressuspace_uarg,67 __addressentry);65 extern void asm_delay_loop(uint32_t t); 66 extern void userspace_asm(uintptr_t ustack, uintptr_t uspace_uarg, 67 uintptr_t entry); 68 68 69 69 #endif -
arch/mips32/include/boot.h
r991779c5 r7f1c620 35 35 36 36 typedef struct { 37 __addressaddr;38 __u32size;37 uintptr_t addr; 38 uint32_t size; 39 39 } utask_t; 40 40 41 41 typedef struct { 42 __u32cnt;42 uint32_t cnt; 43 43 utask_t tasks[TASKMAP_MAX_RECORDS]; 44 44 } bootinfo_t; -
arch/mips32/include/byteorder.h
r991779c5 r7f1c620 40 40 41 41 #ifdef BIG_ENDIAN 42 static inline __u64 __u64_le2host(__u64n)42 static inline uint64_t uint64_t_le2host(uint64_t n) 43 43 { 44 return __u64_byteorder_swap(n);44 return uint64_t_byteorder_swap(n); 45 45 } 46 46 47 static inline __native __native_le2host(__nativen)47 static inline unative_t unative_t_le2host(unative_t n) 48 48 { 49 return __u32_byteorder_swap(n);49 return uint32_t_byteorder_swap(n); 50 50 } 51 51 52 52 #else 53 # define __native_le2host(n) (n)54 # define __u64_le2host(n) (n)53 # define unative_t_le2host(n) (n) 54 # define uint64_t_le2host(n) (n) 55 55 #endif 56 56 -
arch/mips32/include/context.h
r991779c5 r7f1c620 56 56 */ 57 57 struct context { 58 __addresssp;59 __addresspc;58 uintptr_t sp; 59 uintptr_t pc; 60 60 61 __u32s0;62 __u32s1;63 __u32s2;64 __u32s3;65 __u32s4;66 __u32s5;67 __u32s6;68 __u32s7;69 __u32s8;70 __u32gp;61 uint32_t s0; 62 uint32_t s1; 63 uint32_t s2; 64 uint32_t s3; 65 uint32_t s4; 66 uint32_t s5; 67 uint32_t s6; 68 uint32_t s7; 69 uint32_t s8; 70 uint32_t gp; 71 71 72 72 ipl_t ipl; -
arch/mips32/include/cp0.h
r991779c5 r7f1c620 64 64 #define cp0_unmask_int(it) cp0_status_write(cp0_status_read() | (1<<(cp0_status_im_shift+(it)))) 65 65 66 #define GEN_READ_CP0(nm,reg) static inline __u32cp0_ ##nm##_read(void) \66 #define GEN_READ_CP0(nm,reg) static inline uint32_t cp0_ ##nm##_read(void) \ 67 67 { \ 68 __u32retval; \68 uint32_t retval; \ 69 69 asm("mfc0 %0, $" #reg : "=r"(retval)); \ 70 70 return retval; \ 71 71 } 72 72 73 #define GEN_WRITE_CP0(nm,reg) static inline void cp0_ ##nm##_write( __u32val) \73 #define GEN_WRITE_CP0(nm,reg) static inline void cp0_ ##nm##_write(uint32_t val) \ 74 74 { \ 75 75 asm("mtc0 %0, $" #reg : : "r"(val) ); \ -
arch/mips32/include/cpu.h
r991779c5 r7f1c620 39 39 40 40 struct cpu_arch { 41 __u32imp_num;42 __u32rev_num;41 uint32_t imp_num; 42 uint32_t rev_num; 43 43 }; 44 44 -
arch/mips32/include/debugger.h
r991779c5 r7f1c620 51 51 52 52 typedef struct { 53 __addressaddress; /**< Breakpoint address */54 __nativeinstruction; /**< Original instruction */55 __nativenextinstruction; /**< Original instruction following break */53 uintptr_t address; /**< Breakpoint address */ 54 unative_t instruction; /**< Original instruction */ 55 unative_t nextinstruction; /**< Original instruction following break */ 56 56 int flags; /**< Flags regarding breakpoint */ 57 57 count_t counter; -
arch/mips32/include/drivers/arc.h
r991779c5 r7f1c620 57 57 58 58 typedef struct { 59 __u8type;60 __u8sharedisposition;61 __u16flags;59 uint8_t type; 60 uint8_t sharedisposition; 61 uint16_t flags; 62 62 union { 63 63 struct { … … 78 78 79 79 typedef struct { 80 __u16version;81 __u16revision;80 uint16_t version; 81 uint16_t revision; 82 82 unsigned long count; 83 83 cm_resource_descriptor descr[1]; … … 154 154 arc_component_type type; 155 155 arc_component_flags flags; 156 __u16revision;157 __u16version;158 __u32key;159 __u32affinitymask;160 __u32configdatasize;161 __u32identifier_len;156 uint16_t revision; 157 uint16_t version; 158 uint32_t key; 159 uint32_t affinitymask; 160 uint32_t configdatasize; 161 uint32_t identifier_len; 162 162 char *identifier; 163 163 } __attribute__ ((packed)) arc_component; 164 164 165 165 typedef struct { 166 __u16year;167 __u16month;168 __u16day;169 __u16hour;170 __u16minutes;171 __u16seconds;172 __u16mseconds;166 uint16_t year; 167 uint16_t month; 168 uint16_t day; 169 uint16_t hour; 170 uint16_t minutes; 171 uint16_t seconds; 172 uint16_t mseconds; 173 173 } __attribute__ ((packed)) arc_timeinfo; 174 174 … … 187 187 typedef struct { 188 188 arc_memorytype_t type; 189 __u32basepage; /* *4096 = baseaddr */190 __u32basecount;189 uint32_t basepage; /* *4096 = baseaddr */ 190 uint32_t basecount; 191 191 }arc_memdescriptor_t; 192 192 … … 198 198 typedef struct { 199 199 long (*load)(void); /* ... */ 200 long (*invoke)( __u32 eaddr,__u32 saddr,__u32argc,char **argv,200 long (*invoke)(uint32_t eaddr,uint32_t saddr,uint32_t argc,char **argv, 201 201 char **envp); 202 long (*execute)(char *path, __u32argc,char **argv,char **envp);202 long (*execute)(char *path,uint32_t argc,char **argv,char **envp); 203 203 void (*halt)(void); 204 204 void (*powerdown)(void); … … 222 222 long (*reserved2)(void); 223 223 arc_timeinfo * (*gettime)(void); 224 __u32(*getrelativetime)(void);224 uint32_t (*getrelativetime)(void); 225 225 long (*getdirectoryentry)(); 226 226 long (*open)(void); /* ... */ 227 long (*close)( __u32fileid);228 long (*read)( __u32 fileid,void *buf,__u32 n,__u32*cnt);229 long (*getreadstatus)( __u32fileid);230 long (*write)( __u32 fileid, void *buf,__u32 n,__u32*cnt);227 long (*close)(uint32_t fileid); 228 long (*read)(uint32_t fileid,void *buf,uint32_t n,uint32_t *cnt); 229 long (*getreadstatus)(uint32_t fileid); 230 long (*write)(uint32_t fileid, void *buf,uint32_t n,uint32_t *cnt); 231 231 long (*seek)(void); /* ... */ 232 232 /* 30 */ … … 235 235 char * (*setenvironmentvariable)(char *name, char *value); 236 236 long (*getfileinformation)(void); /* ... */ 237 long (*setfileinformation)( __u32 fileid,__u32 attflags,__u32attmask);237 long (*setfileinformation)(uint32_t fileid,uint32_t attflags,uint32_t attmask); 238 238 void (*flushallcaches)(void); 239 239 long (*testunicodecharacter)(void); /* ... */ … … 242 242 243 243 typedef struct { 244 __u32signature;245 __u32length;246 __u16version;247 __u16revision;244 uint32_t signature; 245 uint32_t length; 246 uint16_t version; 247 uint16_t revision; 248 248 void *restartblock; 249 249 void *debugblock; 250 250 void *gevector; 251 251 void *utlbmissvector; 252 __u32firmwarevectorlen;252 uint32_t firmwarevectorlen; 253 253 arc_func_vector_t *firmwarevector; 254 __u32privvectorlen;254 uint32_t privvectorlen; 255 255 void *privvector; 256 __u32adaptercount;256 uint32_t adaptercount; 257 257 }__attribute__ ((packed)) arc_sbp; 258 258 -
arch/mips32/include/exception.h
r991779c5 r7f1c620 63 63 64 64 struct istate { 65 __u32at;66 __u32v0;67 __u32v1;68 __u32a0;69 __u32a1;70 __u32a2;71 __u32a3;72 __u32t0;73 __u32t1;74 __u32t2;75 __u32t3;76 __u32t4;77 __u32t5;78 __u32t6;79 __u32t7;80 __u32s0;81 __u32s1;82 __u32s2;83 __u32s3;84 __u32s4;85 __u32s5;86 __u32s6;87 __u32s7;88 __u32t8;89 __u32t9;90 __u32gp;91 __u32sp;92 __u32s8;93 __u32ra;65 uint32_t at; 66 uint32_t v0; 67 uint32_t v1; 68 uint32_t a0; 69 uint32_t a1; 70 uint32_t a2; 71 uint32_t a3; 72 uint32_t t0; 73 uint32_t t1; 74 uint32_t t2; 75 uint32_t t3; 76 uint32_t t4; 77 uint32_t t5; 78 uint32_t t6; 79 uint32_t t7; 80 uint32_t s0; 81 uint32_t s1; 82 uint32_t s2; 83 uint32_t s3; 84 uint32_t s4; 85 uint32_t s5; 86 uint32_t s6; 87 uint32_t s7; 88 uint32_t t8; 89 uint32_t t9; 90 uint32_t gp; 91 uint32_t sp; 92 uint32_t s8; 93 uint32_t ra; 94 94 95 __u32lo;96 __u32hi;95 uint32_t lo; 96 uint32_t hi; 97 97 98 __u32status; /* cp0_status */99 __u32epc; /* cp0_epc */100 __u32k1; /* We use it as thread-local pointer */98 uint32_t status; /* cp0_status */ 99 uint32_t epc; /* cp0_epc */ 100 uint32_t k1; /* We use it as thread-local pointer */ 101 101 }; 102 102 103 static inline void istate_set_retaddr(istate_t *istate, __addressretaddr)103 static inline void istate_set_retaddr(istate_t *istate, uintptr_t retaddr) 104 104 { 105 105 istate->epc = retaddr; … … 111 111 return istate->status & cp0_status_um_bit; 112 112 } 113 static inline __nativeistate_get_pc(istate_t *istate)113 static inline unative_t istate_get_pc(istate_t *istate) 114 114 { 115 115 return istate->epc; -
arch/mips32/include/faddr.h
r991779c5 r7f1c620 38 38 #include <arch/types.h> 39 39 40 #define FADDR(fptr) (( __address) (fptr))40 #define FADDR(fptr) ((uintptr_t) (fptr)) 41 41 42 42 #endif -
arch/mips32/include/fpu_context.h
r991779c5 r7f1c620 38 38 #include <arch/types.h> 39 39 40 #define FPU_CONTEXT_ALIGN sizeof( __native)40 #define FPU_CONTEXT_ALIGN sizeof(unative_t) 41 41 42 42 struct fpu_context { 43 __nativedregs[32];44 __nativecregs[32];43 unative_t dregs[32]; 44 unative_t cregs[32]; 45 45 }; 46 46 -
arch/mips32/include/memstr.h
r991779c5 r7f1c620 38 38 #define memcpy(dst, src, cnt) __builtin_memcpy((dst), (src), (cnt)) 39 39 40 extern void memsetw( __address dst, size_t cnt, __u16x);41 extern void memsetb( __address dst, size_t cnt, __u8x);40 extern void memsetw(uintptr_t dst, size_t cnt, uint16_t x); 41 extern void memsetb(uintptr_t dst, size_t cnt, uint8_t x); 42 42 43 extern int memcmp( __address src, __addressdst, int cnt);43 extern int memcmp(uintptr_t src, uintptr_t dst, int cnt); 44 44 45 45 #endif -
arch/mips32/include/mm/asid.h
r991779c5 r7f1c620 40 40 #define ASID_MAX_ARCH 255 /* 2^8 - 1 */ 41 41 42 typedef __u8asid_t;42 typedef uint8_t asid_t; 43 43 44 44 #endif -
arch/mips32/include/mm/page.h
r991779c5 r7f1c620 42 42 43 43 #ifndef __ASM__ 44 # define KA2PA(x) ((( __address) (x)) - 0x80000000)45 # define PA2KA(x) ((( __address) (x)) + 0x80000000)44 # define KA2PA(x) (((uintptr_t) (x)) - 0x80000000) 45 # define PA2KA(x) (((uintptr_t) (x)) + 0x80000000) 46 46 #else 47 47 # define KA2PA(x) ((x) - 0x80000000) … … 101 101 #define SET_FRAME_FLAGS_ARCH(ptl3, i, x) set_pt_flags((pte_t *)(ptl3), (index_t)(i), (x)) 102 102 103 #define PTE_VALID_ARCH(pte) (*(( __u32*) (pte)) != 0)103 #define PTE_VALID_ARCH(pte) (*((uint32_t *) (pte)) != 0) 104 104 #define PTE_PRESENT_ARCH(pte) ((pte)->p != 0) 105 105 #define PTE_GET_FRAME_ARCH(pte) ((pte)->pfn<<12) -
arch/mips32/include/mm/tlb.h
r991779c5 r7f1c620 76 76 #endif 77 77 } __attribute__ ((packed)); 78 __u32value;78 uint32_t value; 79 79 }; 80 80 … … 104 104 #endif 105 105 } __attribute__ ((packed)); 106 __u32value;106 uint32_t value; 107 107 }; 108 108 … … 119 119 #endif 120 120 } __attribute__ ((packed)); 121 __u32value;121 uint32_t value; 122 122 }; 123 123 … … 134 134 #endif 135 135 } __attribute__ ((packed)); 136 __u32value;136 uint32_t value; 137 137 }; 138 138 -
arch/mips32/include/types.h
r991779c5 r7f1c620 38 38 #define NULL 0 39 39 40 typedef signed char __s8;41 typedef unsigned char __u8;40 typedef signed char int8_t; 41 typedef unsigned char uint8_t; 42 42 43 typedef signed short __s16;44 typedef unsigned short __u16;43 typedef signed short int16_t; 44 typedef unsigned short uint16_t; 45 45 46 typedef unsigned long __u32;47 typedef signed long __s32;46 typedef unsigned long uint32_t; 47 typedef signed long int32_t; 48 48 49 typedef unsigned long long __u64;50 typedef signed long long __s64;49 typedef unsigned long long uint64_t; 50 typedef signed long long int64_t; 51 51 52 typedef __u32 __address;52 typedef uint32_t uintptr_t; 53 53 54 typedef __u32ipl_t;54 typedef uint32_t ipl_t; 55 55 56 typedef __u32 __native;57 typedef __s32 __snative;56 typedef uint32_t unative_t; 57 typedef int32_t native_t; 58 58 59 59 typedef struct pte pte_t; 60 60 61 typedef __u32pfn_t;61 typedef uint32_t pfn_t; 62 62 63 63 #endif -
arch/mips32/src/ddi/ddi.c
r991779c5 r7f1c620 51 51 * @return 0 on success or an error code from errno.h. 52 52 */ 53 int ddi_iospace_enable_arch(task_t *task, __addressioaddr, size_t size)53 int ddi_iospace_enable_arch(task_t *task, uintptr_t ioaddr, size_t size) 54 54 { 55 55 return 0; -
arch/mips32/src/debugger.c
r991779c5 r7f1c620 92 92 93 93 static struct { 94 __u32andmask;95 __u32value;94 uint32_t andmask; 95 uint32_t value; 96 96 }jmpinstr[] = { 97 97 {0xf3ff0000, 0x41000000}, /* BCzF */ … … 126 126 * @return true - it is jump instruction, false otherwise 127 127 */ 128 static bool is_jump( __nativeinstr)128 static bool is_jump(unative_t instr) 129 129 { 130 130 int i; … … 154 154 /* Check, that the breakpoints do not conflict */ 155 155 for (i=0; i<BKPOINTS_MAX; i++) { 156 if (breakpoints[i].address == ( __address)argv->intval) {156 if (breakpoints[i].address == (uintptr_t)argv->intval) { 157 157 printf("Duplicate breakpoint %d.\n", i); 158 158 spinlock_unlock(&bkpoints_lock); 159 159 return 0; 160 } else if (breakpoints[i].address == ( __address)argv->intval + sizeof(__native) || \161 breakpoints[i].address == ( __address)argv->intval - sizeof(__native)) {160 } else if (breakpoints[i].address == (uintptr_t)argv->intval + sizeof(unative_t) || \ 161 breakpoints[i].address == (uintptr_t)argv->intval - sizeof(unative_t)) { 162 162 printf("Adjacent breakpoints not supported, conflict with %d.\n", i); 163 163 spinlock_unlock(&bkpoints_lock); … … 178 178 return 0; 179 179 } 180 cur->address = ( __address) argv->intval;180 cur->address = (uintptr_t) argv->intval; 181 181 printf("Adding breakpoint on address: %p\n", argv->intval); 182 cur->instruction = (( __native*)cur->address)[0];183 cur->nextinstruction = (( __native*)cur->address)[1];182 cur->instruction = ((unative_t *)cur->address)[0]; 183 cur->nextinstruction = ((unative_t *)cur->address)[1]; 184 184 if (argv == &add_argv) { 185 185 cur->flags = 0; … … 193 193 194 194 /* Set breakpoint */ 195 *(( __native*)cur->address) = 0x0d;195 *((unative_t *)cur->address) = 0x0d; 196 196 197 197 spinlock_unlock(&bkpoint_lock); … … 229 229 return 0; 230 230 } 231 (( __u32*)cur->address)[0] = cur->instruction;232 (( __u32*)cur->address)[1] = cur->nextinstruction;231 ((uint32_t *)cur->address)[0] = cur->instruction; 232 ((uint32_t *)cur->address)[1] = cur->nextinstruction; 233 233 234 234 cur->address = NULL; … … 299 299 { 300 300 bpinfo_t *cur = NULL; 301 __addressfireaddr = istate->epc;301 uintptr_t fireaddr = istate->epc; 302 302 int i; 303 303 … … 316 316 /* Reinst only breakpoint */ 317 317 if ((breakpoints[i].flags & BKPOINT_REINST) \ 318 && (fireaddr ==breakpoints[i].address+sizeof( __native))) {318 && (fireaddr ==breakpoints[i].address+sizeof(unative_t))) { 319 319 cur = &breakpoints[i]; 320 320 break; … … 324 324 if (cur->flags & BKPOINT_REINST) { 325 325 /* Set breakpoint on first instruction */ 326 (( __u32*)cur->address)[0] = 0x0d;326 ((uint32_t *)cur->address)[0] = 0x0d; 327 327 /* Return back the second */ 328 (( __u32*)cur->address)[1] = cur->nextinstruction;328 ((uint32_t *)cur->address)[1] = cur->nextinstruction; 329 329 cur->flags &= ~BKPOINT_REINST; 330 330 spinlock_unlock(&bkpoint_lock); … … 339 339 340 340 /* Return first instruction back */ 341 (( __u32*)cur->address)[0] = cur->instruction;341 ((uint32_t *)cur->address)[0] = cur->instruction; 342 342 343 343 if (! (cur->flags & BKPOINT_ONESHOT)) { 344 344 /* Set Breakpoint on next instruction */ 345 (( __u32*)cur->address)[1] = 0x0d;345 ((uint32_t *)cur->address)[1] = 0x0d; 346 346 cur->flags |= BKPOINT_REINST; 347 347 } -
arch/mips32/src/drivers/arc.c
r991779c5 r7f1c620 143 143 case CmResourceTypePort: 144 144 printf("Port: %p-size:%d ", 145 ( __address)configdata->descr[i].u.port.start,145 (uintptr_t)configdata->descr[i].u.port.start, 146 146 configdata->descr[i].u.port.length); 147 147 break; … … 153 153 case CmResourceTypeMemory: 154 154 printf("Memory: %p-size:%d ", 155 ( __address)configdata->descr[i].u.port.start,155 (uintptr_t)configdata->descr[i].u.port.start, 156 156 configdata->descr[i].u.port.length); 157 157 break; … … 237 237 static void arc_putchar(char ch) 238 238 { 239 __u32cnt;239 uint32_t cnt; 240 240 ipl_t ipl; 241 241 … … 294 294 { 295 295 char ch; 296 __u32count;296 uint32_t count; 297 297 long result; 298 298 … … 317 317 { 318 318 char ch; 319 __u32count;319 uint32_t count; 320 320 long result; 321 321 … … 381 381 arc_memdescriptor_t *desc; 382 382 int total = 0; 383 __addressbase;383 uintptr_t base; 384 384 size_t basesize; 385 385 -
arch/mips32/src/exception.c
r991779c5 r7f1c620 96 96 static void reserved_instr_exception(int n, istate_t *istate) 97 97 { 98 if (*(( __u32*)istate->epc) == 0x7c03e83b) {98 if (*((uint32_t *)istate->epc) == 0x7c03e83b) { 99 99 ASSERT(THREAD); 100 100 istate->epc += 4; … … 140 140 static void interrupt_exception(int n, istate_t *istate) 141 141 { 142 __u32cause;142 uint32_t cause; 143 143 int i; 144 144 -
arch/mips32/src/interrupt.c
r991779c5 r7f1c620 133 133 134 134 /* Reregister irq to be IPC-ready */ 135 void irq_ipc_bind_arch( __nativeirq)135 void irq_ipc_bind_arch(unative_t irq) 136 136 { 137 137 /* Do not allow to redefine timer */ -
arch/mips32/src/mips32.c
r991779c5 r7f1c620 72 72 * when not in .text section ???????? 73 73 */ 74 __addresssupervisor_sp __attribute__ ((section (".text")));74 uintptr_t supervisor_sp __attribute__ ((section (".text"))); 75 75 /* Stack pointer saved when entering user mode */ 76 76 /* TODO: How do we do it on SMP system???? */ … … 82 82 init.cnt = bootinfo.cnt; 83 83 84 __u32i;84 uint32_t i; 85 85 86 86 for (i = 0; i < bootinfo.cnt; i++) { … … 147 147 cp0_status_um_bit | 148 148 cp0_status_ie_enabled_bit)); 149 cp0_epc_write(( __address) kernel_uarg->uspace_entry);150 userspace_asm((( __address) kernel_uarg->uspace_stack+PAGE_SIZE),151 ( __address) kernel_uarg->uspace_uarg,152 ( __address) kernel_uarg->uspace_entry);149 cp0_epc_write((uintptr_t) kernel_uarg->uspace_entry); 150 userspace_asm(((uintptr_t) kernel_uarg->uspace_stack+PAGE_SIZE), 151 (uintptr_t) kernel_uarg->uspace_uarg, 152 (uintptr_t) kernel_uarg->uspace_entry); 153 153 while (1) 154 154 ; … … 163 163 void before_thread_runs_arch(void) 164 164 { 165 supervisor_sp = ( __address) &THREAD->kstack[THREAD_STACK_SIZE-SP_DELTA];165 supervisor_sp = (uintptr_t) &THREAD->kstack[THREAD_STACK_SIZE-SP_DELTA]; 166 166 } 167 167 … … 175 175 * possible to have it separately in the future. 176 176 */ 177 __native sys_tls_set(__nativeaddr)177 unative_t sys_tls_set(unative_t addr) 178 178 { 179 179 return 0; -
arch/mips32/src/mm/page.c
r991779c5 r7f1c620 46 46 * translate the physical address to uncached area 47 47 */ 48 __address hw_map(__addressphysaddr, size_t size)48 uintptr_t hw_map(uintptr_t physaddr, size_t size) 49 49 { 50 50 return physaddr + 0xa0000000; -
arch/mips32/src/mm/tlb.c
r991779c5 r7f1c620 52 52 static void tlb_modified_fail(istate_t *istate); 53 53 54 static pte_t *find_mapping_and_check( __addressbadvaddr, int access, istate_t *istate, int *pfrc);55 56 static void prepare_entry_lo(entry_lo_t *lo, bool g, bool v, bool d, bool cacheable, __addresspfn);57 static void prepare_entry_hi(entry_hi_t *hi, asid_t asid, __addressaddr);54 static pte_t *find_mapping_and_check(uintptr_t badvaddr, int access, istate_t *istate, int *pfrc); 55 56 static void prepare_entry_lo(entry_lo_t *lo, bool g, bool v, bool d, bool cacheable, uintptr_t pfn); 57 static void prepare_entry_hi(entry_hi_t *hi, asid_t asid, uintptr_t addr); 58 58 59 59 /** Initialize TLB … … 97 97 entry_hi_t hi; 98 98 asid_t asid; 99 __addressbadvaddr;99 uintptr_t badvaddr; 100 100 pte_t *pte; 101 101 int pfrc; … … 167 167 { 168 168 tlb_index_t index; 169 __addressbadvaddr;169 uintptr_t badvaddr; 170 170 entry_lo_t lo; 171 171 entry_hi_t hi; … … 251 251 { 252 252 tlb_index_t index; 253 __addressbadvaddr;253 uintptr_t badvaddr; 254 254 entry_lo_t lo; 255 255 entry_hi_t hi; … … 384 384 * @return PTE on success, NULL otherwise. 385 385 */ 386 pte_t *find_mapping_and_check( __addressbadvaddr, int access, istate_t *istate, int *pfrc)386 pte_t *find_mapping_and_check(uintptr_t badvaddr, int access, istate_t *istate, int *pfrc) 387 387 { 388 388 entry_hi_t hi; … … 446 446 } 447 447 448 void prepare_entry_lo(entry_lo_t *lo, bool g, bool v, bool d, bool cacheable, __addresspfn)448 void prepare_entry_lo(entry_lo_t *lo, bool g, bool v, bool d, bool cacheable, uintptr_t pfn) 449 449 { 450 450 lo->value = 0; … … 456 456 } 457 457 458 void prepare_entry_hi(entry_hi_t *hi, asid_t asid, __addressaddr)458 void prepare_entry_hi(entry_hi_t *hi, asid_t asid, uintptr_t addr) 459 459 { 460 460 hi->value = ALIGN_DOWN(addr, PAGE_SIZE * 2); … … 568 568 * @param cnt Number of entries to invalidate. 569 569 */ 570 void tlb_invalidate_pages(asid_t asid, __addresspage, count_t cnt)570 void tlb_invalidate_pages(asid_t asid, uintptr_t page, count_t cnt) 571 571 { 572 572 int i;
Note:
See TracChangeset
for help on using the changeset viewer.