Changeset 1fbbcd6 in mainline for arch/ia64


Ignore:
Timestamp:
2005-08-29T20:31:23Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
81887b7
Parents:
4dd0704
Message:

Globalize 'size' and 'delta' and rename them to 'kernel_size' and 'heap_delta'.

Fix heap initialization to take 'heap_delta' into account.

Implement IA-64 get_stack_base().

Adjust SP_DELTA's to consider one extra word on stack.
(So that the stack pointer is within appropriate limits even on IA-64).

More #include cleanup.

Location:
arch/ia64/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • arch/ia64/include/asm.h

    r4dd0704 r1fbbcd6  
    3333#include <config.h>
    3434
    35 /* TODO: implement the real stuff */
     35/** Return base address of current stack
     36 *
     37 * Return the base address of the current stack.
     38 * The stack is assumed to be STACK_SIZE long.
     39 * The stack must start on page boundary.
     40 */
    3641static inline __address get_stack_base(void)
    3742{
    38         return NULL;
     43        __u64 v;
     44
     45        __asm__ volatile ("and %0 = %1, r12" : "=r" (v) : "r" (~(STACK_SIZE-1)));
     46       
     47        return v;
    3948}
    4049
  • arch/ia64/include/context.h

    r4dd0704 r1fbbcd6  
    3232#include <arch/types.h>
    3333
     34#define STACK_ITEM_SIZE 16
     35
    3436/*
    3537 * context_save() and context_restore() are both leaf procedures.
    3638 * No need to allocate scratch area.
     39 *
     40 * One item is put onto the stack to support get_stack_base().
    3741 */
    38 #define SP_DELTA        0
     42#define SP_DELTA        (0+STACK_ITEM_SIZE)
    3943
    4044#ifdef context_set
Note: See TracChangeset for help on using the changeset viewer.