Changeset 1a32895 in rtems


Ignore:
Timestamp:
Oct 2, 2009, 1:39:12 PM (10 years ago)
Author:
Thomas Doerfler <Thomas.Doerfler@…>
Branches:
4.10, 4.11, master
Children:
7093646b
Parents:
aac23ec7
Message:
  • Makefile.am, irq/irq_config.h, irq/irq_init.c, irq/irq.h: add basic IRQ support (for decrementer)
  • start/start.S, startup/cmain.c, startup/linkcmds: add support for sdata* sections
  • startup/bsppanic.c: some cleanup
Location:
c/src/lib/libbsp/powerpc/qemuppc
Files:
2 added
8 edited

Legend:

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

    raac23ec7 r1a32895  
     12009-10-02      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2        * Makefile.am, irq/irq_config.h, irq/irq_init.c, irq/irq.h:
     3        add basic IRQ support (for decrementer)
     4
     5        * start/start.S, startup/cmain.c, startup/linkcmds: add support
     6        for sdata* sections
     7
     8        * startup/bsppanic.c: some cleanup
     9
    1102009-09-30      Joel Sherrill <joel.sherrill@oarcorp.com>
    211
  • c/src/lib/libbsp/powerpc/qemuppc/Makefile.am

    raac23ec7 r1a32895  
    1414include_HEADERS = include/bsp.h
    1515include_HEADERS += ../../shared/include/tm27.h
    16 include_bsp_HEADERS = irq/irq.h
    1716
    1817nodist_include_HEADERS = include/bspopts.h
     
    3231dist_project_lib_DATA += startup/linkcmds
    3332
     33# startup
    3434startup_SOURCES = ../../shared/bspclean.c ../../shared/bsplibc.c \
    3535    ../../shared/bsppredriverhook.c ../../shared/bsppretaskinghook.c \
    3636    ../../shared/bspgetworkarea.c ../../shared/bsppost.c \
    37     ../../shared/bspstart.c ../../shared/bootcard.c ../../shared/sbrk.c \
     37    ../../shared/bootcard.c ../../shared/sbrk.c \
    3838    ../../shared/gnatinstallhandler.c \
    39     startup/cmain.c startup/bsppanic.c
     39    startup/cmain.c startup/bspstart.c startup/bsppanic.c
     40# pclock
    4041clock_SOURCES = ../../shared/clock_driver_simidle.c
     42# console
    4143console_SOURCES = ../../shared/console-polled.c console/console-io.c
     44#timer
    4245timer_SOURCES = ../../shared/timerstub.c
     46
     47# irq
     48include_bsp_HEADERS = irq/irq.h \
     49    ../../shared/include/irq-generic.h \
     50    irq/irq-config.h
     51
     52irq_SOURCES = irq/irq_init.c \
     53        ../../shared/src/irq-generic.c \
     54        ../../shared/src/irq-legacy.c
    4355
    4456noinst_LIBRARIES += libbsp.a
    4557libbsp_a_SOURCES = $(startup_SOURCES) $(clock_SOURCES) $(console_SOURCES) \
    46     $(timer_SOURCES)
     58    $(timer_SOURCES) $(irq_SOURCES)
    4759
    4860#    ../../../libcpu/@RTEMS_CPU@/mpc6xx/clock.rel
     61include_bsp_HEADERS +=  ../../../libcpu/@RTEMS_CPU@/@exceptions@/bspsupport/vectors.h   \
     62                       ../../../libcpu/@RTEMS_CPU@/@exceptions@/bspsupport/irq_supp.h   \
     63                       ../../../libcpu/@RTEMS_CPU@/@exceptions@/bspsupport/ppc_exc_bspsupp.h
     64
    4965
    5066libbsp_a_LIBADD = ../../../libcpu/@RTEMS_CPU@/shared/cpuIdent.rel \
  • c/src/lib/libbsp/powerpc/qemuppc/irq/irq.h

    raac23ec7 r1a32895  
    3737 * CAUTION : BSP_PCI_IRQ_LOWEST_OFFSET should be equal to OPENPIC_VEC_SOURCE
    3838 */
     39/* FIXME: do we need PCI interrrupts here ? */
    3940#define BSP_PCI_IRQ_NUMBER              (16)
    4041#define BSP_PCI_IRQ_LOWEST_OFFSET       (0)
  • c/src/lib/libbsp/powerpc/qemuppc/preinstall.am

    raac23ec7 r1a32895  
    4646PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h
    4747
    48 $(PROJECT_INCLUDE)/bsp/irq.h: irq/irq.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
    49         $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq.h
    50 PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq.h
    51 
    5248$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp)
    5349        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h
     
    7470PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds
    7571
     72$(PROJECT_INCLUDE)/bsp/irq.h: irq/irq.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     73        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq.h
     74PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq.h
     75
     76$(PROJECT_INCLUDE)/bsp/irq-generic.h: ../../shared/include/irq-generic.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     77        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-generic.h
     78PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-generic.h
     79
     80$(PROJECT_INCLUDE)/bsp/irq-config.h: irq/irq-config.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     81        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-config.h
     82PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-config.h
     83
     84$(PROJECT_INCLUDE)/bsp/vectors.h: ../../../libcpu/@RTEMS_CPU@/@exceptions@/bspsupport/vectors.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     85        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/vectors.h
     86PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/vectors.h
     87
     88$(PROJECT_INCLUDE)/bsp/irq_supp.h: ../../../libcpu/@RTEMS_CPU@/@exceptions@/bspsupport/irq_supp.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     89        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq_supp.h
     90PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq_supp.h
     91
     92$(PROJECT_INCLUDE)/bsp/ppc_exc_bspsupp.h: ../../../libcpu/@RTEMS_CPU@/@exceptions@/bspsupport/ppc_exc_bspsupp.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     93        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/ppc_exc_bspsupp.h
     94PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/ppc_exc_bspsupp.h
     95
  • c/src/lib/libbsp/powerpc/qemuppc/start/start.S

    raac23ec7 r1a32895  
    88        li     %r3,8192
    99        mtmsr   %r3
     10
     11        /* Read-only small data */
     12        lis %r2, _SDA2_BASE_@h
     13        ori %r2, %r2,_SDA2_BASE_@l
     14
     15        /* Read-write small data */
     16        lis %r13, _SDA_BASE_@h
     17        ori %r13, %r13,_SDA_BASE_@l
     18
    1019        bl      cmain
    1120        .size _start, . - _start
  • c/src/lib/libbsp/powerpc/qemuppc/startup/bsppanic.c

    raac23ec7 r1a32895  
     1#include <rtems.h>
     2#include <rtems/bspIo.h>
     3
    14void BSP_panic(char *s)
    25{
    3 /*
    46  printk("%s PANIC %s\n",_RTEMS_version, s);
    5   rebootQuestion();
    6 */
     7  while(1){};
    78}
    89
    910void _BSP_Fatal_error(unsigned int v)
    1011{
     12  printk("%s PANIC ERROR %x\n",_RTEMS_version, v);
     13  while(1){};
    1114}
  • c/src/lib/libbsp/powerpc/qemuppc/startup/cmain.c

    raac23ec7 r1a32895  
    3030extern unsigned char __sdata2_load[], __sdata2_start[], __sdata2_end[];
    3131extern unsigned char __data_load[], __data_start[], __data_end[];
     32extern unsigned char __sdata_load[], __sdata_start[], __sdata_end[];
    3233extern unsigned char __sbss2_start[], __sbss2_end[];
    3334extern unsigned char __sbss_start[], __sbss_end[];
     
    3940void cmain (void)
    4041{
    41   printk( "hello #1\n");
     42  /*
     43   * init variable sections
     44   */
    4245  __memcpy (__sdata2_start, __sdata2_load, __sdata2_end - __sdata2_start);
     46  __memcpy (__sdata_start, __sdata_load, __sdata_end - __sdata_start);
    4347  __memcpy (__data_start, __data_load, __data_end - __data_start);
    4448  __bzero (__sbss2_start, __sbss2_end - __sbss2_start);
    4549  __bzero (__sbss_start, __sbss_end - __sbss_start);
    4650  __bzero (__bss_start, __bss_end - __bss_start);
    47   printk( "hello #2\n");
     51  printk( "hello #\n");
    4852  boot_card(0);
    4953  printk( "end of BSP\n");
  • c/src/lib/libbsp/powerpc/qemuppc/startup/linkcmds

    raac23ec7 r1a32895  
    1414RamSize = DEFINED(RamSize) ? RamSize : 4M;
    1515HeapSize = DEFINED(HeapSize) ? HeapSize : 0;
     16
     17bsp_section_align = 32;
    1618
    1719SECTIONS
     
    4446    /* .gnu.warning sections are handled specially by elf32.em.  */
    4547    *(.gnu.warning)
     48    . = ALIGN (bsp_section_align);
    4649    __text_end = .;
    4750  } >ROM =0
     
    7881    *(.rodata .rodata.* .gnu.linkonce.r.*)
    7982    *(.rodata1)
    80     . = ALIGN(4);
     83    . = ALIGN (bsp_section_align);
    8184    __rodata_end = .;
    8285  } >ROM =0
     
    8992    PROVIDE (_SDA2_BASE_ = 32768);
    9093    *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
    91     . = ALIGN(4);
     94    . = ALIGN (bsp_section_align);
    9295    __sdata2_end = .;
    9396  } >RAM
     
    9699    __sbss2_start = .;
    97100    *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)
    98     . = ALIGN(4);
     101    . = ALIGN (bsp_section_align);
    99102    __sbss2_end = .;
    100103  } >RAM
     
    107110    SORT(CONSTRUCTORS)
    108111    *(.data1)
     112    . = ALIGN (bsp_section_align);
     113    __data_end = .;
     114  } >RAM
     115  __sdata_load = __data_load + SIZEOF (.data);
     116  .sdata : AT(__sdata_load) {
     117    __sdata_start = .;
    109118    PROVIDE (_SDA_BASE_ = 32768);
    110119    *(.sdata .sdata.* .gnu.linkonce.s.*)
    111     . = ALIGN(4);
    112     __data_end = .;
    113   } >RAM
     120
     121    . = ALIGN (bsp_section_align);
     122
     123    _edata = .;
     124    __sdata_end = .;
     125    PROVIDE (edata = .);
     126
     127    /*
     128     * BSP: End of data section
     129     */
     130    bsp_section_data_end = .;
     131  } > RAM
     132
    114133  PROVIDE (__EXCEPT_START__ = .);
    115134  .gcc_except_table   : { *(.gcc_except_table*) } >RAM
    116135  PROVIDE (__EXCEPT_END__ = .);
     136
    117137  .sbss :
    118138  {
     
    121141    *(.sbss .sbss.* .gnu.linkonce.sb.*)
    122142    *(.scommon)
     143    . = ALIGN (bsp_section_align);
    123144    __sbss_end = .;
    124145  } >RAM
     
    129150   *(.bss .bss.* .gnu.linkonce.b.*)
    130151   *(COMMON)
    131    . = ALIGN(4);
     152    . = ALIGN (bsp_section_align);
    132153   __bss_end = .;
    133154
     
    137158   _end = _stack;
    138159  } >RAM
     160
     161  /*
     162   * BSP: Interrupt stack
     163   */
     164  bsp_interrupt_stack_start = _end;
     165  bsp_interrupt_stack_end = bsp_interrupt_stack_start + 32k;
     166  bsp_interrupt_stack_size = bsp_interrupt_stack_end - bsp_interrupt_stack_start;
    139167
    140168   WorkAreaBase = .;
Note: See TracChangeset for help on using the changeset viewer.