Changeset 26aafe8 in mainline for kernel/arch/arm32/src/userspace.c


Ignore:
Timestamp:
2011-05-19T16:47:49Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a6d8726
Parents:
bcaca55
Message:

cleanup the huge mess related to stacks, their sizes and locations
use two frames for kernel stacks by default on all platforms (to play it safe)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/src/userspace.c

    rbcaca55 r26aafe8  
    3838
    3939/** Struct for holding all general purpose registers.
    40  * 
     40 *
    4141 *  Used to set registers when going to userspace.
    4242 */
     
    6060} ustate_t;
    6161
    62 /** Changes processor mode and jumps to the address specified in the first
    63  * parameter.
     62/** Change processor mode
    6463 *
    65  *  @param kernel_uarg   Userspace settings (entry point, stack, ...).
     64 * @param kernel_uarg Userspace settings (entry point, stack, ...).
     65 *
    6666 */
    6767void userspace(uspace_arg_t *kernel_uarg)
     
    7979
    8080        /* clear other registers */
    81         ustate.r3  = ustate.r4  = ustate.r5 = ustate.r6 = ustate.r7 =
    82             ustate.r8 = ustate.r9 = ustate.r10 = ustate.r11 = ustate.r12 =
    83             ustate.lr = 0;
     81        ustate.r3 = 0;
     82        ustate.r4 = 0;
     83        ustate.r5 = 0;
     84        ustate.r6 = 0;
     85        ustate.r7 = 0;
     86        ustate.r8 = 0;
     87        ustate.r9 = 0;
     88        ustate.r10 = 0;
     89        ustate.r11 = 0;
     90        ustate.r12 = 0;
     91        ustate.lr = 0;
    8492
    8593        /* set user stack */
    86         ustate.sp = ((uint32_t)kernel_uarg->uspace_stack) + PAGE_SIZE;
     94        ustate.sp = ((uint32_t)kernel_uarg->uspace_stack) + STACK_SIZE;
    8795
    8896        /* set where uspace execution starts */
Note: See TracChangeset for help on using the changeset viewer.