Ignore:
Timestamp:
2013-03-07T22:53:05Z (11 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
850235d, e4a1497
Parents:
31399f3
Message:

For all but ia64, make the actual istate_t location match istate_get().

  • Drop SP_DELTA from the calculation of the bottom of the kernel stack.
  • Make the kernel stack start at its last address (except for ia64).
  • Add alignment to istate_t where needed.
  • istate_get() on ia64 still returns a wrong address.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/proc/sun4u/scheduler.c

    r31399f3 r2277e03  
    5252{
    5353        if (THREAD->uspace) {
     54                uint64_t sp;
     55
    5456                /*
    5557                 * Write kernel stack address to %g6 of the alternate and
     
    6365                 *   before it explicitly uses %g7.
    6466                 */
    65                 uint64_t sp = (uintptr_t) THREAD->kstack + STACK_SIZE -
    66                     (STACK_BIAS + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT));
     67                sp = (uintptr_t) THREAD->kstack + STACK_SIZE - STACK_BIAS;
    6768                write_to_ig_g6(sp);
    6869                write_to_ag_g6(sp);
     
    7677        if (THREAD->uspace) {
    7778                /* sample the state of the userspace window buffer */
    78                 THREAD->arch.uspace_window_buffer = (uint8_t *) read_from_ag_g7();
     79                THREAD->arch.uspace_window_buffer =
     80                    (uint8_t *) read_from_ag_g7();
    7981        }
    8082}
Note: See TracChangeset for help on using the changeset viewer.