Changeset 7f1c620 in mainline for arch/mips32/src
- Timestamp:
- 2006-07-04T17:17:56Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0ffa3ef5
- Parents:
- 991779c5
- Location:
- arch/mips32/src
- Files:
-
- 8 edited
-
ddi/ddi.c (modified) (1 diff)
-
debugger.c (modified) (10 diffs)
-
drivers/arc.c (modified) (6 diffs)
-
exception.c (modified) (2 diffs)
-
interrupt.c (modified) (1 diff)
-
mips32.c (modified) (5 diffs)
-
mm/page.c (modified) (1 diff)
-
mm/tlb.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
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.
