Changeset 7837728b in rtems


Ignore:
Timestamp:
Aug 10, 2017, 11:09:22 AM (2 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
a6f84b27
Parents:
5a9372f
git-author:
Sebastian Huber <sebastian.huber@…> (08/10/17 11:09:22)
git-committer:
Sebastian Huber <sebastian.huber@…> (08/22/17 12:19:00)
Message:

powerpc: 64-bit _CPU_Context_Initialize() support

Update #3082.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/powerpc/new-exceptions/cpu.c

    r5a9372f r7837728b  
    5656void _CPU_Context_Initialize(
    5757  Context_Control  *the_context,
    58   uint32_t         *stack_base,
    59   uint32_t          size,
     58  void             *stack_base,
     59  size_t            size,
    6060  uint32_t          new_level,
    6161  void             *entry_point,
     
    6666  ppc_context *the_ppc_context;
    6767  uint32_t   msr_value;
    68   uint32_t   sp;
     68  uintptr_t  sp;
     69  uintptr_t  stack_alignment;
    6970
    70   sp = (uint32_t)stack_base + size - PPC_MINIMUM_STACK_FRAME_SIZE;
     71  sp = (uintptr_t) stack_base + size - PPC_MINIMUM_STACK_FRAME_SIZE;
    7172
    72   sp &= ~(CPU_STACK_ALIGNMENT-1);
     73  stack_alignment = CPU_STACK_ALIGNMENT;
     74  sp &= ~(stack_alignment - 1);
    7375
    74   *((uint32_t*)sp) = 0;
     76  sp = (uintptr_t) memset((void *) sp, 0, PPC_MINIMUM_STACK_FRAME_SIZE);
    7577
    7678  _CPU_MSR_GET( msr_value );
     
    118120  the_ppc_context->gpr1 = sp;
    119121  the_ppc_context->msr = msr_value;
    120   the_ppc_context->lr = (uint32_t) entry_point;
     122  the_ppc_context->lr = (uintptr_t) entry_point;
    121123  the_ppc_context->isr_dispatch_disable = 0;
    122124
  • c/src/lib/libcpu/powerpc/rtems/powerpc/powerpc.h

    r5a9372f r7837728b  
    632632#define PPC_MSR_DISABLE_MASK (PPC_MSR_ME|PPC_MSR_EE|PPC_MSR_CE)
    633633
     634#if defined(__powerpc64__)
     635#define PPC_MINIMUM_STACK_FRAME_SIZE 32
     636#else
    634637#define PPC_MINIMUM_STACK_FRAME_SIZE PPC_STACK_ALIGNMENT
     638#endif
    635639
    636640#ifdef __cplusplus
  • cpukit/score/cpu/powerpc/rtems/score/cpu.h

    r5a9372f r7837728b  
    819819void _CPU_Context_Initialize(
    820820  Context_Control  *the_context,
    821   uint32_t         *stack_base,
    822   uint32_t          size,
     821  void             *stack_base,
     822  size_t            size,
    823823  uint32_t          new_level,
    824824  void             *entry_point,
Note: See TracChangeset for help on using the changeset viewer.