Changeset 7f1bfce in mainline for src/main/main.c


Ignore:
Timestamp:
2005-05-17T20:46:19Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6b96ab44
Parents:
87be9cfb
Message:

Add SP_DELTA macro for each architecture.
On IA-32, this macro represents two doublewords that must be on the stack when switching to a new stack.
On MIPS, there is no need to fix sp when switching to a new stack.
On IA-64, this macro is used to allocate the 16-byte scratch area.

IA-64 work.
Changes in start.S. More changes to come.
Define memcopy().

Janitorial fixes.
Add missing #include <panic.h> to rwlock4/test.c.
Remove wrong use of inline keyword from both declaration and definition of l_apic_id().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/main.c

    r87be9cfb r7f1bfce  
    9595
    9696        context_save(&ctx);
    97         ctx.sp = config.base + config.kernel_size - 8;
     97        ctx.sp = config.base + config.kernel_size - SP_DELTA;
    9898        ctx.pc = FADDR(main_bsp_separated_stack);
    9999        context_restore(&ctx);
     
    193193         * switch to this cpu's private stack prior to waking kmp up.
    194194         */
    195         CPU->saved_context.sp = (__address) &CPU->stack[CPU_STACK_SIZE-8];
     195        CPU->saved_context.sp = (__address) &CPU->stack[CPU_STACK_SIZE-SP_DELTA];
    196196        CPU->saved_context.pc = FADDR(main_ap_separated_stack);
    197197        context_restore(&CPU->saved_context);
Note: See TracChangeset for help on using the changeset viewer.