Changeset 3c6d7ae in rtems


Ignore:
Timestamp:
Apr 24, 2012, 12:00:54 PM (8 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
05a20c1f
Parents:
d1018534
git-author:
Sebastian Huber <sebastian.huber@…> (04/24/12 12:00:54)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/24/12 12:35:16)
Message:

bsps/stackalloc: Use stack section symbols

Location:
c/src/lib/libbsp
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/lpc24xx/configure.ac

    rd1018534 r3c6d7ae  
    7878RTEMS_BSPOPTS_HELP([LPC24XX_EMC_TEST],[enable tests for EMC])
    7979
    80 RTEMS_BSPOPTS_SET([LPC24XX_SPECIAL_TASK_STACKS_SUPPORT],[lpc23*],[])
    81 RTEMS_BSPOPTS_SET([LPC24XX_SPECIAL_TASK_STACKS_SUPPORT],[*],[1])
    82 RTEMS_BSPOPTS_HELP([LPC24XX_SPECIAL_TASK_STACKS_SUPPORT],[enable special task stack support for task stacks in internal RAM])
    83 
    8480RTEMS_BSPOPTS_SET([LPC24XX_CONFIG_CONSOLE],[*],[0])
    8581RTEMS_BSPOPTS_HELP([LPC24XX_CONFIG_CONSOLE],[configuration for console (UART 0)])
  • c/src/lib/libbsp/arm/lpc24xx/startup/bspstart.c

    rd1018534 r3c6d7ae  
    2929#include <bsp/linker-symbols.h>
    3030#include <bsp/lpc24xx.h>
    31 #include <bsp/stackalloc.h>
    3231#include <bsp/system-clocks.h>
    3332#include <bsp/uart-output-char.h>
     
    9594  /* DMA */
    9695  lpc24xx_dma_initialize();
    97 
    98   /* Task stacks */
    99   #ifdef LPC24XX_SPECIAL_TASK_STACKS_SUPPORT
    100     bsp_stack_initialize(
    101       bsp_section_stack_begin,
    102       (uintptr_t) bsp_section_stack_size
    103     );
    104   #endif
    10596}
  • c/src/lib/libbsp/arm/lpc32xx/startup/bspstart.c

    rd1018534 r3c6d7ae  
    88
    99/*
    10  * Copyright (c) 2009, 2010
    11  * embedded brains GmbH
    12  * Obere Lagerstr. 30
    13  * D-82178 Puchheim
    14  * Germany
    15  * <rtems@embedded-brains.de>
     10 * Copyright (c) 2009-2012 embedded brains GmbH.  All rights reserved.
     11 *
     12 *  embedded brains GmbH
     13 *  Obere Lagerstr. 30
     14 *  82178 Puchheim
     15 *  Germany
     16 *  <rtems@embedded-brains.de>
    1617 *
    1718 * The license and distribution terms for this file may be
     
    2526#include <bsp/irq.h>
    2627#include <bsp/linker-symbols.h>
    27 #include <bsp/stackalloc.h>
    2828#include <bsp/lpc32xx.h>
    2929
     
    3333    _CPU_Fatal_halt(0xe);
    3434  }
    35 
    36   bsp_stack_initialize(
    37     bsp_section_stack_begin,
    38     (uintptr_t) bsp_section_stack_size
    39   );
    4035}
  • c/src/lib/libbsp/shared/include/stackalloc.h

    rd1018534 r3c6d7ae  
    88
    99/*
    10  * Copyright (c) 2009
    11  * embedded brains GmbH
    12  * Obere Lagerstr. 30
    13  * D-82178 Puchheim
    14  * Germany
    15  * rtems@embedded-brains.de
     10 * Copyright (c) 2009-2012 embedded brains GmbH.  All rights reserved.
     11 *
     12 *  embedded brains GmbH
     13 *  Obere Lagerstr. 30
     14 *  82178 Puchheim
     15 *  Germany
     16 *  <rtems@embedded-brains.de>
    1617 *
    1718 * The license and distribution terms for this file may be
     
    5253
    5354/**
    54  * @brief Task stack management initialization.
    55  *
    56  * This function should be called in bsp_start() with the designated task stack
    57  * area begin address @a begin and task stack area size @a size in bytes.  The
    58  * area boundaries have to be aligned properly.
    59  */
    60 void bsp_stack_initialize(void *begin, uintptr_t size);
    61 
    62 /**
    6355 * @brief Task stack allocator for @ref CONFIGURE_TASK_STACK_ALLOCATOR.
    6456 *
  • c/src/lib/libbsp/shared/src/stackalloc.c

    rd1018534 r3c6d7ae  
    88
    99/*
    10  * Copyright (c) 2009
    11  * embedded brains GmbH
    12  * Obere Lagerstr. 30
    13  * D-82178 Puchheim
    14  * Germany
    15  * rtems@embedded-brains.de
     10 * Copyright (c) 2009-2012 embedded brains GmbH.  All rights reserved.
     11 *
     12 *  embedded brains GmbH
     13 *  Obere Lagerstr. 30
     14 *  82178 Puchheim
     15 *  Germany
     16 *  <rtems@embedded-brains.de>
    1617 *
    1718 * The license and distribution terms for this file may be
     
    2021 */
    2122
     23#include <bsp/stackalloc.h>
     24
    2225#include <rtems.h>
    2326#include <rtems/score/wkspace.h>
    2427
    25 #include <bsp/stackalloc.h>
     28#include <bsp/linker-symbols.h>
    2629
    2730#define BSP_STACK_MAGIC 0xdeadbeef
     
    3033  .page_size = BSP_STACK_MAGIC
    3134};
    32 
    33 void bsp_stack_initialize(void *begin, uintptr_t size)
    34 {
    35   bsp_stack_heap.area_begin = (uintptr_t) begin;
    36   bsp_stack_heap.area_end = size;
    37 }
    3835
    3936void *bsp_stack_allocate(size_t size)
     
    4441    uintptr_t rv = _Heap_Initialize(
    4542      &bsp_stack_heap,
    46       (void *) bsp_stack_heap.area_begin,
    47       bsp_stack_heap.area_end,
     43      bsp_section_stack_begin,
     44      (uintptr_t) bsp_section_stack_size,
    4845      CPU_STACK_ALIGNMENT
    4946    );
Note: See TracChangeset for help on using the changeset viewer.