Changeset 5ab278f in rtems


Ignore:
Timestamp:
May 8, 2009, 1:24:27 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
7f12879
Parents:
eee78e5
Message:

2009-05-08 Joel Sherrill <joel.sherrill@…>

  • bootcard.c, bspgetworkarea.c, include/bootcard.h: Switch from ssize_t to uintptr_t for bsp_get_work_area() since the work area is larger than a single allocatable object.
Location:
c/src/lib/libbsp/shared
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/shared/ChangeLog

    reee78e5 r5ab278f  
     12009-05-08      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * bootcard.c, bspgetworkarea.c, include/bootcard.h: Switch from ssize_t
     4        to uintptr_t for bsp_get_work_area() since the work area is larger
     5        than a single allocatable object.
     6
    172009-05-06      Joel Sherrill <joel.sherrill@oarcorp.com>
    28
  • c/src/lib/libbsp/shared/bootcard.c

    reee78e5 r5ab278f  
    4747
    4848#include <bsp/bootcard.h>
     49#include <rtems/bspIo.h>
    4950
    5051/*
     
    122123  rtems_status_code      sc = RTEMS_SUCCESSFUL;
    123124  void                  *work_area_start = NULL;
    124   intptr_t               work_area_size = 0;
     125  uintptr_t              work_area_size = 0;
    125126  void                  *heap_start = NULL;
    126   intptr_t               heap_size = 0;
     127  uintptr_t              heap_size = 0;
    127128
    128129  /*
     
    150151   *  the RTEMS Workspace and the C Program Heap is.
    151152   */
    152   bsp_get_work_area(&work_area_start, (ssize_t*) &work_area_size,
    153                     &heap_start, (ssize_t*) &heap_size);
    154 
    155   if ( work_area_size <= Configuration.work_space_size ) {
     153  bsp_get_work_area(&work_area_start, &work_area_size,
     154                    &heap_start, &heap_size);
     155
     156  if ( (uint32_t) work_area_size <= (uint32_t) Configuration.work_space_size ) {
    156157    printk(
    157       "bootcard: Work space too big for work area! (%d > %d)\n",
    158       Configuration.work_space_size,
    159       work_area_size
     158      "bootcard: Work space too big for work area! (0x%08lx > 0x%08lx)\n",
     159      (uint32_t)Configuration.work_space_size,
     160      (uint32_t)work_area_size
    160161    );
    161162    bsp_cleanup();
  • c/src/lib/libbsp/shared/bspgetworkarea.c

    reee78e5 r5ab278f  
    4444 */
    4545void bsp_get_work_area(
    46   void    **work_area_start,
    47   ssize_t  *work_area_size,
    48   void    **heap_start,
    49   ssize_t  *heap_size
     46  void      **work_area_start,
     47  uintptr_t  *work_area_size,
     48  void      **heap_start,
     49  uintptr_t  *heap_size
    5050)
    5151{
     
    6262  *work_area_size  = ram_end - (uintptr_t) WorkAreaBase;
    6363  *heap_start      = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
    64   *heap_size       = (ssize_t) HeapSize;
     64  *heap_size       = (uintptr_t) HeapSize;
    6565
    6666  /*
  • c/src/lib/libbsp/shared/include/bootcard.h

    reee78e5 r5ab278f  
    5555
    5656void bsp_get_work_area(
    57   void    **work_area_start,
    58   ssize_t  *work_area_size,
    59   void    **heap_start,
    60   ssize_t  *heap_size
     57  void      **work_area_start,
     58  uintptr_t  *work_area_size,
     59  void      **heap_start,
     60  uintptr_t  *heap_size
    6161);
    6262
Note: See TracChangeset for help on using the changeset viewer.