Changeset 9559674 in rtems


Ignore:
Timestamp:
Dec 9, 2009, 10:37:12 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
b9636c24
Parents:
7b21633
Message:

2009-12-09 Joel Sherrill <joel.sherrill@…>

  • startup/bspgetworkarea.c: Add debug printk's.
  • startup/linkcmds: Using "-Wl,--defsym -Wl,RamSize?=0x1000000" results in _RamSize being defined. Handle this properly.
Location:
c/src/lib/libbsp/i386/pc386
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/i386/pc386/ChangeLog

    r7b21633 r9559674  
     12009-12-09      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * startup/bspgetworkarea.c: Add debug printk's.
     4        * startup/linkcmds: Using "-Wl,--defsym -Wl,RamSize=0x1000000"
     5        results in _RamSize being defined.  Handle this properly.
     6
     7
     8
    192009-12-08      Joel Sherrill <joel.sherrill@oarcorp.com>
    210
  • c/src/lib/libbsp/i386/pc386/startup/bspgetworkarea.c

    r7b21633 r9559674  
    1414 */
    1515
     16/* #define BSP_GET_WORK_AREA_DEBUG */
    1617#include <bsp.h>
    1718#include <bsp/bootcard.h>
     19
     20#ifdef BSP_GET_WORK_AREA_DEBUG
     21  #include <rtems/bspIo.h>
     22#endif
    1823
    1924/*
     
    7580       _boot_multiboot_info.mem_upper ) {
    7681    bsp_mem_size = _boot_multiboot_info.mem_upper * 1024;
     82    #ifdef BSP_GET_WORK_AREA_DEBUG
     83      printk( "Multiboot info says we have 0x%08x\n", bsp_mem_size );
     84    #endif
    7785  }
    7886
     
    9098    for(i=lowest; i<=2048; i++) {
    9199      topAddr = i*1024*1024 - 4;
    92       val =  *(uint32_t*)topAddr;
     100      val =  *(volatile uint32_t*)topAddr;
    93101      if (val != topAddr) {
    94102        break;
     
    97105
    98106    topAddr = (i-1)*1024*1024 - 4;
     107    #ifdef BSP_GET_WORK_AREA_DEBUG
     108      printk( "Dynamically sized to 0x%08x\n", topAddr );
     109    #endif
    99110  } else {
    100     printk( "hardcoded\n" );
    101111    topAddr = (uintptr_t) RamSize;
     112    #ifdef BSP_GET_WORK_AREA_DEBUG
     113      printk( "hardcoded to 0x%08x\n", topAddr );
     114    #endif
    102115  }
    103116
     
    121134  *heap_size       = (uintptr_t) HeapSize;
    122135
    123   #if 0
     136  #ifdef BSP_GET_WORK_AREA_DEBUG
     137    printk( "bsp_mem_size = 0x%08x\n", bsp_mem_size );
     138    printk( "rtemsFreeMemStart = 0x%08x\n", rtemsFreeMemStart );
    124139    printk( "WorkArea Base = %p\n", *work_area_start );
    125140    printk( "WorkArea Size = 0x%08x\n", *work_area_size );
    126141    printk( "C Program Heap Base = %p\n", *heap_start );
    127142    printk( "C Program Heap Size = 0x%08x\n", *heap_size );
     143    printk( "End of WorkArea = %p\n", *work_area_start +  *work_area_size );
    128144  #endif
    129145}
  • c/src/lib/libbsp/i386/pc386/startup/linkcmds

    r7b21633 r9559674  
    1818ENTRY(_start)
    1919*/
    20 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
    21 RamSize = DEFINED(RamSize) ? RamSize    : 0xFFFFFFFF;
     20HeapSize = DEFINED(HeapSize) ? HeapSize :
     21          DEFINED(_HeapSize) ? _HeapSize : 0x0;
     22RamSize = DEFINED(RamSize) ? RamSize    :
     23          DEFINED(_RamSize) ? _RamSize : 0xFFFFFFFF;
    2224
    2325SECTIONS
Note: See TracChangeset for help on using the changeset viewer.