Changeset 26aafe8 in mainline for kernel/arch/mips32


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)

Location:
kernel/arch/mips32
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/mips32/include/mm/as.h

    rbcaca55 r26aafe8  
    3838#define KERNEL_ADDRESS_SPACE_SHADOWED_ARCH  0
    3939
    40 #define KERNEL_ADDRESS_SPACE_START_ARCH         (unsigned long) 0x80000000
    41 #define KERNEL_ADDRESS_SPACE_END_ARCH           (unsigned long) 0x9fffffff
    42 #define USER_ADDRESS_SPACE_START_ARCH           (unsigned long) 0x00000000
    43 #define USER_ADDRESS_SPACE_END_ARCH             (unsigned long) 0x7fffffff
    44 
    45 #define USTACK_ADDRESS_ARCH     (0x80000000 - PAGE_SIZE)
     40#define KERNEL_ADDRESS_SPACE_START_ARCH  UINT32_C(0x80000000)
     41#define KERNEL_ADDRESS_SPACE_END_ARCH    UINT32_C(0x9fffffff)
     42#define USER_ADDRESS_SPACE_START_ARCH    UINT32_C(0x00000000)
     43#define USER_ADDRESS_SPACE_END_ARCH      UINT32_C(0x7fffffff)
    4644
    4745typedef struct {
  • kernel/arch/mips32/src/mips32.c

    rbcaca55 r26aafe8  
    220220            cp0_status_um_bit | cp0_status_ie_enabled_bit));
    221221        cp0_epc_write((uintptr_t) kernel_uarg->uspace_entry);
    222         userspace_asm(((uintptr_t) kernel_uarg->uspace_stack + PAGE_SIZE),
     222        userspace_asm(((uintptr_t) kernel_uarg->uspace_stack + STACK_SIZE),
    223223            (uintptr_t) kernel_uarg->uspace_uarg,
    224224            (uintptr_t) kernel_uarg->uspace_entry);
     
    235235void before_thread_runs_arch(void)
    236236{
    237         supervisor_sp = (uintptr_t) &THREAD->kstack[THREAD_STACK_SIZE -
    238             SP_DELTA];
     237        supervisor_sp =
     238            (uintptr_t) &THREAD->kstack[STACK_SIZE - SP_DELTA];
    239239}
    240240
Note: See TracChangeset for help on using the changeset viewer.