Changeset 7248e31 in mainline


Ignore:
Timestamp:
2005-09-07T07:42:36Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
24bd23a
Parents:
0b512a8
Message:

Make IA-32 userspace stack be aligned on doubleword boundary.
In userspace(), mark "eax" as clobbered register.

Location:
arch/ia32
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/include/mm/vm.h

    r0b512a8 r7248e31  
    3232#include <arch/types.h>
    3333
    34 #define KERNEL_ADDRESS_SPACE_START_ARCH         (__address) 0x80000000
    35 #define KERNEL_ADDRESS_SPACE_END_ARCH           (__address) 0xffffffff 
    36 #define USER_ADDRESS_SPACE_START_ARCH           (__address) 0x00000000
    37 #define USER_ADDRESS_SPACE_END_ARCH             (__address) 0x7fffffff
     34#define KERNEL_ADDRESS_SPACE_START_ARCH         ((__address) 0x80000000)
     35#define KERNEL_ADDRESS_SPACE_END_ARCH           ((__address) 0xffffffff)
     36#define USER_ADDRESS_SPACE_START_ARCH           ((__address) 0x00000000)
     37#define USER_ADDRESS_SPACE_END_ARCH             ((__address) 0x7fffffff)
    3838
    3939#define UTEXT_ADDRESS_ARCH      0x00001000
    40 #define USTACK_ADDRESS_ARCH     (0x7fffffff-(PAGE_SIZE-1))
     40#define USTACK_ADDRESS_ARCH     (USER_ADDRESS_SPACE_END_ARCH-(PAGE_SIZE-1))
    4141#define UDATA_ADDRESS_ARCH      0x21000000
    4242
  • arch/ia32/src/userspace.c

    r0b512a8 r7248e31  
    4646        pri = cpu_priority_high();
    4747
    48         __asm__ volatile (""
    49     /* CLNT */
     48        __asm__ volatile (
     49                /* CLNT */
    5050                "pushfl;"
    5151                "pop %%eax;"
     
    6060                "pushl %4\n"
    6161                "iret"
    62                 : : "i" (selector(UDATA_DES) | PL_USER), "i" (USTACK_ADDRESS+(THREAD_STACK_SIZE-1)), "r" (pri), "i" (selector(UTEXT_DES) | PL_USER), "i" (UTEXT_ADDRESS));
     62                :
     63                : "i" (selector(UDATA_DES) | PL_USER), "r" (USTACK_ADDRESS+(THREAD_STACK_SIZE)), "r" (pri), "i" (selector(UTEXT_DES) | PL_USER), "i" (UTEXT_ADDRESS)
     64                : "eax");
    6365       
    6466        /* Unreachable */
Note: See TracChangeset for help on using the changeset viewer.