Changeset 133bffb in rtems


Ignore:
Timestamp:
Oct 6, 2009, 7:56:07 PM (10 years ago)
Author:
Thomas Doerfler <Thomas.Doerfler@…>
Branches:
4.10, 4.11, master
Children:
7b1df577
Parents:
63e99db5
Message:

various changes

Location:
c/src/lib/libbsp/powerpc/qemuppc
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/qemuppc/ChangeLog

    r63e99db5 r133bffb  
     12009-10-06      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2        * Makefile.am:
     3        do not use shared/timerstub
     4
     5        * include/bsp.h:
     6        add macro to convert Decrementer value
     7
     8        * startup/bspstart.c:
     9        set clock frequency to suitable value
     10
     11        * startup/bsppanic.c:
     12        issue a reset after panic
     13
     14        * startup/linkcmds:
     15        add space for stacks
     16
    1172009-10-03      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
    218        * startup/bspstart.c:
  • c/src/lib/libbsp/powerpc/qemuppc/Makefile.am

    r63e99db5 r133bffb  
    3939    startup/cmain.c startup/bspstart.c startup/bsppanic.c
    4040# pclock
    41 clock_SOURCES = ../../shared/clock_driver_simidle.c
     41# clock_SOURCES = ../../shared/clock_driver_simidle.c
     42clock_SOURCES = ../shared/clock/clock.c
    4243# console
    4344console_SOURCES = ../../shared/console-polled.c console/console-io.c
    44 #timer
    45 timer_SOURCES = ../../shared/timerstub.c
    4645
    4746# irq
  • c/src/lib/libbsp/powerpc/qemuppc/include/bsp.h

    r63e99db5 r133bffb  
    2929#define BSP_SMALL_MEMORY 1
    3030
     31/*
     32 *  Convert decrementer value to tenths of microseconds (used by shared timer
     33 *  driver).
     34 */
     35#define BSP_Convert_decrementer( _value ) \
     36  ((int) (((_value) * 10) / bsp_clicks_per_usec))
     37
     38#if 0
    3139/* support for simulated clock tick */
    3240Thread clock_driver_sim_idle_body(uintptr_t);
    3341#define BSP_IDLE_TASK_BODY clock_driver_sim_idle_body
     42#endif
    3443
    3544#ifdef __cplusplus
  • c/src/lib/libbsp/powerpc/qemuppc/startup/bsppanic.c

    r63e99db5 r133bffb  
    11#include <rtems.h>
    22#include <rtems/bspIo.h>
     3
     4static void
     5__outb(int port, unsigned char v)
     6{
     7  *((volatile unsigned char *)(0x80000000 + port)) = v;
     8}
    39
    410void BSP_panic(char *s)
    511{
    612  printk("%s PANIC %s\n",_RTEMS_version, s);
    7   while(1){};
     13  __outb (0x92, 0x01);
    814}
    915
     
    1117{
    1218  printk("%s PANIC ERROR %x\n",_RTEMS_version, v);
    13   while(1){};
     19  __outb (0x92, 0x01);
    1420}
  • c/src/lib/libbsp/powerpc/qemuppc/startup/bspstart.c

    r63e99db5 r133bffb  
    5050uint32_t BSP_mem_size = (uint32_t)RamSize;
    5151
    52 /*
    53  * Time base divisior (how many tick for 1 second).
    54  */
    55 unsigned int BSP_time_base_divisor;
    56 
    5752/* Default decrementer exception handler */
    5853static int default_decrementer_exception_handler( BSP_Exception_frame *frame, unsigned number)
     
    7570  int rv = 0;
    7671  rtems_status_code sc;
    77 
    7872  /*
    7973   * Note we can not get CPU identification dynamically, so
     
    8478  /*
    8579   *  initialize the device driver parameters
     80   * assume we are running with 20MHz bus
     81   * this should speed up some tests :-)
    8682   */
    87   /* BSP_bus_frequency        = (unsigned int)&PSIM_INSTRUCTIONS_PER_MICROSECOND; */
    88   /* bsp_clicks_per_usec      = BSP_bus_frequency; */
    89   /* BSP_time_base_divisor    = 1; */
     83  BSP_bus_frequency        = 20;
     84  bsp_clicks_per_usec      = BSP_bus_frequency;
    9085
    9186  /*
  • c/src/lib/libbsp/powerpc/qemuppc/startup/cmain.c

    r63e99db5 r133bffb  
    11
    2 #if 1
    32static void
    43__outb(int port, unsigned char v)
     
    1211  return *((volatile unsigned char *)(0x80000000 + port));
    1312}
    14 #endif
    1513
    1614static void
     
    4442   */
    4543  __memcpy (__sdata2_start, __sdata2_load, __sdata2_end - __sdata2_start);
    46   __memcpy (__sdata_start, __sdata_load, __sdata_end - __sdata_start);
    47   __memcpy (__data_start, __data_load, __data_end - __data_start);
    48   __bzero (__sbss2_start, __sbss2_end - __sbss2_start);
    49   __bzero (__sbss_start, __sbss_end - __sbss_start);
    50   __bzero (__bss_start, __bss_end - __bss_start);
    51   printk( "hello #\n");
     44  __memcpy (__sdata_start , __sdata_load , __sdata_end - __sdata_start);
     45  __memcpy (__data_start  , __data_load  , __data_end  - __data_start);
     46  __bzero (__sbss2_start  , __sbss2_end - __sbss2_start);
     47  __bzero (__sbss_start   , __sbss_end - __sbss_start);
     48  __bzero (__bss_start    , __bss_end  - __bss_start);
     49  printk( "start of BSP\n");
    5250  boot_card(0);
    5351  printk( "end of BSP\n");
  • c/src/lib/libbsp/powerpc/qemuppc/startup/linkcmds

    r63e99db5 r133bffb  
    8585  } >ROM =0
    8686
    87   . = 0x1000;
     87  .vectors :
     88  {
     89    . = . + 0x2000; /* skip vector area */
     90  } >RAM
     91
    8892  __sdata2_load = __rodata_end;
    8993  .sdata2 : AT (__sdata2_load)
     
    166170  bsp_interrupt_stack_size = bsp_interrupt_stack_end - bsp_interrupt_stack_start;
    167171
    168    WorkAreaBase = .;
     172  bsp_work_area_start = bsp_interrupt_stack_end;
     173  WorkAreaBase = bsp_work_area_start;
    169174   . = RamBase + RamSize;
    170175
Note: See TracChangeset for help on using the changeset viewer.