Changeset 0f250f9 in mainline for arch/mips32


Ignore:
Timestamp:
2006-03-17T18:07:56Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
69f293e
Parents:
6c6a19e6
Message:

Improved uspace threads.
ia64 needs fixing.

Location:
arch/mips32
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • arch/mips32/include/asm.h

    r6c6a19e6 r0f250f9  
    5858extern void cpu_halt(void);
    5959extern void asm_delay_loop(__u32 t);
    60 extern void userspace_asm(__address ustack);
     60extern void userspace_asm(__address ustack, __address uspace_uarg);
    6161
    6262#endif
  • arch/mips32/src/mips32.c

    r6c6a19e6 r0f250f9  
    3838#include <memstr.h>
    3939#include <proc/thread.h>
     40#include <proc/uarg.h>
    4041#include <print.h>
    4142
     
    121122__address supervisor_sp __attribute__ ((section (".text")));
    122123
    123 void userspace(uspace_arg_t *uarg)
     124void userspace(uspace_arg_t *kernel_uarg)
    124125{
    125126        /* EXL=1, UM=1, IE=1 */
     
    127128                                              cp0_status_um_bit |
    128129                                              cp0_status_ie_enabled_bit));
    129         cp0_epc_write(uarg->uspace_entry);
    130         userspace_asm(uarg->uspace_stack+PAGE_SIZE);
     130        cp0_epc_write((__address) kernel_uarg->uspace_entry);
     131        userspace_asm(((__address) kernel_uarg->uspace_stack+PAGE_SIZE), (__address) kernel_uarg->uspace_uarg);
    131132        while (1)
    132133                ;
  • arch/mips32/src/start.S

    r6c6a19e6 r0f250f9  
    227227userspace_asm:
    228228        add $sp, $a0, 0
    229         eret
    230         nop
    231 
     229        add $v0, $a1, 0
     230        eret
     231        nop
     232
Note: See TracChangeset for help on using the changeset viewer.