Changeset b6d4566 in mainline for generic/src


Ignore:
Timestamp:
2006-03-27T16:56:51Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ff75d34
Parents:
50fe620
Message:

CPU stacks must have two frames on ia64.
Make sure both thread stack frames are mapped in before_thread_runs_arch().
Take STACK_FRAMES into account during kernel memory layout initialization in main_bsp().

Location:
generic/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • generic/src/cpu/cpu.c

    r50fe620 rb6d4566  
    6363
    6464                for (i=0; i < config.cpu_count; i++) {
    65                         cpus[i].stack = (__u8 *) PA2KA(PFN2ADDR(frame_alloc(ONE_FRAME, FRAME_KA | FRAME_PANIC)));
     65                        cpus[i].stack = (__u8 *) PA2KA(PFN2ADDR(frame_alloc(STACK_FRAMES, FRAME_KA | FRAME_PANIC)));
    6666                       
    6767                        cpus[i].id = i;
  • generic/src/main/main.c

    r50fe620 rb6d4566  
    9393#endif
    9494
     95#define CONFIG_STACK_SIZE       ((1<<STACK_FRAMES)*STACK_SIZE)
     96
    9597/** Bootstrap CPU main kernel routine
    9698 *
     
    129131       
    130132        context_save(&ctx);
    131         context_set(&ctx, FADDR(main_bsp_separated_stack),
    132                     stackaddr, CONFIG_STACK_SIZE);
     133        context_set(&ctx, FADDR(main_bsp_separated_stack), stackaddr, THREAD_STACK_SIZE);
    133134        context_restore(&ctx);
    134135        /* not reached */
  • generic/src/proc/thread.c

    r50fe620 rb6d4566  
    267267       
    268268        /* Not needed, but good for debugging */
    269         memsetb((__address)t->kstack, THREAD_STACK_SIZE, 0);
     269        memsetb((__address)t->kstack, THREAD_STACK_SIZE * 1<<STACK_FRAMES, 0);
    270270       
    271271        ipl = interrupts_disable();
Note: See TracChangeset for help on using the changeset viewer.