Changeset 8f91729 in mainline


Ignore:
Timestamp:
2005-08-31T11:43:38Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e291e5d
Parents:
b9e97fb
Message:

separated stack mapping

Files:
2 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • arch/ppc/Makefile.inc

    rb9e97fb r8f91729  
    1717arch_sources= \
    1818        arch/context.S \
    19         arch/ppc.c \
    2019        arch/debug/panic.s \
    2120        arch/fpu_context.c \
  • arch/ppc/include/context.h

    rb9e97fb r8f91729  
    3131
    3232#include <arch/types.h>
     33#include <arch/drivers/ofw.h>
    3334
    34 #define SP_DELTA        4
     35#define SP_DELTA        8
     36
     37#ifdef context_map_stack
     38#undef context_map_stack
     39#endif
     40
     41#define context_map_stack(stack, size) \
     42        ofw_claim((void *) stack, size, 0);
    3543
    3644struct context {
  • arch/ppc/include/drivers/ofw.h

    rb9e97fb r8f91729  
    5858extern phandle ofw_find_device(const char *name);
    5959extern int ofw_get_property(const phandle device, const char *name, void *buf, const int buflen);
     60extern void *ofw_claim(const void *addr, const int size, const int align);
    6061extern void putchar(const char ch);
    6162
  • arch/ppc/src/drivers/ofw.c

    rb9e97fb r8f91729  
    9393}
    9494
     95void *ofw_claim(const void *addr, const int size, const int align)
     96{
     97        return (void *) ofw_call("claim", 3, 1, addr, size, align);
     98}
     99
    95100void putchar(const char ch)
    96101{
  • arch/ppc/src/start.S

    rb9e97fb r8f91729  
    3434
    3535kernel_image_start:
    36         bl early_init
     36        lis r4, ofw@ha
     37        addi r4, r4, ofw@l
     38        stw r5, 0(r4)
    3739       
    3840        lis r3, _hardcoded_ktext_size@ha
     
    5456        stw r3, 0(r4)
    5557       
     58        bl ofw_init
     59       
    5660        b main_bsp
  • include/context.h

    rb9e97fb r8f91729  
    3939#endif /* context_set */
    4040
     41#ifndef context_map_stack
     42#define context_map_stack(stack, size)
     43#endif /* context_map_stack */
     44
    4145extern int context_save(context_t *c);
    4246extern void context_restore(context_t *c) __attribute__ ((noreturn));
    4347
    44 
    45 
    4648#endif
  • src/main/main.c

    rb9e97fb r8f91729  
    119119        context_save(&ctx);
    120120        context_set(&ctx, FADDR(main_bsp_separated_stack), config.base + kernel_size, CONFIG_STACK_SIZE);
     121        context_map_stack(config.base + kernel_size, CONFIG_STACK_SIZE);
    121122        context_restore(&ctx);
    122123        /* not reached */
     
    134135        task_t *k;
    135136        thread_t *t;
    136 
     137       
    137138        the_initialize(THE);
    138139
Note: See TracChangeset for help on using the changeset viewer.