Ticket #2022: 0005-Get-rid-of-my-.svn-directories.patch

File 0005-Get-rid-of-my-.svn-directories.patch, 106.0 KB (added by Ric Claus, on 02/17/12 at 22:07:09)

Patch to get rid of the aforementioned irrelevant files

  • deleted file c/src/lib/libbsp/powerpc/virtex4/.svn/entries

    From e8e28769a57c15dedaabf87168eeebee1ce0b184 Mon Sep 17 00:00:00 2001
    From: Ric Claus <claus@SLAC.Stanford.edu>
    Date: Fri, 17 Feb 2012 13:44:39 -0800
    Subject: [PATCH 5/7] Get rid of my .svn directories
    
    ---
     c/src/lib/libbsp/powerpc/virtex4/.svn/entries      |  219 -------------
     .../virtex4/.svn/prop-base/bsp_specs.svn-base      |    9 -
     .../virtex4/.svn/text-base/ChangeLog.svn-base      |    3 -
     .../virtex4/.svn/text-base/Makefile.am.svn-base    |   70 -----
     .../virtex4/.svn/text-base/bsp_specs.svn-base      |   16 -
     .../virtex4/.svn/text-base/configure.ac.svn-base   |   41 ---
     .../virtex4/.svn/text-base/preinstall.am.svn-base  |   75 -----
     .../lib/libbsp/powerpc/virtex4/clock/.svn/entries  |   62 ----
     .../virtex4/clock/.svn/prop-base/clock.c.svn-base  |    9 -
     .../virtex4/clock/.svn/text-base/clock.c.svn-base  |  273 -----------------
     .../libbsp/powerpc/virtex4/include/.svn/entries    |  164 ----------
     .../virtex4/include/.svn/prop-base/bsp.h.svn-base  |    9 -
     .../include/.svn/prop-base/coverhd.h.svn-base      |    9 -
     .../virtex4/include/.svn/prop-base/irq.h.svn-base  |    9 -
     .../virtex4/include/.svn/text-base/bsp.h.svn-base  |  102 ------
     .../include/.svn/text-base/bspopts.h.in.svn-base   |   40 ---
     .../include/.svn/text-base/coverhd.h.svn-base      |  133 --------
     .../virtex4/include/.svn/text-base/irq.h.svn-base  |   10 -
     c/src/lib/libbsp/powerpc/virtex4/make/.svn/entries |   31 --
     .../powerpc/virtex4/make/custom/.svn/entries       |   62 ----
     .../custom/.svn/text-base/virtex4.cfg.svn-base     |   19 --
     .../libbsp/powerpc/virtex4/startup/.svn/entries    |  186 -----------
     .../startup/.svn/prop-base/bspclean.c.svn-base     |    9 -
     .../startup/.svn/prop-base/bspstart.c.svn-base     |    9 -
     .../.svn/prop-base/dummy_console.c.svn-base        |    9 -
     .../startup/.svn/prop-base/start.S.svn-base        |    9 -
     .../startup/.svn/text-base/bspclean.c.svn-base     |   49 ---
     .../startup/.svn/text-base/bspstart.c.svn-base     |  218 -------------
     .../.svn/text-base/dummy_console.c.svn-base        |   71 -----
     .../startup/.svn/text-base/linkcmds.svn-base       |  267 ----------------
     .../startup/.svn/text-base/start.S.svn-base        |  324 --------------------
     .../powerpc/virtex4/startup/.svn/tmp/start.S.tmp   |  324 --------------------
     .../powerpc/virtex4/startup/.svn/tmp/tempfile.tmp  |  324 --------------------
     33 files changed, 0 insertions(+), 3164 deletions(-)
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/.svn/entries
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/.svn/prop-base/bsp_specs.svn-base
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/.svn/text-base/ChangeLog.svn-base
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/.svn/text-base/Makefile.am.svn-base
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/.svn/text-base/bsp_specs.svn-base
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/.svn/text-base/configure.ac.svn-base
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/.svn/text-base/preinstall.am.svn-base
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/clock/.svn/entries
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/clock/.svn/prop-base/clock.c.svn-base
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/clock/.svn/text-base/clock.c.svn-base
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/include/.svn/entries
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/include/.svn/prop-base/bsp.h.svn-base
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/include/.svn/prop-base/coverhd.h.svn-base
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/include/.svn/prop-base/irq.h.svn-base
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/include/.svn/text-base/bsp.h.svn-base
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/include/.svn/text-base/bspopts.h.in.svn-base
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/include/.svn/text-base/coverhd.h.svn-base
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/include/.svn/text-base/irq.h.svn-base
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/make/.svn/entries
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/make/custom/.svn/entries
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/make/custom/.svn/text-base/virtex4.cfg.svn-base
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/startup/.svn/entries
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/startup/.svn/prop-base/bspclean.c.svn-base
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/startup/.svn/prop-base/bspstart.c.svn-base
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/startup/.svn/prop-base/dummy_console.c.svn-base
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/startup/.svn/prop-base/start.S.svn-base
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/startup/.svn/text-base/bspclean.c.svn-base
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/startup/.svn/text-base/bspstart.c.svn-base
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/startup/.svn/text-base/dummy_console.c.svn-base
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/startup/.svn/text-base/linkcmds.svn-base
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/startup/.svn/text-base/start.S.svn-base
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/startup/.svn/tmp/start.S.tmp
     delete mode 100644 c/src/lib/libbsp/powerpc/virtex4/startup/.svn/tmp/tempfile.tmp
    
    diff --git a/c/src/lib/libbsp/powerpc/virtex4/.svn/entries b/c/src/lib/libbsp/powerpc/virtex4/.svn/entries
    deleted file mode 100644
    index 7654898..0000000
    + -  
    1 10
    2 
    3 dir
    4 679
    5 file:///afs/slac.stanford.edu/g/cci/repositories/ctkrepo/rtems/trunk/bsp/virtex4
    6 file:///afs/slac.stanford.edu/g/cci/repositories/ctkrepo
    7 
    8 
    9 
    10 2012-02-17T03:04:22.654458Z
    11 674
    12 claus
    13 
    14 
    15 
    16 
    17 
    18 
    19 
    20 
    21 
    22 
    23 
    24 
    25 
    26 
    27 a0e26fc9-5d4f-4a79-8961-08b194817e76
    28 
    29 
    30 
    31 
    32 
    33 
    34 
    35 
    36 ()
    37 
    380
    39 bsp_specs
    40 file
    41 
    42 
    43 
    44 
    45 2012-02-17T03:04:31.000000Z
    46 c6ede7343fbbe3f47f0cf4fc2a3df262
    47 2012-02-17T03:04:22.654458Z
    48 674
    49 claus
    50 has-props
    51 
    52 
    53 
    54 
    55 
    56 
    57 
    58 
    59 
    60 
    61 
    62 
    63 
    64 
    65 
    66 
    67 
    68 
    69 
    70 
    71 368
    72 
    731
    74 startup
    75 dir
    76 
    772
    78 include
    79 dir
    80 
    813
    82 configure.ac
    83 file
    84 
    85 
    86 
    87 
    88 2012-02-16T02:06:08.000000Z
    89 b36daa52e9fbbdfe7b52201a959eee7e
    90 2011-04-26T00:23:51.887907Z
    91 63
    92 claus
    93 
    94 
    95 
    96 
    97 
    98 
    99 
    100 
    101 
    102 
    103 
    104 
    105 
    106 
    107 
    108 
    109 
    110 
    111 
    112 
    113 
    114 1173
    115 
    1164
    117 ChangeLog
    118 file
    119 
    120 
    121 
    122 
    123 2012-02-16T02:06:08.000000Z
    124 69b2de31f4855494d2be5ab58195307c
    125 2011-04-26T00:23:51.887907Z
    126 63
    127 claus
    128 
    129 
    130 
    131 
    132 
    133 
    134 
    135 
    136 
    137 
    138 
    139 
    140 
    141 
    142 
    143 
    144 
    145 
    146 
    147 
    148 
    149 95
    150 
    1515
    152 Makefile.am
    153 file
    154 
    155 
    156 
    157 
    158 2012-02-17T03:03:24.000000Z
    159 1e62a41f2a909a7cd68ee692acd57dcc
    160 2012-01-27T03:41:34.937942Z
    161 583
    162 claus
    163 
    164 
    165 
    166 
    167 
    168 
    169 
    170 
    171 
    172 
    173 
    174 
    175 
    176 
    177 
    178 
    179 
    180 
    181 
    182 
    183 
    184 2079
    185 
    1866
    187 preinstall.am
    188 file
    189 
    190 
    191 
    192 
    193 2012-02-17T03:03:24.000000Z
    194 d0fc25985dc435cf4e31a8dc93a3907f
    195 2011-04-26T00:23:51.887907Z
    196 63
    197 claus
    198 
    199 
    200 
    201 
    202 
    203 
    204 
    205 
    206 
    207 
    208 
    209 
    210 
    211 
    212 
    213 
    214 
    215 
    216 
    217 
    218 
    219 2751
  • deleted file c/src/lib/libbsp/powerpc/virtex4/.svn/prop-base/bsp_specs.svn-base

    -
    
    -clock
    -dir
    -
    
    -make
    -dir
    -
    
    diff --git a/c/src/lib/libbsp/powerpc/virtex4/.svn/prop-base/bsp_specs.svn-base b/c/src/lib/libbsp/powerpc/virtex4/.svn/prop-base/bsp_specs.svn-base
    deleted file mode 100644
    index ac6e613..0000000
    + -  
    1 K 13
    2 svn:eol-style
    3 V 6
    4 native
    5 K 12
    6 svn:keywords
    7 V 31
    8 Author Date HeadURL Id Revision
    9 END
  • deleted file c/src/lib/libbsp/powerpc/virtex4/.svn/text-base/ChangeLog.svn-base

    diff --git a/c/src/lib/libbsp/powerpc/virtex4/.svn/text-base/ChangeLog.svn-base b/c/src/lib/libbsp/powerpc/virtex4/.svn/text-base/ChangeLog.svn-base
    deleted file mode 100644
    index 395372e..0000000
    + -  
    1 2008-03-13      Till Straumann <strauman@slac.stanford.edu>
    2 
    3         * ChangeLog, rce405.cfg: added files.
  • deleted file c/src/lib/libbsp/powerpc/virtex4/.svn/text-base/Makefile.am.svn-base

    diff --git a/c/src/lib/libbsp/powerpc/virtex4/.svn/text-base/Makefile.am.svn-base b/c/src/lib/libbsp/powerpc/virtex4/.svn/text-base/Makefile.am.svn-base
    deleted file mode 100644
    index e8bfc6d..0000000
    + -  
    1 ##
    2 ## $Id: $
    3 ##
    4 
    5 ACLOCAL_AMFLAGS = -I ../../../../aclocal
    6 
    7 include $(top_srcdir)/../../../../automake/compile.am
    8 
    9 include_bspdir = $(includedir)/bsp
    10 
    11 dist_project_lib_DATA = bsp_specs
    12 
    13 # include
    14 include_HEADERS  = include/bsp.h
    15 #include_HEADERS += include/tm27.h
    16 
    17 nodist_include_HEADERS     = include/bspopts.h
    18 nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h
    19 DISTCLEANFILES             = include/bspopts.h
    20 
    21 nodist_include_HEADERS += include/coverhd.h
    22 
    23 # start
    24 noinst_LIBRARIES      = libbspstart.a
    25 libbspstart_a_SOURCES = ../../powerpc/shared/start/rtems_crti.S
    26 project_lib_DATA      = rtems_crti.$(OBJEXT)
    27 
    28 dist_project_lib_DATA += startup/linkcmds
    29 
    30 noinst_LIBRARIES += libbsp.a
    31 
    32 # startup
    33 libbsp_a_SOURCES = startup/bspclean.c \
    34                    ../shared/startup/zerobss.c \
    35                    ../../shared/bsplibc.c \
    36                    ../../shared/bspgetworkarea.c \
    37                    ../../shared/bsppost.c \
    38                    startup/bspstart.c \
    39                    ../../shared/bootcard.c \
    40                    ../../shared/sbrk.c \
    41                    ../../shared/gnatinstallhandler.c
    42 
    43 # start
    44 libbsp_a_SOURCES += startup/start.S
    45 
    46 # clock & timer
    47 libbsp_a_SOURCES += clock/clock.c
    48 libbsp_a_SOURCES += ../../../libcpu/@RTEMS_CPU@/ppc403/timer/timer.c
    49 
    50 # console
    51 libbsp_a_SOURCES += startup/dummy_console.c \
    52                     ../../shared/dummy_printk_support.c
    53 
    54 # irq
    55 include_bsp_HEADERS = include/irq.h
    56 
    57 #vectors
    58 include_bsp_HEADERS += ../../../libcpu/@RTEMS_CPU@/@exceptions@/bspsupport/vectors.h
    59 include_bsp_HEADERS += ../../../libcpu/@RTEMS_CPU@/@exceptions@/bspsupport/irq_supp.h
    60 
    61 libbsp_a_LIBADD = ../../../libcpu/@RTEMS_CPU@/@exceptions@/rtems-cpu.rel \
    62                   ../../../libcpu/@RTEMS_CPU@/@exceptions@/exc_bspsupport.rel \
    63                   ../../../libcpu/@RTEMS_CPU@/@exceptions@/irq_bspsupport.rel \
    64                   ../../../libcpu/@RTEMS_CPU@/shared/cache.rel \
    65                   ../../../libcpu/@RTEMS_CPU@/shared/cpuIdent.rel
    66 
    67 EXTRA_DIST =
    68 
    69 include $(srcdir)/preinstall.am
    70 include $(top_srcdir)/../../../../automake/local.am
  • deleted file c/src/lib/libbsp/powerpc/virtex4/.svn/text-base/bsp_specs.svn-base

    diff --git a/c/src/lib/libbsp/powerpc/virtex4/.svn/text-base/bsp_specs.svn-base b/c/src/lib/libbsp/powerpc/virtex4/.svn/text-base/bsp_specs.svn-base
    deleted file mode 100644
    index 98864c9..0000000
    + -  
    1 %rename startfile old_startfile
    2 %rename link      old_link
    3 %rename endfile   old_endfile
    4 
    5 
    6 *startfile:
    7 %{!qrtems: %(old_startfile)} \
    8 %{!nostdlib: %{qrtems:  ecrti%O%s rtems_crti%O%s crtbegin.o%s }}
    9 
    10 *link:
    11 %{!qrtems: %(old_link)} \
    12 %{qrtems: -dc -dp -Bstatic -u __vectors -u download_entry -N }
    13 
    14 *endfile:
    15 %{!qrtems: %(old_endfile)} \
    16 %{qrtems: crtend.o%s ecrtn.o%s}
  • deleted file c/src/lib/libbsp/powerpc/virtex4/.svn/text-base/configure.ac.svn-base

    diff --git a/c/src/lib/libbsp/powerpc/virtex4/.svn/text-base/configure.ac.svn-base b/c/src/lib/libbsp/powerpc/virtex4/.svn/text-base/configure.ac.svn-base
    deleted file mode 100644
    index 4eba1e0..0000000
    + -  
    1 dnl Process this file with autoconf to produce a configure script.
    2 dnl
    3 dnl $Id: $
    4 
    5 AC_PREREQ(2.68)
    6 AC_INIT([rtems-c-src-lib-libbsp-powerpc-virtex4],[_RTEMS_VERSION],[http://www.rtems.org/bugzilla])
    7 AC_CONFIG_SRCDIR([bsp_specs])
    8 RTEMS_TOP(../../../../../..)
    9 
    10 RTEMS_CANONICAL_TARGET_CPU
    11 AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.11.1])
    12 RTEMS_BSP_CONFIGURE
    13 
    14 RTEMS_PROG_CC_FOR_TARGET
    15 RTEMS_CANONICALIZE_TOOLS
    16 RTEMS_PROG_CCAS
    17 
    18 RTEMS_CHECK_NETWORKING
    19 
    20 AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes")
    21 
    22 RTEMS_BSPOPTS_SET([PPC_USE_SPRG],[*],[1])
    23 RTEMS_BSPOPTS_HELP([PPC_USE_SPRG],
    24 [If defined, then the PowerPC specific code in RTEMS will use some
    25  of the special purpose registers to slightly optimize interrupt
    26  response time.  The use of these registers can conflict with
    27  other tools like debuggers.])
    28 
    29 RTEMS_BSPOPTS_SET([PPC_VECTOR_FILE_BASE],[*],[0x0100])
    30 RTEMS_BSPOPTS_HELP([PPC_VECTOR_FILE_BASE],
    31 [This defines the base address of the exception table.
    32  NOTE: Vectors are actually at 0xFFF00000 but file starts at offset.])
    33 
    34 RTEMS_BSP_CLEANUP_OPTIONS(0, 1)
    35 
    36 # Explicitly list all Makefiles here
    37 AC_CONFIG_FILES([Makefile])
    38 
    39 RTEMS_PPC_EXCEPTIONS
    40 
    41 AC_OUTPUT
  • deleted file c/src/lib/libbsp/powerpc/virtex4/.svn/text-base/preinstall.am.svn-base

    diff --git a/c/src/lib/libbsp/powerpc/virtex4/.svn/text-base/preinstall.am.svn-base b/c/src/lib/libbsp/powerpc/virtex4/.svn/text-base/preinstall.am.svn-base
    deleted file mode 100644
    index e945d2b..0000000
    + -  
    1 ## Automatically generated by ampolish3 - Do not edit
    2 
    3 if AMPOLISH3
    4 $(srcdir)/preinstall.am: Makefile.am
    5         $(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am
    6 endif
    7 
    8 PREINSTALL_DIRS =
    9 DISTCLEANFILES += $(PREINSTALL_DIRS)
    10 
    11 all-local: $(TMPINSTALL_FILES)
    12 
    13 TMPINSTALL_FILES =
    14 CLEANFILES = $(TMPINSTALL_FILES)
    15 
    16 all-am: $(PREINSTALL_FILES)
    17 
    18 PREINSTALL_FILES =
    19 CLEANFILES += $(PREINSTALL_FILES)
    20 
    21 $(PROJECT_LIB)/$(dirstamp):
    22         @$(MKDIR_P) $(PROJECT_LIB)
    23         @: > $(PROJECT_LIB)/$(dirstamp)
    24 PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp)
    25 
    26 $(PROJECT_INCLUDE)/$(dirstamp):
    27         @$(MKDIR_P) $(PROJECT_INCLUDE)
    28         @: > $(PROJECT_INCLUDE)/$(dirstamp)
    29 PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp)
    30 
    31 $(PROJECT_INCLUDE)/bsp/$(dirstamp):
    32         @$(MKDIR_P) $(PROJECT_INCLUDE)/bsp
    33         @: > $(PROJECT_INCLUDE)/bsp/$(dirstamp)
    34 PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(dirstamp)
    35 
    36 $(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp)
    37         $(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs
    38 PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs
    39 
    40 $(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp)
    41         $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h
    42 PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h
    43 
    44 $(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp)
    45         $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h
    46 PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h
    47 
    48 $(PROJECT_INCLUDE)/bsp/bootcard.h: ../../shared/include/bootcard.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
    49         $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bootcard.h
    50 PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bootcard.h
    51 
    52 $(PROJECT_INCLUDE)/coverhd.h: include/coverhd.h $(PROJECT_INCLUDE)/$(dirstamp)
    53         $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/coverhd.h
    54 PREINSTALL_FILES += $(PROJECT_INCLUDE)/coverhd.h
    55 
    56 $(PROJECT_LIB)/rtems_crti.$(OBJEXT): rtems_crti.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp)
    57         $(INSTALL_DATA) $< $(PROJECT_LIB)/rtems_crti.$(OBJEXT)
    58 TMPINSTALL_FILES += $(PROJECT_LIB)/rtems_crti.$(OBJEXT)
    59 
    60 $(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp)
    61         $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
    62 PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds
    63 
    64 $(PROJECT_INCLUDE)/bsp/irq.h: include/irq.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
    65         $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq.h
    66 PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq.h
    67 
    68 $(PROJECT_INCLUDE)/bsp/vectors.h: ../../../libcpu/@RTEMS_CPU@/@exceptions@/bspsupport/vectors.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
    69         $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/vectors.h
    70 PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/vectors.h
    71 
    72 $(PROJECT_INCLUDE)/bsp/irq_supp.h: ../../../libcpu/@RTEMS_CPU@/@exceptions@/bspsupport/irq_supp.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
    73         $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq_supp.h
    74 PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq_supp.h
    75 
  • deleted file c/src/lib/libbsp/powerpc/virtex4/clock/.svn/entries

    diff --git a/c/src/lib/libbsp/powerpc/virtex4/clock/.svn/entries b/c/src/lib/libbsp/powerpc/virtex4/clock/.svn/entries
    deleted file mode 100644
    index 651e363..0000000
    + -  
    1 10
    2 
    3 dir
    4 679
    5 file:///afs/slac.stanford.edu/g/cci/repositories/ctkrepo/rtems/trunk/bsp/virtex4/clock
    6 file:///afs/slac.stanford.edu/g/cci/repositories/ctkrepo
    7 
    8 
    9 
    10 2011-04-26T00:23:51.887907Z
    11 63
    12 claus
    13 
    14 
    15 
    16 
    17 
    18 
    19 
    20 
    21 
    22 
    23 
    24 
    25 
    26 
    27 a0e26fc9-5d4f-4a79-8961-08b194817e76
    28 
    290
    30 clock.c
    31 file
    32 
    33 
    34 
    35 
    36 2012-01-17T23:11:35.000000Z
    37 de933ec30087255fcf4e3fc95ed8071b
    38 2011-04-26T00:23:51.887907Z
    39 63
    40 claus
    41 has-props
    42 
    43 
    44 
    45 
    46 
    47 
    48 
    49 
    50 
    51 
    52 
    53 
    54 
    55 
    56 
    57 
    58 
    59 
    60 
    61 
    62 7156
  • deleted file c/src/lib/libbsp/powerpc/virtex4/clock/.svn/prop-base/clock.c.svn-base

    -
    
    diff --git a/c/src/lib/libbsp/powerpc/virtex4/clock/.svn/prop-base/clock.c.svn-base b/c/src/lib/libbsp/powerpc/virtex4/clock/.svn/prop-base/clock.c.svn-base
    deleted file mode 100644
    index ac6e613..0000000
    + -  
    1 K 13
    2 svn:eol-style
    3 V 6
    4 native
    5 K 12
    6 svn:keywords
    7 V 31
    8 Author Date HeadURL Id Revision
    9 END
  • deleted file c/src/lib/libbsp/powerpc/virtex4/clock/.svn/text-base/clock.c.svn-base

    diff --git a/c/src/lib/libbsp/powerpc/virtex4/clock/.svn/text-base/clock.c.svn-base b/c/src/lib/libbsp/powerpc/virtex4/clock/.svn/text-base/clock.c.svn-base
    deleted file mode 100644
    index aed4a6b..0000000
    + -  
    1 /*  clock.c
    2  *
    3  *  This routine initializes the interval timer on the
    4  *  PowerPC 403 CPU.  The tick frequency is specified by the bsp.
    5  *
    6  *  Author: Andrew Bray <andy@i-cubed.co.uk>
    7  *
    8  *  COPYRIGHT (c) 1995 by i-cubed ltd.
    9  *
    10  *  To anyone who acknowledges that this file is provided "AS IS"
    11  *  without any express or implied warranty:
    12  *      permission to use, copy, modify, and distribute this file
    13  *      for any purpose is hereby granted without fee, provided that
    14  *      the above copyright notice and this notice appears in all
    15  *      copies, and that the name of i-cubed limited not be used in
    16  *      advertising or publicity pertaining to distribution of the
    17  *      software without specific, written prior permission.
    18  *      i-cubed limited makes no representations about the suitability
    19  *      of this software for any purpose.
    20  *
    21  *  Derived from c/src/lib/libcpu/hppa1.1/clock/clock.c:
    22  *
    23  *  Modifications for deriving timer clock from cpu system clock by
    24  *              Thomas Doerfler <td@imd.m.isar.de>
    25  *  for these modifications:
    26  *  COPYRIGHT (c) 1997 by IMD, Puchheim, Germany.
    27  *
    28  *  COPYRIGHT (c) 1989-2007.
    29  *  On-Line Applications Research Corporation (OAR).
    30  *
    31  *  The license and distribution terms for this file may be
    32  *  found in the file LICENSE in this distribution or at
    33  *  http://www.rtems.com/license/LICENSE.
    34  *
    35  *  Modifications for PPC405GP by Dennis Ehlin
    36  *
    37  *  $Id$
    38  */
    39 
    40 #include <rtems.h>
    41 #include <rtems/clockdrv.h>
    42 #include <rtems/libio.h>
    43 #include <stdlib.h>                     /* for atexit() */
    44 #include <rtems/bspIo.h>
    45 #include <rtems/powerpc/powerpc.h>
    46 
    47 /*
    48  * check, which exception handling code is present
    49  */
    50 
    51 #include <bsp.h>
    52 
    53 #include <bsp/vectors.h>
    54 #include <bsp/irq_supp.h>
    55 
    56 volatile uint32_t   Clock_driver_ticks;
    57 static uint32_t   pit_value, tick_time;
    58 static bool auto_restart;
    59 
    60 void Clock_exit( void );
    61 
    62 rtems_isr_entry set_vector(                     /* returns old vector */
    63   rtems_isr_entry     handler,                  /* isr routine        */
    64   rtems_vector_number vector,                   /* vector number      */
    65   int                 type                      /* RTEMS or RAW intr  */
    66 );
    67 
    68 /*
    69  * These are set by clock driver during its init
    70  */
    71 
    72 rtems_device_major_number rtems_clock_major = ~0;
    73 rtems_device_minor_number rtems_clock_minor;
    74 
    75 static inline uint32_t   get_itimer(void)
    76 {
    77     register uint32_t   rc;
    78 
    79     asm volatile ("mfspr %0, 0x10c" : "=r" ((rc))); /* 405GP TBL */
    80 
    81     return rc;
    82 }
    83 
    84 /*
    85  *  ISR Handler
    86  */
    87 
    88 int Clock_isr(BSP_Exception_frame *f, unsigned int vector)
    89 {
    90     uint32_t   clicks_til_next_interrupt;
    91 #if defined(BSP_PPC403_CLOCK_ISR_IRQ_LEVEL)
    92     uint32_t   l_orig = _ISR_Get_level();
    93 #endif
    94     if (!auto_restart)
    95     {
    96       uint32_t   itimer_value;
    97       /*
    98        * setup for next interrupt; making sure the new value is reasonably
    99        * in the future.... in case we lost out on an interrupt somehow
    100        */
    101 
    102       itimer_value = get_itimer();
    103       tick_time += pit_value;
    104 
    105       /*
    106        * how far away is next interrupt *really*
    107        * It may be a long time; this subtraction works even if
    108        * Clock_clicks_interrupt < Clock_clicks_low_order via
    109        * the miracle of unsigned math.
    110        */
    111       clicks_til_next_interrupt = tick_time - itimer_value;
    112 
    113       /*
    114        * If it is too soon then bump it up.
    115        * This should only happen if CPU_HPPA_CLICKS_PER_TICK is too small.
    116        * But setting it low is useful for debug, so...
    117        */
    118 
    119       if (clicks_til_next_interrupt < 400)
    120       {
    121         tick_time = itimer_value + 1000;
    122         clicks_til_next_interrupt = 1000;
    123         /* XXX: count these! this should be rare */
    124       }
    125 
    126       /*
    127        * If it is too late, that means we missed the interrupt somehow.
    128        * Rather than wait 35-50s for a wrap, we just fudge it here.
    129        */
    130 
    131       if (clicks_til_next_interrupt > pit_value)
    132       {
    133         tick_time = itimer_value + 1000;
    134         clicks_til_next_interrupt = 1000;
    135         /* XXX: count these! this should never happen :-) */
    136       }
    137 
    138       asm volatile ("mtspr 0x3db, %0" :: "r"
    139                          (clicks_til_next_interrupt)); /* PIT */
    140     }
    141 
    142     /* Clear the Programmable Interrupt Status */
    143     asm volatile ( "mtspr 0x3d8, %0" :: "r" (0x08000000)); /* TSR */
    144 
    145     Clock_driver_ticks++;
    146 
    147     rtems_clock_tick();
    148 
    149     return 0;
    150 }
    151 
    152 void ClockOff(void)
    153 {
    154     register uint32_t   tcr;
    155 
    156     asm volatile ("mfspr %0, 0x3da" : "=r" ((tcr))); /* TCR */
    157 
    158     tcr &= ~ 0x04400000;
    159 
    160     asm volatile ("mtspr 0x3da, %0" : "=r" ((tcr)) : "0" ((tcr))); /* TCR */
    161 }
    162 
    163 void ClockOn(void)
    164 {
    165     uint32_t   iocr;
    166     register uint32_t   tcr;
    167 
    168     Clock_driver_ticks = 0;
    169 
    170     asm volatile ("mfdcr %0, 0x0b2" : "=r" (iocr));  /*405GP CPC0_CR1 */
    171     if (bsp_timer_internal_clock) {
    172       iocr &=~0x800000;               /* timer clocked from system clock CETE*/
    173     }
    174     else {
    175       iocr |= 0x800000;               /* select external timer clock CETE*/
    176     }
    177     asm volatile ("mtdcr 0x0b2, %0" : "=r" (iocr) : "0" (iocr)); /* 405GP CPC0_CR1 */
    178 
    179      /*
    180       * Enable auto restart
    181       */
    182 
    183     auto_restart = true;
    184 
    185     pit_value = rtems_configuration_get_microseconds_per_tick() *
    186       bsp_clicks_per_usec;
    187 
    188      /*
    189       * Set PIT value
    190       */
    191 
    192     asm volatile ("mtspr 0x3db, %0" : : "r" (pit_value)); /* PIT */
    193 
    194      /*
    195       * Set timer to autoreload, bit TCR->ARE = 1  0x0400000
    196       * Enable PIT interrupt, bit TCR->PIE = 1     0x4000000
    197       */
    198     tick_time = get_itimer() + pit_value;
    199 
    200     asm volatile ("mfspr %0, 0x3da" : "=r" ((tcr)));               /* TCR */
    201     tcr = (tcr & ~0x04400000) | (auto_restart ? 0x04400000 : 0x04000000);
    202     asm volatile ("mtspr 0x3da, %0" : "=r" ((tcr)) : "0" ((tcr))); /* TCR */
    203 }
    204 
    205 
    206 
    207 void Install_clock(ppc_exc_handler_t clock_isr)
    208 {
    209 #ifdef ppc403
    210    uint32_t   pvr;
    211 #endif /* ppc403 */
    212 
    213    Clock_driver_ticks = 0;
    214 
    215    /*
    216     * initialize the interval here
    217     * First tick is set to right amount of time in the future
    218     * Future ticks will be incremented over last value set
    219     * in order to provide consistent clicks in the face of
    220     * interrupt overhead
    221     */
    222 
    223    ppc_exc_set_handler( BSP_PPC403_CLOCK_HOOK_EXCEPTION, clock_isr );
    224    ClockOn();
    225 
    226    atexit(Clock_exit);
    227 }
    228 
    229 void
    230 ReInstall_clock(ppc_exc_handler_t clock_isr)
    231 {
    232   uint32_t   isrlevel = 0;
    233 
    234   rtems_interrupt_disable(isrlevel);
    235 
    236    ppc_exc_set_handler( BSP_PPC403_CLOCK_HOOK_EXCEPTION, clock_isr );
    237    ClockOn();
    238 
    239   rtems_interrupt_enable(isrlevel);
    240 }
    241 
    242 
    243 /*
    244  * Called via atexit()
    245  * Remove the clock interrupt handler by setting handler to NULL
    246  *
    247  * This will not work on the 405GP because
    248  * when bit's are set in TCR they can only be unset by a reset
    249  */
    250 
    251 void Clock_exit(void)
    252 {
    253   ClockOff();
    254   ppc_exc_set_handler( BSP_PPC403_CLOCK_HOOK_EXCEPTION, 0 );
    255 }
    256 
    257 rtems_device_driver Clock_initialize(
    258   rtems_device_major_number major,
    259   rtems_device_minor_number minor,
    260   void *pargp
    261 )
    262 {
    263   Install_clock( Clock_isr );
    264 
    265   /*
    266    * make major/minor avail to others such as shared memory driver
    267    */
    268 
    269   rtems_clock_major = major;
    270   rtems_clock_minor = minor;
    271 
    272   return RTEMS_SUCCESSFUL;
    273 }
  • deleted file c/src/lib/libbsp/powerpc/virtex4/include/.svn/entries

    diff --git a/c/src/lib/libbsp/powerpc/virtex4/include/.svn/entries b/c/src/lib/libbsp/powerpc/virtex4/include/.svn/entries
    deleted file mode 100644
    index fe37e44..0000000
    + -  
    1 10
    2 
    3 dir
    4 679
    5 file:///afs/slac.stanford.edu/g/cci/repositories/ctkrepo/rtems/trunk/bsp/virtex4/include
    6 file:///afs/slac.stanford.edu/g/cci/repositories/ctkrepo
    7 
    8 
    9 
    10 2011-04-26T00:23:51.887907Z
    11 63
    12 claus
    13 
    14 
    15 
    16 
    17 
    18 
    19 
    20 
    21 
    22 
    23 
    24 
    25 
    26 
    27 a0e26fc9-5d4f-4a79-8961-08b194817e76
    28 
    290
    30 coverhd.h
    31 file
    32 
    33 
    34 
    35 
    36 2012-01-17T23:11:35.000000Z
    37 36f2f5bee93af6b64fba440bf631a8dd
    38 2011-04-26T00:23:51.887907Z
    39 63
    40 claus
    41 has-props
    42 
    43 
    44 
    45 
    46 
    47 
    48 
    49 
    50 
    51 
    52 
    53 
    54 
    55 
    56 
    57 
    58 
    59 
    60 
    61 
    62 5708
    63 
    641
    65 irq.h
    66 file
    67 
    68 
    69 
    70 
    71 2012-01-17T23:11:35.000000Z
    72 043f7c3ce34d934aa718352d2df6b97d
    73 2011-04-26T00:23:51.887907Z
    74 63
    75 claus
    76 has-props
    77 
    78 
    79 
    80 
    81 
    82 
    83 
    84 
    85 
    86 
    87 
    88 
    89 
    90 
    91 
    92 
    93 
    94 
    95 
    96 
    97 265
    98 
    992
    100 bspopts.h.in
    101 file
    102 
    103 
    104 
    105 
    106 2012-01-20T22:45:05.000000Z
    107 bea64abea35e2f8ce5da097f7615e89c
    108 2011-04-26T00:23:51.887907Z
    109 63
    110 claus
    111 
    112 
    113 
    114 
    115 
    116 
    117 
    118 
    119 
    120 
    121 
    122 
    123 
    124 
    125 
    126 
    127 
    128 
    129 
    130 
    131 
    132 1412
    133 
    1343
    135 bsp.h
    136 file
    137 
    138 
    139 
    140 
    141 2012-01-17T23:11:35.000000Z
    142 0de2c5484269f3235ef815578924aaff
    143 2011-04-26T00:23:51.887907Z
    144 63
    145 claus
    146 has-props
    147 
    148 
    149 
    150 
    151 
    152 
    153 
    154 
    155 
    156 
    157 
    158 
    159 
    160 
    161 
    162 
    163 
    164 
  • deleted file c/src/lib/libbsp/powerpc/virtex4/include/.svn/prop-base/bsp.h.svn-base

    -
    -
    -2922
    -
    
    diff --git a/c/src/lib/libbsp/powerpc/virtex4/include/.svn/prop-base/bsp.h.svn-base b/c/src/lib/libbsp/powerpc/virtex4/include/.svn/prop-base/bsp.h.svn-base
    deleted file mode 100644
    index ac6e613..0000000
    + -  
    1 K 13
    2 svn:eol-style
    3 V 6
    4 native
    5 K 12
    6 svn:keywords
    7 V 31
    8 Author Date HeadURL Id Revision
    9 END
  • deleted file c/src/lib/libbsp/powerpc/virtex4/include/.svn/prop-base/coverhd.h.svn-base

    diff --git a/c/src/lib/libbsp/powerpc/virtex4/include/.svn/prop-base/coverhd.h.svn-base b/c/src/lib/libbsp/powerpc/virtex4/include/.svn/prop-base/coverhd.h.svn-base
    deleted file mode 100644
    index ac6e613..0000000
    + -  
    1 K 13
    2 svn:eol-style
    3 V 6
    4 native
    5 K 12
    6 svn:keywords
    7 V 31
    8 Author Date HeadURL Id Revision
    9 END
  • deleted file c/src/lib/libbsp/powerpc/virtex4/include/.svn/prop-base/irq.h.svn-base

    diff --git a/c/src/lib/libbsp/powerpc/virtex4/include/.svn/prop-base/irq.h.svn-base b/c/src/lib/libbsp/powerpc/virtex4/include/.svn/prop-base/irq.h.svn-base
    deleted file mode 100644
    index ac6e613..0000000
    + -  
    1 K 13
    2 svn:eol-style
    3 V 6
    4 native
    5 K 12
    6 svn:keywords
    7 V 31
    8 Author Date HeadURL Id Revision
    9 END
  • deleted file c/src/lib/libbsp/powerpc/virtex4/include/.svn/text-base/bsp.h.svn-base

    diff --git a/c/src/lib/libbsp/powerpc/virtex4/include/.svn/text-base/bsp.h.svn-base b/c/src/lib/libbsp/powerpc/virtex4/include/.svn/text-base/bsp.h.svn-base
    deleted file mode 100644
    index d8cd7f1..0000000
    + -  
    1 /*  bsp.h
    2  *
    3  *  This include file contains all GEN405 board IO definitions.
    4  *
    5  * derived from helas403/include/bsp.h:
    6  *  Id: bsp.h,v 1.4 2001/06/18 17:01:48 joel Exp
    7  *  Author:     Thomas Doerfler <td@imd.m.isar.de>
    8  *              IMD Ingenieurbuero fuer Microcomputertechnik
    9  *
    10  *  COPYRIGHT (c) 1998 by IMD
    11  *
    12  *  Changes from IMD are covered by the original distributions terms.
    13  *  This file has been derived from the papyrus BSP.
    14  *
    15  *  Author:     Andrew Bray <andy@i-cubed.co.uk>
    16  *
    17  *  COPYRIGHT (c) 1995 by i-cubed ltd.
    18  *
    19  *  To anyone who acknowledges that this file is provided "AS IS"
    20  *  without any express or implied warranty:
    21  *      permission to use, copy, modify, and distribute this file
    22  *      for any purpose is hereby granted without fee, provided that
    23  *      the above copyright notice and this notice appears in all
    24  *      copies, and that the name of i-cubed limited not be used in
    25  *      advertising or publicity pertaining to distribution of the
    26  *      software without specific, written prior permission.
    27  *      i-cubed limited makes no representations about the suitability
    28  *      of this software for any purpose.
    29  *
    30  *  Derived from c/src/lib/libbsp/no_cpu/no_bsp/include/bsp.h
    31  *
    32  *  COPYRIGHT (c) 1989-1999.
    33  *  On-Line Applications Research Corporation (OAR).
    34  *
    35  *  The license and distribution terms for this file may be
    36  *  found in the file LICENSE in this distribution or at
    37  *  http://www.rtems.com/license/LICENSE.
    38  *
    39  *  $Id$
    40  *
    41  */
    42 
    43 #ifndef _BSP_H
    44 #define _BSP_H
    45 
    46 #ifdef __cplusplus
    47 extern "C" {
    48 #endif
    49 
    50 #include <bspopts.h>
    51 
    52 /*
    53  *  confdefs.h overrides for this BSP:
    54  *   - number of termios serial ports (defaults to none)
    55  *   - Interrupt stack space is not minimum if defined.
    56  */
    57 
    58 /* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
    59 #define CONFIGURE_INTERRUPT_STACK_MEMORY  (16 * 1024)
    60 
    61 #define BSP_PPC403_CLOCK_HOOK_EXCEPTION ASM_BOOKE_DEC_VECTOR
    62 
    63 /* Keep libcpu/ppc403/console/console405.c happy */
    64 
    65 #define PPC_IRQ_EXT_UART0 0
    66 #define PPC_IRQ_EXT_UART1 0
    67 
    68 #ifdef ASM
    69 /* Definition of where to store registers in alignment handler */
    70 #define ALIGN_REGS 0x0140
    71 
    72 #else
    73 #include <rtems.h>
    74 #include <rtems/console.h>
    75 #include <rtems/clockdrv.h>
    76 #include <rtems/console.h>
    77 #include <rtems/iosupp.h>
    78 
    79 /* Constants */
    80 
    81 #define RAM_START 0
    82 #define RAM_END   0x00800000
    83 
    84 /* miscellaneous stuff assumed to exist */
    85 extern bool bsp_timer_internal_clock;   /* TRUE, when timer runs with CPU clk */
    86 
    87 extern rtems_configuration_table BSP_Configuration;     /* owned by BSP */
    88 
    89 /* functions */
    90 
    91 rtems_isr_entry set_vector(                     /* returns old vector */
    92   rtems_isr_entry     handler,                  /* isr routine        */
    93   rtems_vector_number vector,                   /* vector number      */
    94   int                 type                      /* RTEMS or RAW intr  */
    95 );
    96 #endif /* ASM */
    97 
    98 #ifdef __cplusplus
    99 }
    100 #endif
    101 
    102 #endif
  • deleted file c/src/lib/libbsp/powerpc/virtex4/include/.svn/text-base/bspopts.h.in.svn-base

    diff --git a/c/src/lib/libbsp/powerpc/virtex4/include/.svn/text-base/bspopts.h.in.svn-base b/c/src/lib/libbsp/powerpc/virtex4/include/.svn/text-base/bspopts.h.in.svn-base
    deleted file mode 100644
    index 203dde9..0000000
    + -  
    1 /* include/bspopts.h.in.  Generated from configure.ac by autoheader.  */
    2 
    3 /* If defined, then the BSP Framework will put a non-zero pattern into the
    4    RTEMS Workspace and C program heap. This should assist in finding code that
    5    assumes memory starts set to zero. */
    6 #undef BSP_DIRTY_MEMORY
    7 
    8 /* If defined, print a message and wait until pressed before resetting board
    9    when application exits. */
    10 #undef BSP_PRESS_KEY_FOR_RESET
    11 
    12 /* If defined, reset the board when the application exits. */
    13 #undef BSP_RESET_BOARD_AT_EXIT
    14 
    15 /* Define to the address where bug reports for this package should be sent. */
    16 #undef PACKAGE_BUGREPORT
    17 
    18 /* Define to the full name of this package. */
    19 #undef PACKAGE_NAME
    20 
    21 /* Define to the full name and version of this package. */
    22 #undef PACKAGE_STRING
    23 
    24 /* Define to the one symbol short name of this package. */
    25 #undef PACKAGE_TARNAME
    26 
    27 /* Define to the home page for this package. */
    28 #undef PACKAGE_URL
    29 
    30 /* Define to the version of this package. */
    31 #undef PACKAGE_VERSION
    32 
    33 /* If defined, then the PowerPC specific code in RTEMS will use some of the
    34    special purpose registers to slightly optimize interrupt response time. The
    35    use of these registers can conflict with other tools like debuggers. */
    36 #undef PPC_USE_SPRG
    37 
    38 /* This defines the base address of the exception table. NOTE: Vectors are
    39    actually at 0xFFF00000 but file starts at offset. */
    40 #undef PPC_VECTOR_FILE_BASE
  • deleted file c/src/lib/libbsp/powerpc/virtex4/include/.svn/text-base/coverhd.h.svn-base

    diff --git a/c/src/lib/libbsp/powerpc/virtex4/include/.svn/text-base/coverhd.h.svn-base b/c/src/lib/libbsp/powerpc/virtex4/include/.svn/text-base/coverhd.h.svn-base
    deleted file mode 100644
    index f39d324..0000000
    + -  
    1 /*  coverhd.h
    2  *
    3  *  This include file has defines to represent the overhead associated
    4  *  with calling a particular directive from C.  These are used in the
    5  *  Timing Test Suite to ignore the overhead required to pass arguments
    6  *  to directives.  On some CPUs and/or target boards, this overhead
    7  *  is significant and makes it difficult to distinguish internal
    8  *  RTEMS execution time from that used to call the directive.
    9  *  This file should be updated after running the C overhead timing
    10  *  test.  Once this update has been performed, the RTEMS Time Test
    11  *  Suite should be rebuilt to account for these overhead times in the
    12  *  timing results.
    13  *
    14  *  NOTE:  If these are all zero, then the times reported include
    15  *         all calling overhead including passing of arguments.
    16  *
    17  *  COPYRIGHT (c) 1989-1999.
    18  *  On-Line Applications Research Corporation (OAR).
    19  *
    20  *  The license and distribution terms for this file may be
    21  *  found in the file LICENSE in this distribution or at
    22  *  http://www.rtems.com/license/LICENSE.
    23  *
    24  *  $Id$
    25  */
    26 
    27 /*
    28  *  Updated for a 25MHz Papyrus by Andrew Bray <andy@i-cubed.co.uk>
    29  *
    30  *  Units are 100ns.
    31  *
    32  *  These numbers are of questionable use, as they are developed by calling
    33  *  the routine many times, thus getting its entry veneer into the (small)
    34  *  cache on the 403GA.  This in general is not true of the RTEMS timing
    35  *  tests, which usually call a routine only once, thus having no cache loaded
    36  *  advantage.
    37  *
    38  *  Whether the directive times are useful after deducting the function call
    39  *  overhead is also questionable.  The user is more interested generally
    40  *  in the total cost of a directive, not the cost if the procedure call
    41  *  is inlined!  (In general this is not true).
    42  *
    43  *  Andrew Bray 18/08/1995
    44  *
    45  */
    46 
    47 #ifndef __COVERHD_h
    48 #define __COVERHD_h
    49 
    50 #ifdef __cplusplus
    51 extern "C" {
    52 #endif
    53 
    54 #define CALLING_OVERHEAD_INITIALIZE_EXECUTIVE      1
    55 #define CALLING_OVERHEAD_SHUTDOWN_EXECUTIVE        1
    56 #define CALLING_OVERHEAD_TASK_CREATE               3
    57 #define CALLING_OVERHEAD_TASK_IDENT                1
    58 #define CALLING_OVERHEAD_TASK_START                1
    59 #define CALLING_OVERHEAD_TASK_RESTART              1
    60 #define CALLING_OVERHEAD_TASK_DELETE               1
    61 #define CALLING_OVERHEAD_TASK_SUSPEND              1
    62 #define CALLING_OVERHEAD_TASK_RESUME               1
    63 #define CALLING_OVERHEAD_TASK_SET_PRIORITY         1
    64 #define CALLING_OVERHEAD_TASK_MODE                 1
    65 #define CALLING_OVERHEAD_TASK_GET_NOTE             1
    66 #define CALLING_OVERHEAD_TASK_SET_NOTE             1
    67 #define CALLING_OVERHEAD_TASK_WAKE_WHEN            4
    68 #define CALLING_OVERHEAD_TASK_WAKE_AFTER           1
    69 #define CALLING_OVERHEAD_INTERRUPT_CATCH           1
    70 #define CALLING_OVERHEAD_CLOCK_GET                 4
    71 #define CALLING_OVERHEAD_CLOCK_SET                 3
    72 #define CALLING_OVERHEAD_CLOCK_TICK                1
    73 
    74 #define CALLING_OVERHEAD_TIMER_CREATE              1
    75 #define CALLING_OVERHEAD_TIMER_IDENT               1
    76 #define CALLING_OVERHEAD_TIMER_DELETE              1
    77 #define CALLING_OVERHEAD_TIMER_FIRE_AFTER          2
    78 #define CALLING_OVERHEAD_TIMER_FIRE_WHEN           5
    79 #define CALLING_OVERHEAD_TIMER_RESET               1
    80 #define CALLING_OVERHEAD_TIMER_CANCEL              1
    81 #define CALLING_OVERHEAD_SEMAPHORE_CREATE          2
    82 #define CALLING_OVERHEAD_SEMAPHORE_IDENT           1
    83 #define CALLING_OVERHEAD_SEMAPHORE_DELETE          1
    84 #define CALLING_OVERHEAD_SEMAPHORE_OBTAIN          1
    85 #define CALLING_OVERHEAD_SEMAPHORE_RELEASE         1
    86 #define CALLING_OVERHEAD_MESSAGE_QUEUE_CREATE      2
    87 #define CALLING_OVERHEAD_MESSAGE_QUEUE_IDENT       1
    88 #define CALLING_OVERHEAD_MESSAGE_QUEUE_DELETE      1
    89 #define CALLING_OVERHEAD_MESSAGE_QUEUE_SEND        1
    90 #define CALLING_OVERHEAD_MESSAGE_QUEUE_URGENT      1
    91 #define CALLING_OVERHEAD_MESSAGE_QUEUE_BROADCAST   1
    92 #define CALLING_OVERHEAD_MESSAGE_QUEUE_RECEIVE     2
    93 #define CALLING_OVERHEAD_MESSAGE_QUEUE_FLUSH       1
    94 
    95 #define CALLING_OVERHEAD_EVENT_SEND                1
    96 #define CALLING_OVERHEAD_EVENT_RECEIVE             2
    97 #define CALLING_OVERHEAD_SIGNAL_CATCH              1
    98 #define CALLING_OVERHEAD_SIGNAL_SEND               1
    99 #define CALLING_OVERHEAD_PARTITION_CREATE          3
    100 #define CALLING_OVERHEAD_PARTITION_IDENT           1
    101 #define CALLING_OVERHEAD_PARTITION_DELETE          1
    102 #define CALLING_OVERHEAD_PARTITION_GET_BUFFER      1
    103 #define CALLING_OVERHEAD_PARTITION_RETURN_BUFFER   1
    104 #define CALLING_OVERHEAD_REGION_CREATE             3
    105 #define CALLING_OVERHEAD_REGION_IDENT              1
    106 #define CALLING_OVERHEAD_REGION_DELETE             1
    107 #define CALLING_OVERHEAD_REGION_GET_SEGMENT        2
    108 #define CALLING_OVERHEAD_REGION_RETURN_SEGMENT     1
    109 #define CALLING_OVERHEAD_PORT_CREATE               2
    110 #define CALLING_OVERHEAD_PORT_IDENT                1
    111 #define CALLING_OVERHEAD_PORT_DELETE               1
    112 #define CALLING_OVERHEAD_PORT_EXTERNAL_TO_INTERNAL 1
    113 #define CALLING_OVERHEAD_PORT_INTERNAL_TO_EXTERNAL 2
    114 
    115 #define CALLING_OVERHEAD_IO_INITIALIZE             2
    116 #define CALLING_OVERHEAD_IO_OPEN                   2
    117 #define CALLING_OVERHEAD_IO_CLOSE                  2
    118 #define CALLING_OVERHEAD_IO_READ                   2
    119 #define CALLING_OVERHEAD_IO_WRITE                  2
    120 #define CALLING_OVERHEAD_IO_CONTROL                2
    121 #define CALLING_OVERHEAD_FATAL_ERROR_OCCURRED      1
    122 #define CALLING_OVERHEAD_RATE_MONOTONIC_CREATE     1
    123 #define CALLING_OVERHEAD_RATE_MONOTONIC_IDENT      1
    124 #define CALLING_OVERHEAD_RATE_MONOTONIC_DELETE     1
    125 #define CALLING_OVERHEAD_RATE_MONOTONIC_CANCEL     1
    126 #define CALLING_OVERHEAD_RATE_MONOTONIC_PERIOD     1
    127 #define CALLING_OVERHEAD_MULTIPROCESSING_ANNOUNCE  1
    128 
    129 #ifdef __cplusplus
    130 }
    131 #endif
    132 
    133 #endif
  • deleted file c/src/lib/libbsp/powerpc/virtex4/include/.svn/text-base/irq.h.svn-base

    diff --git a/c/src/lib/libbsp/powerpc/virtex4/include/.svn/text-base/irq.h.svn-base b/c/src/lib/libbsp/powerpc/virtex4/include/.svn/text-base/irq.h.svn-base
    deleted file mode 100644
    index aacf0f6..0000000
    + -  
    1 #ifndef VIRTEX4_RTEMSBSP_IRQ_H
    2 #define VIRTEX4_RTEMSBSP_IRQ_H
    3 
    4 #warning "virtex4 BSP's <bsp/irq.h> is BOGUS; this BSP implements no interrupt handling\nheader exists to let everything compile\n"
    5 
    6 #define BSP_SHARED_HANDLER_SUPPORT 1
    7 
    8 #include <rtems/irq.h>
    9 
    10 #endif
  • deleted file c/src/lib/libbsp/powerpc/virtex4/make/.svn/entries

    diff --git a/c/src/lib/libbsp/powerpc/virtex4/make/.svn/entries b/c/src/lib/libbsp/powerpc/virtex4/make/.svn/entries
    deleted file mode 100644
    index c055063..0000000
    + -  
    1 10
    2 
    3 dir
    4 679
    5 file:///afs/slac.stanford.edu/g/cci/repositories/ctkrepo/rtems/trunk/bsp/virtex4/make
    6 file:///afs/slac.stanford.edu/g/cci/repositories/ctkrepo
    7 
    8 
    9 
    10 2011-04-26T00:23:51.887907Z
    11 63
    12 claus
    13 
    14 
    15 
    16 
    17 
    18 
    19 
    20 
    21 
    22 
    23 
    24 
    25 
    26 
    27 a0e26fc9-5d4f-4a79-8961-08b194817e76
    28 
    290
    30 custom
    31 dir
  • deleted file c/src/lib/libbsp/powerpc/virtex4/make/custom/.svn/entries

    -
    
    diff --git a/c/src/lib/libbsp/powerpc/virtex4/make/custom/.svn/entries b/c/src/lib/libbsp/powerpc/virtex4/make/custom/.svn/entries
    deleted file mode 100644
    index b9d91de..0000000
    + -  
    1 10
    2 
    3 dir
    4 679
    5 file:///afs/slac.stanford.edu/g/cci/repositories/ctkrepo/rtems/trunk/bsp/virtex4/make/custom
    6 file:///afs/slac.stanford.edu/g/cci/repositories/ctkrepo
    7 
    8 
    9 
    10 2011-04-26T00:23:51.887907Z
    11 63
    12 claus
    13 
    14 
    15 
    16 
    17 
    18 
    19 
    20 
    21 
    22 
    23 
    24 
    25 
    26 
    27 a0e26fc9-5d4f-4a79-8961-08b194817e76
    28 
    290
    30 virtex4.cfg
    31 file
    32 
    33 
    34 
    35 
    36 2012-01-17T23:11:35.000000Z
    37 cc27b357f5decd6ce6af35cc7c53ad6a
    38 2011-04-26T00:23:51.887907Z
    39 63
    40 claus
    41 
    42 
    43 
    44 
    45 
    46 
    47 
    48 
    49 
    50 
    51 
    52 
    53 
    54 
    55 
    56 
    57 
    58 
    59 
    60 
    61 
    62 470
  • deleted file c/src/lib/libbsp/powerpc/virtex4/make/custom/.svn/text-base/virtex4.cfg.svn-base

    -
    
    diff --git a/c/src/lib/libbsp/powerpc/virtex4/make/custom/.svn/text-base/virtex4.cfg.svn-base b/c/src/lib/libbsp/powerpc/virtex4/make/custom/.svn/text-base/virtex4.cfg.svn-base
    deleted file mode 100644
    index 333b144..0000000
    + -  
    1 include $(RTEMS_ROOT)/make/custom/default.cfg
    2 
    3 RTEMS_CPU=powerpc
    4 RTEMS_CPU_MODEL=ppc405
    5 
    6 #  This contains the compiler options necessary to select the CPU model
    7 #  and (hopefully) optimize for it.
    8 #
    9 CPU_CFLAGS = -mcpu=405 -Dppc405
    10 
    11 # optimize flag: typically -O2
    12 CFLAGS_OPTIMIZE_V = -O2 -g -fno-keep-inline-functions
    13 
    14 # Miscellaneous additions go here
    15 define bsp-post-link
    16         $(default-bsp-post-link)
    17         $(OBJCOPY) -O srec $(basename $@).exe $(basename $@)$(DOWNEXT)
    18 endef
    19 
  • deleted file c/src/lib/libbsp/powerpc/virtex4/startup/.svn/entries

    diff --git a/c/src/lib/libbsp/powerpc/virtex4/startup/.svn/entries b/c/src/lib/libbsp/powerpc/virtex4/startup/.svn/entries
    deleted file mode 100644
    index a526501..0000000
    + -  
    1 10
    2 
    3 dir
    4 679
    5 file:///afs/slac.stanford.edu/g/cci/repositories/ctkrepo/rtems/trunk/bsp/virtex4/startup
    6 file:///afs/slac.stanford.edu/g/cci/repositories/ctkrepo
    7 
    8 
    9 
    10 2012-02-17T03:04:22.654458Z
    11 674
    12 claus
    13 
    14 
    15 
    16 
    17 
    18 
    19 
    20 
    21 
    22 
    23 
    24 
    25 
    26 
    27 a0e26fc9-5d4f-4a79-8961-08b194817e76
    28 
    29 
    30 
    31 
    32 
    33 
    34 
    35 
    36 ()
    37 
    380
    39 bspstart.c
    40 file
    41 
    42 
    43 
    44 
    45 2012-01-17T23:11:35.000000Z
    46 bd33c8c8a06f536696e08e09a7482386
    47 2011-05-25T20:42:55.687598Z
    48 138
    49 tether
    50 has-props
    51 
    52 
    53 
    54 
    55 
    56 
    57 
    58 
    59 
    60 
    61 
    62 
    63 
    64 
    65 
    66 
    67 
    68 
    69 
    70 
    71 6403
    72 
    731
    74 linkcmds
    75 file
    76 
    77 
    78 
    79 
    80 2012-02-17T03:10:21.000000Z
    81 516cc08b8eb47cc5c69fcbe465415a99
    82 2012-02-17T03:04:22.654458Z
    83 674
    84 claus
    85 
    86 
    87 
    88 
    89 
    90 
    91 
    92 
    93 
    94 
    95 
    96 
    97 
    98 
    99 
    100 
    101 
    102 
    103 
    104 
    105 
    106 10769
    107 
    1082
    109 bspclean.c
    110 file
    111 
    112 
    113 
    114 
    115 2012-01-17T23:11:35.000000Z
    116 acfd58e7e7ea9bcc7948a55ecf51db6e
    117 2011-05-25T20:03:03.947292Z
    118 135
    119 tether
    120 has-props
    121 
    122 
    123 
    124 
    125 
    126 
    127 
    128 
    129 
    130 
    131 
    132 
    133 
    134 
    135 
    136 
    137 
    138 
    139 
    140 
    141 1486
    142 
    1433
    144 dummy_console.c
    145 file
    146 
    147 
    148 
    149 
    150 2012-01-17T23:11:35.000000Z
    151 714a31fb2f6e58a26d5d2714d640a3fc
    152 2011-05-25T20:42:55.687598Z
    153 138
    154 tether
    155 has-props
    156 
    157 
    158 
    159 
    160 
    161 
    162 
    163 
    164 
    165 
    166 
    167 
    168 
    169 
    170 
    171 
    172 
    173 
    174 
    175 
    176 2342
    177 
    1784
    179 start.S
    180 file
    181 
    182 
    183 
    184 
    185 
    186 373ecd83a68609ef141f19bfd907629a
  • deleted file c/src/lib/libbsp/powerpc/virtex4/startup/.svn/prop-base/bspclean.c.svn-base

    -2012-02-17T03:04:22.654458Z
    -674
    -claus
    -has-props
    -
    
    diff --git a/c/src/lib/libbsp/powerpc/virtex4/startup/.svn/prop-base/bspclean.c.svn-base b/c/src/lib/libbsp/powerpc/virtex4/startup/.svn/prop-base/bspclean.c.svn-base
    deleted file mode 100644
    index ac6e613..0000000
    + -  
    1 K 13
    2 svn:eol-style
    3 V 6
    4 native
    5 K 12
    6 svn:keywords
    7 V 31
    8 Author Date HeadURL Id Revision
    9 END
  • deleted file c/src/lib/libbsp/powerpc/virtex4/startup/.svn/prop-base/bspstart.c.svn-base

    diff --git a/c/src/lib/libbsp/powerpc/virtex4/startup/.svn/prop-base/bspstart.c.svn-base b/c/src/lib/libbsp/powerpc/virtex4/startup/.svn/prop-base/bspstart.c.svn-base
    deleted file mode 100644
    index ac6e613..0000000
    + -  
    1 K 13
    2 svn:eol-style
    3 V 6
    4 native
    5 K 12
    6 svn:keywords
    7 V 31
    8 Author Date HeadURL Id Revision
    9 END
  • deleted file c/src/lib/libbsp/powerpc/virtex4/startup/.svn/prop-base/dummy_console.c.svn-base

    diff --git a/c/src/lib/libbsp/powerpc/virtex4/startup/.svn/prop-base/dummy_console.c.svn-base b/c/src/lib/libbsp/powerpc/virtex4/startup/.svn/prop-base/dummy_console.c.svn-base
    deleted file mode 100644
    index ac6e613..0000000
    + -  
    1 K 13
    2 svn:eol-style
    3 V 6
    4 native
    5 K 12
    6 svn:keywords
    7 V 31
    8 Author Date HeadURL Id Revision
    9 END
  • deleted file c/src/lib/libbsp/powerpc/virtex4/startup/.svn/prop-base/start.S.svn-base

    diff --git a/c/src/lib/libbsp/powerpc/virtex4/startup/.svn/prop-base/start.S.svn-base b/c/src/lib/libbsp/powerpc/virtex4/startup/.svn/prop-base/start.S.svn-base
    deleted file mode 100644
    index ac6e613..0000000
    + -  
    1 K 13
    2 svn:eol-style
    3 V 6
    4 native
    5 K 12
    6 svn:keywords
    7 V 31
    8 Author Date HeadURL Id Revision
    9 END
  • deleted file c/src/lib/libbsp/powerpc/virtex4/startup/.svn/text-base/bspclean.c.svn-base

    diff --git a/c/src/lib/libbsp/powerpc/virtex4/startup/.svn/text-base/bspclean.c.svn-base b/c/src/lib/libbsp/powerpc/virtex4/startup/.svn/text-base/bspclean.c.svn-base
    deleted file mode 100644
    index 59f33ca..0000000
    + -  
    1 /*  bsp_cleanup()
    2  *
    3  *  This routine normally is part of start.s and usually returns
    4  *  control to a monitor.
    5  *
    6  *  INPUT:  NONE
    7  *
    8  *  OUTPUT: NONE
    9  *
    10  *  Author:     Andrew Bray <andy@i-cubed.co.uk>
    11  *
    12  *  COPYRIGHT (c) 1995 by i-cubed ltd.
    13  *
    14  *  To anyone who acknowledges that this file is provided "AS IS"
    15  *  without any express or implied warranty:
    16  *      permission to use, copy, modify, and distribute this file
    17  *      for any purpose is hereby granted without fee, provided that
    18  *      the above copyright notice and this notice appears in all
    19  *      copies, and that the name of i-cubed limited not be used in
    20  *      advertising or publicity pertaining to distribution of the
    21  *      software without specific, written prior permission.
    22  *      i-cubed limited makes no representations about the suitability
    23  *      of this software for any purpose.
    24  *
    25  *  Derived from c/src/lib/libbsp/no_cpu/no_bsp/startup/bspclean.c:
    26  *
    27  *  COPYRIGHT (c) 1989-1999.
    28  *  On-Line Applications Research Corporation (OAR).
    29  *
    30  *  The license and distribution terms for this file may be
    31  *  found in the file LICENSE in this distribution or at
    32  *  http://www.rtems.com/license/LICENSE.
    33  *
    34  *  $Id$
    35  */
    36 
    37 #include <rtems.h>
    38 #include <bsp.h>
    39 
    40 static void __app_noopfun(void) {}
    41 
    42 void app_bsp_cleanup(void)
    43 __attribute__(( weak, alias("__app_noopfun") ));
    44 
    45 void bsp_cleanup( void )
    46 {
    47   app_bsp_cleanup();
    48   /*  rtems_fatal_error_occurred(0); */
    49 }
  • deleted file c/src/lib/libbsp/powerpc/virtex4/startup/.svn/text-base/bspstart.c.svn-base

    diff --git a/c/src/lib/libbsp/powerpc/virtex4/startup/.svn/text-base/bspstart.c.svn-base b/c/src/lib/libbsp/powerpc/virtex4/startup/.svn/text-base/bspstart.c.svn-base
    deleted file mode 100644
    index c4ab655..0000000
    + -  
    1 /*  bsp_start()
    2  *
    3  *  This routine starts the application.  It includes application,
    4  *  board, and monitor specific initialization and configuration.
    5  *  The generic CPU dependent initialization has been performed
    6  *  before this routine is invoked.
    7  *
    8  *  INPUT:  NONE
    9  *
    10  *  OUTPUT: NONE
    11  *
    12  *  Author:     Thomas Doerfler <td@imd.m.isar.de>
    13  *              IMD Ingenieurbuero fuer Microcomputertechnik
    14  *
    15  *  COPYRIGHT (c) 1998 by IMD
    16  *
    17  *  Changes from IMD are covered by the original distributions terms.
    18  *  This file has been derived from the papyrus BSP:
    19  *
    20  *  Author:     Andrew Bray <andy@i-cubed.co.uk>
    21  *
    22  *  COPYRIGHT (c) 1995 by i-cubed ltd.
    23  *
    24  *  To anyone who acknowledges that this file is provided "AS IS"
    25  *  without any express or implied warranty:
    26  *      permission to use, copy, modify, and distribute this file
    27  *      for any purpose is hereby granted without fee, provided that
    28  *      the above copyright notice and this notice appears in all
    29  *      copies, and that the name of i-cubed limited not be used in
    30  *      advertising or publicity pertaining to distribution of the
    31  *      software without specific, written prior permission.
    32  *      i-cubed limited makes no representations about the suitability
    33  *      of this software for any purpose.
    34  *
    35  *  Modifications for spooling console driver and control of memory layout
    36  *  with linker command file by
    37  *              Thomas Doerfler <td@imd.m.isar.de>
    38  *  for these modifications:
    39  *  COPYRIGHT (c) 1997 by IMD, Puchheim, Germany.
    40  *
    41  *  To anyone who acknowledges that this file is provided "AS IS"
    42  *  without any express or implied warranty:
    43  *      permission to use, copy, modify, and distribute this file
    44  *      for any purpose is hereby granted without fee, provided that
    45  *      the above copyright notice and this notice appears in all
    46  *      copies. IMD makes no representations about the suitability
    47  *      of this software for any purpose.
    48  *
    49  *  Derived from c/src/lib/libbsp/no_cpu/no_bsp/startup/bspstart.c:
    50  *
    51  *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
    52  *  On-Line Applications Research Corporation (OAR).
    53  *
    54  *  Modifications for PPC405GP by Dennis Ehlin
    55  *  Modifications for Virtex4 by Richard Claus <claus@slac.stanford.edu>
    56  *
    57  *  $Id$
    58  */
    59 
    60 #include <string.h>
    61 #include <fcntl.h>
    62 
    63 #include <bsp.h>
    64 #include <rtems/libio.h>
    65 #include <rtems/libcsupport.h>
    66 #include <rtems/bspIo.h>
    67 #include <bsp/vectors.h>
    68 #include <libcpu/spr.h>
    69 #include <libcpu/cpuIdent.h>
    70 
    71 #define DO_DOWN_ALIGN(x,a) ((x) & ~((a)-1))
    72 
    73 #define DO_UP_ALIGN(x,a)   DO_DOWN_ALIGN(((x) + (a) - 1 ),a)
    74 
    75 #define CPU_DOWN_ALIGN(x)  DO_DOWN_ALIGN(x, CPU_ALIGNMENT)
    76 #define CPU_UP_ALIGN(x)    DO_UP_ALIGN(x, CPU_ALIGNMENT)
    77 
    78 
    79 /* Expected by clock.c */
    80 uint32_t    bsp_clicks_per_usec;
    81 bool        bsp_timer_internal_clock;   /* true, when timer runs with CPU clk */
    82 uint32_t    bsp_timer_least_valid;
    83 uint32_t    bsp_timer_average_overhead;
    84 
    85 
    86 /* Provide weak aliases so that RTEMS distribution builds; the
    87  * generated executables are bogus, however...
    88  */
    89 static void __app_noopfun(void) {}
    90 
    91 void app_bsp_start(void)
    92 __attribute__(( weak, alias("__app_noopfun") ));
    93 
    94 void app_bsp_pretasking_hook(void)
    95 __attribute__(( weak, alias("__app_noopfun") ));
    96 
    97 void app_bsp_predriver_hook(void)
    98 __attribute__(( weak, alias("__app_noopfun") ));
    99 
    100 
    101 LINKER_SYMBOL(__bsp_ram_start);
    102 LINKER_SYMBOL(__bsp_ram_end);
    103 LINKER_SYMBOL(WorkAreaBase);
    104 LINKER_SYMBOL(MsgAreaBase);
    105 LINKER_SYMBOL(MsgAreaSize);
    106 
    107 static char* bspMsgBuffer = (char*)MsgAreaBase;
    108 
    109 static void __bsp_outchar_to_memory(char c)
    110 {
    111   static char* msgBuffer = (char*)MsgAreaBase;
    112   *msgBuffer++ = c;
    113   if (msgBuffer >= &bspMsgBuffer[(int)MsgAreaSize])  msgBuffer = bspMsgBuffer;
    114   *msgBuffer   = 0x00;                /* Overwrite next location to show EOM */
    115 }
    116 
    117 
    118 void BSP_ask_for_reset(void)
    119 {
    120   printk("\nSystem stopped, press RESET");
    121   for(;;);
    122   /*__asm__ __volatile ("sc");*/
    123 }
    124 
    125 
    126 void BSP_panic(char *s)
    127 {
    128   printk("\n%s PANIC %s\n", _RTEMS_version, s);
    129   BSP_ask_for_reset();
    130 }
    131 
    132 
    133 void _BSP_Fatal_error(unsigned int v)
    134 {
    135   printk("\n%s FATAL ERROR %x\n", _RTEMS_version, v);
    136   BSP_ask_for_reset();
    137 }
    138 
    139 
    140 /*===================================================================*/
    141 
    142 /*
    143  *  BSP start routine.  Called by boot_card().
    144  *
    145  *  This routine does the bulk of the system initialization.
    146  */
    147 void bsp_start(void)
    148 {
    149   rtems_status_code  sc = RTEMS_SUCCESSFUL;
    150   uintptr_t          intrStackStart;
    151   uintptr_t          intrStackSize;
    152   ppc_cpu_id_t       myCpu;
    153   ppc_cpu_revision_t myCpuRevision;
    154 
    155   /* Set the character output function;  The application may override this */
    156   BSP_output_char = __bsp_outchar_to_memory;
    157 
    158   /*
    159    * Get CPU identification dynamically. Note that the get_ppc_cpu_type()
    160    * function stores the result in global variables
    161    * so that it can be used later...
    162    */
    163   myCpu         = get_ppc_cpu_type();
    164   myCpuRevision = get_ppc_cpu_revision();
    165   printk("CPU: 0x%04x,  Revision: 0x%04x = %d,  Name: %s\n",
    166          myCpu, myCpuRevision, myCpuRevision, get_ppc_cpu_type_name(myCpu));
    167 
    168   /*
    169    *  Initialize the device driver parameters
    170    */
    171 
    172   /* Timebase register ticks/microsecond;  The application may override these */
    173   bsp_clicks_per_usec        = 350;
    174   bsp_timer_internal_clock   = true;
    175   bsp_timer_average_overhead = 2;
    176   bsp_timer_least_valid      = 3;
    177 
    178   /*
    179    * Initialize the interrupt related settings.
    180    */
    181   intrStackStart = CPU_UP_ALIGN((uint32_t)__bsp_ram_start);
    182   intrStackSize  = rtems_configuration_get_interrupt_stack_size();
    183 
    184   /*
    185    * Initialize default raw exception handlers.
    186    */
    187   sc = ppc_exc_initialize(PPC_INTERRUPT_DISABLE_MASK_DEFAULT,
    188                           intrStackStart,
    189                           intrStackSize);
    190   if (sc != RTEMS_SUCCESSFUL)  BSP_panic("Cannot initialize exceptions");
    191 
    192   /* Continue with application-specific initialization */
    193   app_bsp_start();
    194 }
    195 
    196 
    197 /*
    198  *  BSP pretasking hook.  Called just before drivers are initialized.
    199  *  Used to setup libc and install any BSP extensions.
    200  *
    201  *  Must not use libc (to do io) from here, since drivers are not yet
    202  *  initialized.
    203  */
    204 
    205 void bsp_pretasking_hook(void)
    206 {
    207   app_bsp_pretasking_hook();
    208 }
    209 
    210 
    211 /*
    212  *  BSP predriver hook.  Called by boot_card() just before drivers are
    213  *  initialized.  Clear out any stale interrupts here.
    214  */
    215 void bsp_predriver_hook(void)
    216 {
    217   app_bsp_predriver_hook();
    218 }
  • deleted file c/src/lib/libbsp/powerpc/virtex4/startup/.svn/text-base/dummy_console.c.svn-base

    diff --git a/c/src/lib/libbsp/powerpc/virtex4/startup/.svn/text-base/dummy_console.c.svn-base b/c/src/lib/libbsp/powerpc/virtex4/startup/.svn/text-base/dummy_console.c.svn-base
    deleted file mode 100644
    index 30d0e4d..0000000
    + -  
    1 #include <rtems.h>
    2 #include <rtems/libio.h>
    3 
    4 static ssize_t __app_noopfun(int minor, const char* buf, size_t len) {return 0;}
    5 
    6 ssize_t app_memory_write(int minor, const char* buf, size_t len)
    7 __attribute__(( weak, alias("__app_noopfun") ));
    8 
    9 static rtems_termios_callbacks gMemCallbacks = {
    10         0,                /* firstOpen */
    11         0,                /* lastClose */
    12         0,                /* PollRead */
    13         app_memory_write, /* write */
    14         0,                /* SetAttr */
    15         0,                /* stopRemoteTx */
    16         0,                /* startRemoteTx */
    17         0                 /* outputUsesInterrupts */
    18 };
    19 
    20 rtems_device_driver console_initialize(rtems_device_major_number major,
    21                                        rtems_device_minor_number minor,
    22                                        void*                     arg)
    23 {
    24   rtems_status_code status;
    25 
    26   rtems_termios_initialize();
    27 
    28   status = rtems_io_register_name("/dev/console", major, 0);
    29 
    30   if (status != RTEMS_SUCCESSFUL)  rtems_fatal_error_occurred (status);
    31   return RTEMS_SUCCESSFUL;
    32 }
    33 
    34 rtems_device_driver console_open(rtems_device_major_number major,
    35                                  rtems_device_minor_number minor,
    36                                  void*                     arg)
    37 {
    38   rtems_status_code sc;
    39 
    40   sc = rtems_termios_open (major, minor, arg, &gMemCallbacks);
    41 
    42   return sc;
    43 }
    44 
    45 rtems_device_driver console_close(rtems_device_major_number major,
    46                                   rtems_device_minor_number minor,
    47                                   void*                     arg)
    48 {
    49   return rtems_termios_close(arg);
    50 }
    51 
    52 rtems_device_driver console_read(rtems_device_major_number major,
    53                                  rtems_device_minor_number minor,
    54                                  void*                     arg)
    55 {
    56   return rtems_termios_read(arg);
    57 }
    58 
    59 rtems_device_driver console_write(rtems_device_major_number major,
    60                                   rtems_device_minor_number minor,
    61                                   void*                     arg)
    62 {
    63   return rtems_termios_write(arg);
    64 }
    65 
    66 rtems_device_driver console_control(rtems_device_major_number major,
    67                                     rtems_device_minor_number minor,
    68                                     void*                     arg)
    69 {
    70   return rtems_termios_ioctl(arg);
    71 }
  • deleted file c/src/lib/libbsp/powerpc/virtex4/startup/.svn/text-base/linkcmds.svn-base

    diff --git a/c/src/lib/libbsp/powerpc/virtex4/startup/.svn/text-base/linkcmds.svn-base b/c/src/lib/libbsp/powerpc/virtex4/startup/.svn/text-base/linkcmds.svn-base
    deleted file mode 100644
    index 977571c..0000000
    + -  
    1 /*
    2  *  This file contains directives for the GNU linker which are specific to the
    3  *  Virtex 4 PPC 405.  No assumptions are made on the firmware in the FPGA.
    4  *  This file is intended to be used together with start.S to generate
    5  *  downloadable code.
    6  */
    7 
    8 OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
    9 OUTPUT_ARCH(powerpc)
    10 
    11 ENTRY(download_entry)
    12 
    13 MsgAreaSize       = DEFINED(MsgAreaSize)   ? MsgAreaSize   : 1K;
    14 RamBase           = DEFINED(RamBase)       ? RamBase       : 0x0;
    15 RamSize           = DEFINED(RamSize)       ? RamSize       : 128M - MsgAreaSize;
    16 IntrStackSize     = DEFINED(IntrStackSize) ? IntrStackSize : 16K;
    17 StackSize         = DEFINED(StackSize)     ? StackSize     : 64K;
    18 HeapSize          = DEFINED(HeapSize)      ? HeapSize      : 0; /* 0=Use def */
    19 
    20 
    21 MEMORY
    22 {
    23   VECTORS         : ORIGIN = 0x00000000, LENGTH = 8K
    24   RAM             : ORIGIN = 0x00002000, LENGTH = 128M - 8K
    25 }
    26 
    27 
    28 SECTIONS
    29 {
    30   __exeentry      = download_entry;
    31   __exestart      = 0x100;
    32   .vectors __exestart : { *(.vectors)                           } > VECTORS
    33 
    34   /* Read-only sections, merged into text segment: */
    35   .interp         : { *(.interp)                                } > RAM
    36   .hash           : { *(.hash)                                  } > RAM
    37   .dynsym         : { *(.dynsym)                                } > RAM
    38   .dynstr         : { *(.dynstr)                                } > RAM
    39   .gnu.version    : { *(.gnu.version)                           } > RAM
    40   .gnu.version_d  : { *(.gnu.version_d)                         } > RAM
    41   .gnu.version_r  : { *(.gnu.version_r)                         } > RAM
    42   .rela.text      : { *(.rela.text) *(.rela.gnu.linkonce.t*)    } > RAM
    43   .rela.data      : { *(.rela.data) *(.rela.gnu.linkonce.d*)    } > RAM
    44   .rela.rodata    : { *(.rela.rodata*) *(.rela.gnu.linkonce.r*) } > RAM
    45   .rela.got       : { *(.rela.got)                              } > RAM
    46   .rela.got1      : { *(.rela.got1)                             } > RAM
    47   .rela.got2      : { *(.rela.got2)                             } > RAM
    48   .rela.ctors     : { *(.rela.ctors)                            } > RAM
    49   .rela.dtors     : { *(.rela.dtors)                            } > RAM
    50   .rela.init      : { *(.rela.init)                             } > RAM
    51   .rela.fini      : { *(.rela.fini)                             } > RAM
    52   .rela.bss       : { *(.rela.bss)                              } > RAM
    53   .rela.plt       : { *(.rela.plt)                              } > RAM
    54   .rela.sdata     : { *(.rela.sdata)                            } > RAM
    55   .rela.sbss      : { *(.rela.sbss)                             } > RAM
    56   .rela.sdata2    : { *(.rela.sdata2)                           } > RAM
    57   .rela.sbss2     : { *(.rela.sbss2)                            } > RAM
    58   .rela.dyn       : { *(.rela.dyn)                              } > RAM
    59 
    60   /* Initialization code */
    61   .init           : { PROVIDE (_init = .);
    62                       *ecrti.o(.init)
    63                       KEEP(*(.init))
    64                       *ecrtn.o(.init)
    65                     } > RAM
    66 
    67   .text           : { *(.entry)
    68                       *(.text)
    69                       *(.text.*)
    70 
    71                       /* Special FreeBSD sysctl sections */
    72                       . = ALIGN (16);
    73                       __start_set_sysctl_set = .;
    74                       *(set_sysctl_*);
    75                       __stop_set_sysctl_set = ABSOLUTE(.);
    76                       *(set_domain_*);
    77                       *(set_pseudo_*);
    78 
    79                       /* .gnu.warning sections are handled specially by elf32.em
    80                        */
    81                       *(.gnu.warning)
    82                       *(.gnu.linkonce.t*)
    83                     } > RAM
    84 
    85   /* Finalization code */
    86   .fini           : { PROVIDE (_fini = .);
    87                       *ecrti.o(.fini)
    88                       KEEP(*(.fini))
    89                       *ecrtn.o(.fini)
    90                     } > RAM
    91 
    92   /* Miscellaneous read-only data */
    93   .rodata         : { *(.rodata.* .gnu.linkonce.r*)                    } > RAM
    94   .rodata1        : { *(.rodata1)                                      } > RAM
    95 
    96   /* Initialised small data addressed as offsets from r2 */
    97 _SDA2_BASE_ = __SDATA2_START__ + 0x8000;
    98   .sdata2         : { *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)          } > RAM
    99 
    100   /* Zeroed small data addressed as offsets from r2 */
    101   .sbss2          : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)
    102 
    103                       /* Avoid empty sdata2/sbss2 area: __eabi would not set up
    104                        * r2 which may be important if run-time loading is used
    105                        */
    106                       . += 1;
    107 
    108                       PROVIDE (__SBSS2_END__ = .);
    109                     } > RAM
    110 
    111   /* Exception frame info */
    112   .eh_frame       : { *(.eh_frame .eh_frame.*)                         } > RAM
    113   .eh_frame_hdr   : { *(.eh_frame_hdr)                                 } > RAM
    114 
    115   /*  Declares where the .text section ends */
    116   _etext          = .;
    117   PROVIDE (etext  = .);
    118 
    119   /* Initialized R/W Data section goes in RAM */
    120   .data           : { PROVIDE(__DATA_START__ = ABSOLUTE(.) );
    121                       *(.data)
    122                       *(.data.*)
    123                       *(.gnu.linkonce.d*)
    124                     } > RAM
    125 
    126   .data1          : { *(.data1)                                        } > RAM
    127 
    128                         PROVIDE (__EXCEPT_START__ = .);
    129   .gcc_except_table : { *(.gcc_except_table .gcc_except_table.*)       } > RAM
    130                         PROVIDE (__EXCEPT_END__ = .);
    131 
    132   .got1           : { *(.got1)                                         } > RAM
    133 
    134   /* Put .ctors and .dtors next to the .got2 section, so that the pointers
    135    * get relocated with -mrelocatable. Also put in the .fixup pointers.
    136    * The current compiler no longer needs this, but keep it around for 2.7.2.
    137    */
    138                       PROVIDE (_GOT2_START_ = .);
    139   .got2           : { *(.got2)                                         } > RAM
    140 
    141   .dynamic        : { *(.dynamic)                                      } > RAM
    142 
    143   .ctors          : { /* gcc uses crtbegin.o to find the start of
    144                        * the constructors, so we make sure it is
    145                        * first.  Because this is a wildcard, it
    146                        * doesn't matter if the user does not
    147                        * actually link against crtbegin.o; the
    148                        * linker won't look for a file to match a
    149                        * wildcard.  The wildcard also means that it
    150                        * doesn't matter which directory crtbegin.o
    151                        * is in.
    152                        */
    153                       KEEP (*crtbegin.o(.ctors))
    154                       /* We don't want to include the .ctor section from
    155                        * the crtend.o file until after the sorted ctors.
    156                        * The .ctor section from the crtend file contains the
    157                        * end of ctors marker and it must be last.
    158                        */
    159                       KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
    160                       KEEP (*(SORT(.ctors.*)))
    161                       KEEP (*(.ctors))
    162                     } > RAM
    163 
    164   .dtors          : { KEEP (*crtbegin.o(.dtors))
    165                       KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
    166                       KEEP (*(SORT(.dtors.*)))
    167                       KEEP (*(.dtors))
    168                     } > RAM
    169 
    170                       PROVIDE (_FIXUP_START_ = .);
    171   .fixup          : { *(.fixup)                                        } > RAM
    172                       PROVIDE (_FIXUP_END_ = .);
    173 
    174                       PROVIDE (_GOT2_END_ = .);
    175 
    176                       PROVIDE (_GOT_START_ = .);
    177   .got            : { __got_start = .;
    178                       *(.got)
    179                     } > RAM
    180 
    181   .got.plt        : { *(.got.plt)                                      } > RAM
    182                       PROVIDE (_GOT_END_ = .);
    183 
    184   .jcr            : { KEEP (*(.jcr))                                   } > RAM
    185 
    186   /* We want the small data sections together, so single-instruction offsets
    187    * can access them all, and initialized data all before uninitialized, so
    188    * we can shorten the on-disk segment size.
    189    */
    190   /* Initialised small data addressed as offsets from r13 */
    191 _SDA_BASE_ = __SDATA_START__ + 0x8000;
    192   .sdata          : { *(.sdata* .gnu.linkonce.s.*)                     } > RAM
    193 
    194   _edata          = .;
    195   PROVIDE (edata  = .);
    196 
    197   /* Zeroed small data addressed as offsets from r13 */
    198   .sbss           : { PROVIDE (__sbss_start = .);
    199                       *(.dynsbss)
    200                       *(.sbss*)
    201                       *(.gnu.linkonce.sb.*)
    202                       *(.scommon)
    203 
    204                       /* Avoid empty sdata/sbss area: __eabi would not set up
    205                        * r13, which may be important if run-time loading is used
    206                        */
    207                       . += 1;
    208 
    209                       PROVIDE (__SBSS_END__ = .);
    210                       PROVIDE (__sbss_end   = .);
    211                     } > RAM
    212 
    213   .plt            : { *(.plt)                                          } > RAM
    214   .iplt           : { *(.iplt)                                         } > RAM
    215 
    216   /* Zeroed large data */
    217   .bss            : { PROVIDE (__bss_start = .);
    218                       *(.dynbss)
    219                       *(.bss)
    220                       *(.bss.*)
    221                       *(.gnu.linkonce.b*)
    222                       *(COMMON)
    223 
    224                       PROVIDE (__bss_end = ALIGN(4));
    225                       __bss_size = __bss_end - __bss_start;
    226                     } > RAM
    227 
    228   __exeend        = ALIGN(4);
    229   __rtems_end     = .;
    230   .               = ALIGN(0x10);        /* Align to a cache-line boundary */
    231   PROVIDE(__bsp_ram_start = .);
    232 
    233   /* Interrupt stack: aligned on a cache-line boundary */
    234   .              += IntrStackSize;
    235   __intrStack     = .;
    236 
    237   /* Main stack lives here */
    238   _stack          = ALIGN(0x10);        /* Align to a cache-line boundary */
    239   .              += StackSize;
    240   __stack_base    = .;                  /* Initial stack builds downwards */
    241 
    242   /* RTEMS workspace: size specified by application */
    243   WorkAreaBase    = ALIGN(0x10);        /* Align to a cache-line boundary */
    244 
    245   /* The heap comes after the work space */
    246 
    247    .              = RamBase + RamSize - MsgAreaSize;
    248   PROVIDE(__bsp_ram_end = .);
    249 
    250   /* Message area for capturing early printk output */
    251   /* Placed here to be easily findable with a debugger */
    252   MsgAreaBase     = __bsp_ram_end;
    253   .              += MsgAreaSize;
    254 
    255   __phy_ram_end   = .;                  /* True end of physical memory */
    256 
    257   /DISCARD/ :
    258   {
    259     *(.comment)
    260   }
    261 
    262   /* Some configuration constants: Not clear why they're placed here */
    263   __dccr          = 0x80000000;
    264   __iccr          = 0x80000000;
    265   __sgr           = 0x7fffffff;
    266   __vectors       = 0;
    267 }
  • deleted file c/src/lib/libbsp/powerpc/virtex4/startup/.svn/text-base/start.S.svn-base

    diff --git a/c/src/lib/libbsp/powerpc/virtex4/startup/.svn/text-base/start.S.svn-base b/c/src/lib/libbsp/powerpc/virtex4/startup/.svn/text-base/start.S.svn-base
    deleted file mode 100644
    index b329807..0000000
    + -  
    1 /*!@file      start.S
    2 *
    3 *  @brief     Initialization code to set up the CPU and call boot_card()
    4 *
    5 *  This "BSP" targets the Xilinx Virtex XC4VFX60 and related parts.  This
    6 *  BSP makes no assumptions on what firmware is loaded into the FPGA.
    7 *
    8 *  Provides the .entry section code. This is the first code to run in
    9 *  the PPC after download to RAM.   Excecution in this case starts at
    10 *  'download_entry'.
    11 *
    12 *  The entrypoint 'start' is provided for the case where a bootloader has
    13 *  initialized the CPU, and all that remains to do is to set up a C
    14 *  environment and call boot_card.
    15 *
    16 *  Derived from virtex dlentry and others.
    17 *
    18 *  IBM refers to the version of the processor as PPC405F5.
    19 *  The processor version register returns 0x20011470.
    20 *  References:
    21 *      PowerPC Processor Reference Guide UG011 (v1.3)
    22 *      http://www.xilinx.com/support/documentation/user_guides/ug011.pdf
    23 *
    24 *      PowerPC Block Reference Guide
    25 *      http://www.xilinx.com/support/documentation/user_guides/ug018.pdf
    26 *
    27 *      PowerPC errata
    28 *      ftp://ftp.xilinx.com/pub/documentation/misc/ppc405f6v5_2_0.pdf
    29 *
    30 *      PowerPC 405-S Embedded Processor Core User's Manual (Version 1.2)
    31 *      https://www-01.ibm.com/chips/techlib/techlib.nsf/products/PowerPC_405_Embedded_Cores
    32 *
    33 *  @author    Richard Claus <claus@SLAC.Stanford.edu>
    34 *
    35 *  @date      March 4, 2011 -- Created
    36 *
    37 *  $Revision$
    38 *
    39 *  @verbatim                    Copyright 2011
    40 *                                      by
    41 *                         The Board of Trustees of the
    42 *                       Leland Stanford Junior University.
    43 *                              All rights reserved.
    44 *
    45 *         Work supported by the U.S. Department of Energy under contract
    46 *       DE-AC03-76SF00515.
    47 *
    48 *                               Disclaimer Notice
    49 *
    50 *        The items furnished herewith were developed under the sponsorship
    51 *   of the U.S. Government.  Neither the U.S., nor the U.S. D.O.E., nor the
    52 *   Leland Stanford Junior University, nor their employees, makes any war-
    53 *   ranty, express or implied, or assumes any liability or responsibility
    54 *   for accuracy, completeness or usefulness of any information, apparatus,
    55 *   product or process disclosed, or represents that its use will not in-
    56 *   fringe privately-owned rights.  Mention of any product, its manufactur-
    57 *   er, or suppliers shall not, nor is it intended to, imply approval, dis-
    58 *   approval, or fitness for any particular use.  The U.S. and the Univer-
    59 *   sity at all times retain the right to use and disseminate the furnished
    60 *   items for any purpose whatsoever.                       Notice 91 02 01
    61 *
    62 *  @endverbatim
    63 */
    64 
    65 #include <rtems/asm.h>
    66 #include <rtems/powerpc/powerpc.h>
    67 
    68 /*
    69  *  The virtex ELF link scripts support some special sections:
    70  *    .entry    The actual entry point
    71  *    .vectors  The section containing the interrupt entry veneers.
    72  */
    73 
    74 /*
    75  *  Downloaded code loads the vectors separately to 0x00000100,
    76  *  so .entry can be over 256 bytes.
    77  *
    78  *  The other sections are linked in the following order:
    79  *    .entry
    80  *    .text
    81  *    .data
    82  *    .bss
    83  *  see linker command file for section placement
    84  *
    85  *  The initial stack is set to __stack_base.
    86  *
    87  */
    88 
    89         .section .entry
    90 
    91         PUBLIC_VAR (download_entry)
    92         PUBLIC_VAR (__rtems_entry_point)
    93 SYM(download_entry):
    94 SYM(__rtems_entry_point):
    95         b       startupDow        /* Entry point used by xmd dow command */
    96 
    97         PUBLIC_VAR (start)
    98 SYM(start):
    99         b       startupBL         /* Entry point used by bootLoader */
    100 
    101 base_addr:
    102        /*-------------------------------------------------------------------
    103         * Parameters from linker
    104         *-----------------------------------------------------------------*/
    105 toc_pointer:
    106         .long   __got_start
    107 bss_length:
    108         .long   __bss_size
    109 bss_addr:
    110         .long   __bss_start
    111 stack_top:
    112         .long   __stack_base
    113 dccr_contents:
    114         .long   __dccr
    115 iccr_contents:
    116         .long   __iccr
    117 sgr_contents:
    118         .long   __sgr
    119 
    120        /*-------------------------------------------------------------------
    121         * Setup iccr, sgr, msr, cccr0, dcwr, dccr and clear bss
    122         *-----------------------------------------------------------------*/
    123 
    124 startupDow:
    125        /*-------------------------------------------------------------------
    126         * Load the parameter table base address
    127         *------------------------------------------------------------------*/
    128         lis     r1,   base_addr@h
    129         ori     r1,r1,base_addr@l
    130 
    131        /* -------------------------------------------------------------------
    132         * Clear the Machine State Register's Critical and External
    133         * interrupt enables.
    134         *------------------------------------------------------------------*/
    135         mfmsr   r3
    136         lis     r0,   0x00028000@h
    137         ori     r0,r0,0x00028000@l
    138         andc    r3,r3,r0
    139         mtmsr   r3
    140         sync
    141 
    142        /* -------------------------------------------------------------------
    143         * Initialize the memory system.
    144         *------------------------------------------------------------------*/
    145         li      r0,0
    146 
    147         /* Set the Storage Guarded Register. */
    148         lwz     r2,sgr_contents-base_addr(r1)
    149         mtsgr   r2
    150 
    151         /* Configure endianness, compression */
    152         lis     r0,0x00000000@h   // Endianess value
    153         mtsler  r0
    154         lis     r0,0x00000000@h   // Compression value
    155         mtsu0r  r0
    156 
    157         /* Invalidate the entire instruction cache. */
    158         iccci   r0,r0
    159 
    160         /* Set the Instruction Cache Cacheability Register. */
    161         lwz     r2,iccr_contents-base_addr(r1)
    162         mticcr  r2
    163         isync
    164 
    165        /*-------------------------------------------------------------------
    166         * Tell the processor where the exception vector table will be.
    167         *------------------------------------------------------------------*/
    168         .extern SYM(__vectors)
    169         lis     r0, __vectors@h    /* set EVPR exc. vector prefix */
    170         mtspr   evpr,r0
    171 
    172        /*-------------------------------------------------------------------
    173         * Set up the debug register to freeze timers on debug events.
    174         *------------------------------------------------------------------*/
    175         mfdbcr0 r0
    176         ori     r0,r0,0x0001
    177         mtdbcr0 r0
    178         isync
    179 
    180         /* Select whether APU, Wait Enable, interrupts/exceptions and address
    181            translation should be enabled when application starts */
    182         lis     r0,0x00000000@h   /* SRR1 value */
    183         mtsrr1  r0                /* Potentially: 0x80000000 >> 6 is APU */
    184 
    185         /* Clear out stale values in certain registers to avoid confusion */
    186         mtxer   r0                /* Fixed-point exception register */
    187         mtesr   r0                /* Exception syndrome register */
    188         mtdear  r0                /* Data exception address register */
    189         mtmcsr  r0                /* Machine check syndrome register */
    190         mtpit   r0                /* Programmable interval timer */
    191         li      r0,-1             /* -1 to clear TSR */
    192         mttsr   r0                /* Timer status register */
    193 
    194         /* Invalidate the data cache */
    195         li      r2,0              /* Start address */
    196         li      r3,0x100          /* Number of cache lines */
    197         mtctr   r3                /* Transfer data cache congruence class count to CTR */
    198 1:      dccci   0,r2              /* Invalidate this congruence class */
    199         addi    r2,r2,0x20        /* Point to next congruence class */
    200         bdnz    1b                /* Decrement counter and loop whilst not zero */
    201 
    202        /* -------------------------------------------------------------------
    203         * Set Core Configuration Register 0 as follows:
    204         * sum: 0x02700E00
    205         * bit 1 off:   as told by ppc405 errata to avoid CPU_213 ppc bug
    206         * bit 3 off:   as told by ppc405 errata to avoid CPU_213 ppc bug
    207                        (Note added later: PPC405F6 is not subject to CPU_213.)
    208         * bit 1 on:    Xilinx: CR 203746 Patch for PPC405 errata (RiC 12/8/11)
    209         * bit 2 on:    Xilinx: CR 203746 Patch for PPC405 errata (RiC 12/8/11)
    210         * bit 6 on:    load word as line
    211         * bit 7 off:   load  misses allocate cache line
    212         * bit 8 off:   store misses allocate cache line
    213         * bit 9-11 on: default settings to do with plb priority
    214         * bit 20 on:   prefetching for cacheable regions
    215         * bit 21 on:   prefetching for non-cacheable regions
    216         * bit 22 on:   request size of non-cacheable inst fetches is 8 words
    217         * bit 23 off:  fetch misses allocate cache line
    218         *------------------------------------------------------------------*/
    219         lis     r5,   0x52700E00@h
    220         ori     r5,r5,0x52700E00@l
    221 
    222        /* -------------------------------------------------------------------
    223         * To change CCR0 we make sure the code writing to it is
    224         *  running from the I-cache. This is needed because changing some
    225         * CCR0 fields will cause a hang if the processor is trying to
    226         * access memory at the same time.
    227         *------------------------------------------------------------------*/
    228         lis     r4,   2f@h
    229         ori     r4,r4,2f@l
    230         icbt    r0,r4
    231         b       2f
    232 
    233         .align  5 /* New cache line (32 bytes each) */
    234 2:
    235         icbt    r0,r4       /* Put this line into the I-cache. */
    236         isync
    237         mtccr0  r5
    238         isync
    239         b       3f
    240 
    241         .align  5
    242 3:
    243         /* Set the Data Cache Write-Through Register for no write-through, i.e., for write-back. */
    244         li      r0,0
    245         mtdcwr  r0
    246 
    247         /* Set the Data Cache Cacheablility Register. */
    248         lwz     r0,dccr_contents-base_addr(r1)
    249         mtdccr  r0
    250         isync
    251 
    252        /* Fall through */
    253 
    254 
    255        /* -------------------------------------------------------------------
    256         * If a bootloader has run that has already performed some
    257         * initialization, which among other things has loaded
    258         * this code into memory and jumped to start above, the initialization
    259         * above does not need to be done.  Execution thus resumes here.
    260         *------------------------------------------------------------------*/
    261 
    262 startupBL:
    263        /* -------------------------------------------------------------------
    264         * Note that some initialization has already been performed by the
    265         * bootloader code in Block RAM, which among other things has loaded
    266         * this code into memory and jumped to start above.
    267         *------------------------------------------------------------------*/
    268 
    269        /*-------------------------------------------------------------------
    270         * Load the parameter table base address
    271         *------------------------------------------------------------------*/
    272         lis     r1,   base_addr@h
    273         ori     r1,r1,base_addr@l
    274 
    275        /*-------------------------------------------------------------------
    276         * Setup stack for RTEMS and call boot_card(). From this
    277         * point forward registers will be used in accordance with the
    278         * PowerPC EABI.
    279         *
    280         * boot_card() supervises the initialization of RTEMS and the C
    281         * library.  It calls bsp_start(), bsp_pretasking_hook(), etc.
    282         *------------------------------------------------------------------*/
    283         lwz     r2,toc_pointer-base_addr(r1)        /* set r2 to toc */
    284         lwz     r1,stack_top-base_addr(r1)          /* set r1 to stack_top */
    285 
    286         /* Align as required by ABI */
    287         li      r3,PPC_STACK_ALIGNMENT-1
    288         andc    r1,r1,r3
    289 
    290        /*-------------------------------------------------------------------
    291         * Set up r2 and r13. Upon entry r1 must have a nonzero value
    292         *  as it will be stored in an "init done" flag. Stupid but true.
    293         *  r1 must also be set up as a stack pointer as __eabi() jumps
    294         *  to __init() which has a standard function prolog.
    295         *------------------------------------------------------------------*/
    296         bl      __eabi
    297 
    298        /*-------------------------------------------------------------------
    299         * Zero the .bss, .sbss and .sbss2 sections.
    300         * Must have r2 and r13 properly set.
    301         *------------------------------------------------------------------*/
    302         bl      zero_bss
    303 
    304        /*-------------------------------------------------------------------
    305         * Create a minimal stack frame for this code, the caller of boot_card().
    306         *------------------------------------------------------------------*/
    307         addi    r1,r1, -PPC_MINIMUM_STACK_FRAME_SIZE
    308 
    309         xor     r3,r3,r3
    310         stw     r3,0(r1)            /* Terminate the chain of stack frames. */
    311         stw     r3,4(r1)
    312         stw     r3,8(r1)
    313         stw     r3,12(r1)
    314         lis     r5,environ@ha
    315         la      r5,environ@l(r5)    /* environp */
    316 
    317        /*-------------------------------------------------------------------
    318         * Call boot_card() with its arguments, the command-line pointer and
    319         * the argument count, set to NULL.
    320         *------------------------------------------------------------------*/
    321         li      r4,0                /* argv */
    322         li      r3,0                /* argc */
    323         .extern SYM (boot_card)
    324         b       SYM (boot_card)
  • deleted file c/src/lib/libbsp/powerpc/virtex4/startup/.svn/tmp/start.S.tmp

    diff --git a/c/src/lib/libbsp/powerpc/virtex4/startup/.svn/tmp/start.S.tmp b/c/src/lib/libbsp/powerpc/virtex4/startup/.svn/tmp/start.S.tmp
    deleted file mode 100644
    index b329807..0000000
    + -  
    1 /*!@file      start.S
    2 *
    3 *  @brief     Initialization code to set up the CPU and call boot_card()
    4 *
    5 *  This "BSP" targets the Xilinx Virtex XC4VFX60 and related parts.  This
    6 *  BSP makes no assumptions on what firmware is loaded into the FPGA.
    7 *
    8 *  Provides the .entry section code. This is the first code to run in
    9 *  the PPC after download to RAM.   Excecution in this case starts at
    10 *  'download_entry'.
    11 *
    12 *  The entrypoint 'start' is provided for the case where a bootloader has
    13 *  initialized the CPU, and all that remains to do is to set up a C
    14 *  environment and call boot_card.
    15 *
    16 *  Derived from virtex dlentry and others.
    17 *
    18 *  IBM refers to the version of the processor as PPC405F5.
    19 *  The processor version register returns 0x20011470.
    20 *  References:
    21 *      PowerPC Processor Reference Guide UG011 (v1.3)
    22 *      http://www.xilinx.com/support/documentation/user_guides/ug011.pdf
    23 *
    24 *      PowerPC Block Reference Guide
    25 *      http://www.xilinx.com/support/documentation/user_guides/ug018.pdf
    26 *
    27 *      PowerPC errata
    28 *      ftp://ftp.xilinx.com/pub/documentation/misc/ppc405f6v5_2_0.pdf
    29 *
    30 *      PowerPC 405-S Embedded Processor Core User's Manual (Version 1.2)
    31 *      https://www-01.ibm.com/chips/techlib/techlib.nsf/products/PowerPC_405_Embedded_Cores
    32 *
    33 *  @author    Richard Claus <claus@SLAC.Stanford.edu>
    34 *
    35 *  @date      March 4, 2011 -- Created
    36 *
    37 *  $Revision$
    38 *
    39 *  @verbatim                    Copyright 2011
    40 *                                      by
    41 *                         The Board of Trustees of the
    42 *                       Leland Stanford Junior University.
    43 *                              All rights reserved.
    44 *
    45 *         Work supported by the U.S. Department of Energy under contract
    46 *       DE-AC03-76SF00515.
    47 *
    48 *                               Disclaimer Notice
    49 *
    50 *        The items furnished herewith were developed under the sponsorship
    51 *   of the U.S. Government.  Neither the U.S., nor the U.S. D.O.E., nor the
    52 *   Leland Stanford Junior University, nor their employees, makes any war-
    53 *   ranty, express or implied, or assumes any liability or responsibility
    54 *   for accuracy, completeness or usefulness of any information, apparatus,
    55 *   product or process disclosed, or represents that its use will not in-
    56 *   fringe privately-owned rights.  Mention of any product, its manufactur-
    57 *   er, or suppliers shall not, nor is it intended to, imply approval, dis-
    58 *   approval, or fitness for any particular use.  The U.S. and the Univer-
    59 *   sity at all times retain the right to use and disseminate the furnished
    60 *   items for any purpose whatsoever.                       Notice 91 02 01
    61 *
    62 *  @endverbatim
    63 */
    64 
    65 #include <rtems/asm.h>
    66 #include <rtems/powerpc/powerpc.h>
    67 
    68 /*
    69  *  The virtex ELF link scripts support some special sections:
    70  *    .entry    The actual entry point
    71  *    .vectors  The section containing the interrupt entry veneers.
    72  */
    73 
    74 /*
    75  *  Downloaded code loads the vectors separately to 0x00000100,
    76  *  so .entry can be over 256 bytes.
    77  *
    78  *  The other sections are linked in the following order:
    79  *    .entry
    80  *    .text
    81  *    .data
    82  *    .bss
    83  *  see linker command file for section placement
    84  *
    85  *  The initial stack is set to __stack_base.
    86  *
    87  */
    88 
    89         .section .entry
    90 
    91         PUBLIC_VAR (download_entry)
    92         PUBLIC_VAR (__rtems_entry_point)
    93 SYM(download_entry):
    94 SYM(__rtems_entry_point):
    95         b       startupDow        /* Entry point used by xmd dow command */
    96 
    97         PUBLIC_VAR (start)
    98 SYM(start):
    99         b       startupBL         /* Entry point used by bootLoader */
    100 
    101 base_addr:
    102        /*-------------------------------------------------------------------
    103         * Parameters from linker
    104         *-----------------------------------------------------------------*/
    105 toc_pointer:
    106         .long   __got_start
    107 bss_length:
    108         .long   __bss_size
    109 bss_addr:
    110         .long   __bss_start
    111 stack_top:
    112         .long   __stack_base
    113 dccr_contents:
    114         .long   __dccr
    115 iccr_contents:
    116         .long   __iccr
    117 sgr_contents:
    118         .long   __sgr
    119 
    120        /*-------------------------------------------------------------------
    121         * Setup iccr, sgr, msr, cccr0, dcwr, dccr and clear bss
    122         *-----------------------------------------------------------------*/
    123 
    124 startupDow:
    125        /*-------------------------------------------------------------------
    126         * Load the parameter table base address
    127         *------------------------------------------------------------------*/
    128         lis     r1,   base_addr@h
    129         ori     r1,r1,base_addr@l
    130 
    131        /* -------------------------------------------------------------------
    132         * Clear the Machine State Register's Critical and External
    133         * interrupt enables.
    134         *------------------------------------------------------------------*/
    135         mfmsr   r3
    136         lis     r0,   0x00028000@h
    137         ori     r0,r0,0x00028000@l
    138         andc    r3,r3,r0
    139         mtmsr   r3
    140         sync
    141 
    142        /* -------------------------------------------------------------------
    143         * Initialize the memory system.
    144         *------------------------------------------------------------------*/
    145         li      r0,0
    146 
    147         /* Set the Storage Guarded Register. */
    148         lwz     r2,sgr_contents-base_addr(r1)
    149         mtsgr   r2
    150 
    151         /* Configure endianness, compression */
    152         lis     r0,0x00000000@h   // Endianess value
    153         mtsler  r0
    154         lis     r0,0x00000000@h   // Compression value
    155         mtsu0r  r0
    156 
    157         /* Invalidate the entire instruction cache. */
    158         iccci   r0,r0
    159 
    160         /* Set the Instruction Cache Cacheability Register. */
    161         lwz     r2,iccr_contents-base_addr(r1)
    162         mticcr  r2
    163         isync
    164 
    165        /*-------------------------------------------------------------------
    166         * Tell the processor where the exception vector table will be.
    167         *------------------------------------------------------------------*/
    168         .extern SYM(__vectors)
    169         lis     r0, __vectors@h    /* set EVPR exc. vector prefix */
    170         mtspr   evpr,r0
    171 
    172        /*-------------------------------------------------------------------
    173         * Set up the debug register to freeze timers on debug events.
    174         *------------------------------------------------------------------*/
    175         mfdbcr0 r0
    176         ori     r0,r0,0x0001
    177         mtdbcr0 r0
    178         isync
    179 
    180         /* Select whether APU, Wait Enable, interrupts/exceptions and address
    181            translation should be enabled when application starts */
    182         lis     r0,0x00000000@h   /* SRR1 value */
    183         mtsrr1  r0                /* Potentially: 0x80000000 >> 6 is APU */
    184 
    185         /* Clear out stale values in certain registers to avoid confusion */
    186         mtxer   r0                /* Fixed-point exception register */
    187         mtesr   r0                /* Exception syndrome register */
    188         mtdear  r0                /* Data exception address register */
    189         mtmcsr  r0                /* Machine check syndrome register */
    190         mtpit   r0                /* Programmable interval timer */
    191         li      r0,-1             /* -1 to clear TSR */
    192         mttsr   r0                /* Timer status register */
    193 
    194         /* Invalidate the data cache */
    195         li      r2,0              /* Start address */
    196         li      r3,0x100          /* Number of cache lines */
    197         mtctr   r3                /* Transfer data cache congruence class count to CTR */
    198 1:      dccci   0,r2              /* Invalidate this congruence class */
    199         addi    r2,r2,0x20        /* Point to next congruence class */
    200         bdnz    1b                /* Decrement counter and loop whilst not zero */
    201 
    202        /* -------------------------------------------------------------------
    203         * Set Core Configuration Register 0 as follows:
    204         * sum: 0x02700E00
    205         * bit 1 off:   as told by ppc405 errata to avoid CPU_213 ppc bug
    206         * bit 3 off:   as told by ppc405 errata to avoid CPU_213 ppc bug
    207                        (Note added later: PPC405F6 is not subject to CPU_213.)
    208         * bit 1 on:    Xilinx: CR 203746 Patch for PPC405 errata (RiC 12/8/11)
    209         * bit 2 on:    Xilinx: CR 203746 Patch for PPC405 errata (RiC 12/8/11)
    210         * bit 6 on:    load word as line
    211         * bit 7 off:   load  misses allocate cache line
    212         * bit 8 off:   store misses allocate cache line
    213         * bit 9-11 on: default settings to do with plb priority
    214         * bit 20 on:   prefetching for cacheable regions
    215         * bit 21 on:   prefetching for non-cacheable regions
    216         * bit 22 on:   request size of non-cacheable inst fetches is 8 words
    217         * bit 23 off:  fetch misses allocate cache line
    218         *------------------------------------------------------------------*/
    219         lis     r5,   0x52700E00@h
    220         ori     r5,r5,0x52700E00@l
    221 
    222        /* -------------------------------------------------------------------
    223         * To change CCR0 we make sure the code writing to it is
    224         *  running from the I-cache. This is needed because changing some
    225         * CCR0 fields will cause a hang if the processor is trying to
    226         * access memory at the same time.
    227         *------------------------------------------------------------------*/
    228         lis     r4,   2f@h
    229         ori     r4,r4,2f@l
    230         icbt    r0,r4
    231         b       2f
    232 
    233         .align  5 /* New cache line (32 bytes each) */
    234 2:
    235         icbt    r0,r4       /* Put this line into the I-cache. */
    236         isync
    237         mtccr0  r5
    238         isync
    239         b       3f
    240 
    241         .align  5
    242 3:
    243         /* Set the Data Cache Write-Through Register for no write-through, i.e., for write-back. */
    244         li      r0,0
    245         mtdcwr  r0
    246 
    247         /* Set the Data Cache Cacheablility Register. */
    248         lwz     r0,dccr_contents-base_addr(r1)
    249         mtdccr  r0
    250         isync
    251 
    252        /* Fall through */
    253 
    254 
    255        /* -------------------------------------------------------------------
    256         * If a bootloader has run that has already performed some
    257         * initialization, which among other things has loaded
    258         * this code into memory and jumped to start above, the initialization
    259         * above does not need to be done.  Execution thus resumes here.
    260         *------------------------------------------------------------------*/
    261 
    262 startupBL:
    263        /* -------------------------------------------------------------------
    264         * Note that some initialization has already been performed by the
    265         * bootloader code in Block RAM, which among other things has loaded
    266         * this code into memory and jumped to start above.
    267         *------------------------------------------------------------------*/
    268 
    269        /*-------------------------------------------------------------------
    270         * Load the parameter table base address
    271         *------------------------------------------------------------------*/
    272         lis     r1,   base_addr@h
    273         ori     r1,r1,base_addr@l
    274 
    275        /*-------------------------------------------------------------------
    276         * Setup stack for RTEMS and call boot_card(). From this
    277         * point forward registers will be used in accordance with the
    278         * PowerPC EABI.
    279         *
    280         * boot_card() supervises the initialization of RTEMS and the C
    281         * library.  It calls bsp_start(), bsp_pretasking_hook(), etc.
    282         *------------------------------------------------------------------*/
    283         lwz     r2,toc_pointer-base_addr(r1)        /* set r2 to toc */
    284         lwz     r1,stack_top-base_addr(r1)          /* set r1 to stack_top */
    285 
    286         /* Align as required by ABI */
    287         li      r3,PPC_STACK_ALIGNMENT-1
    288         andc    r1,r1,r3
    289 
    290        /*-------------------------------------------------------------------
    291         * Set up r2 and r13. Upon entry r1 must have a nonzero value
    292         *  as it will be stored in an "init done" flag. Stupid but true.
    293         *  r1 must also be set up as a stack pointer as __eabi() jumps
    294         *  to __init() which has a standard function prolog.
    295         *------------------------------------------------------------------*/
    296         bl      __eabi
    297 
    298        /*-------------------------------------------------------------------
    299         * Zero the .bss, .sbss and .sbss2 sections.
    300         * Must have r2 and r13 properly set.
    301         *------------------------------------------------------------------*/
    302         bl      zero_bss
    303 
    304        /*-------------------------------------------------------------------
    305         * Create a minimal stack frame for this code, the caller of boot_card().
    306         *------------------------------------------------------------------*/
    307         addi    r1,r1, -PPC_MINIMUM_STACK_FRAME_SIZE
    308 
    309         xor     r3,r3,r3
    310         stw     r3,0(r1)            /* Terminate the chain of stack frames. */
    311         stw     r3,4(r1)
    312         stw     r3,8(r1)
    313         stw     r3,12(r1)
    314         lis     r5,environ@ha
    315         la      r5,environ@l(r5)    /* environp */
    316 
    317        /*-------------------------------------------------------------------
    318         * Call boot_card() with its arguments, the command-line pointer and
    319         * the argument count, set to NULL.
    320         *------------------------------------------------------------------*/
    321         li      r4,0                /* argv */
    322         li      r3,0                /* argc */
    323         .extern SYM (boot_card)
    324         b       SYM (boot_card)
  • deleted file c/src/lib/libbsp/powerpc/virtex4/startup/.svn/tmp/tempfile.tmp

    diff --git a/c/src/lib/libbsp/powerpc/virtex4/startup/.svn/tmp/tempfile.tmp b/c/src/lib/libbsp/powerpc/virtex4/startup/.svn/tmp/tempfile.tmp
    deleted file mode 100644
    index b329807..0000000
    + -  
    1 /*!@file      start.S
    2 *
    3 *  @brief     Initialization code to set up the CPU and call boot_card()
    4 *
    5 *  This "BSP" targets the Xilinx Virtex XC4VFX60 and related parts.  This
    6 *  BSP makes no assumptions on what firmware is loaded into the FPGA.
    7 *
    8 *  Provides the .entry section code. This is the first code to run in
    9 *  the PPC after download to RAM.   Excecution in this case starts at
    10 *  'download_entry'.
    11 *
    12 *  The entrypoint 'start' is provided for the case where a bootloader has
    13 *  initialized the CPU, and all that remains to do is to set up a C
    14 *  environment and call boot_card.
    15 *
    16 *  Derived from virtex dlentry and others.
    17 *
    18 *  IBM refers to the version of the processor as PPC405F5.
    19 *  The processor version register returns 0x20011470.
    20 *  References:
    21 *      PowerPC Processor Reference Guide UG011 (v1.3)
    22 *      http://www.xilinx.com/support/documentation/user_guides/ug011.pdf
    23 *
    24 *      PowerPC Block Reference Guide
    25 *      http://www.xilinx.com/support/documentation/user_guides/ug018.pdf
    26 *
    27 *      PowerPC errata
    28 *      ftp://ftp.xilinx.com/pub/documentation/misc/ppc405f6v5_2_0.pdf
    29 *
    30 *      PowerPC 405-S Embedded Processor Core User's Manual (Version 1.2)
    31 *      https://www-01.ibm.com/chips/techlib/techlib.nsf/products/PowerPC_405_Embedded_Cores
    32 *
    33 *  @author    Richard Claus <claus@SLAC.Stanford.edu>
    34 *
    35 *  @date      March 4, 2011 -- Created
    36 *
    37 *  $Revision$
    38 *
    39 *  @verbatim                    Copyright 2011
    40 *                                      by
    41 *                         The Board of Trustees of the
    42 *                       Leland Stanford Junior University.
    43 *                              All rights reserved.
    44 *
    45 *         Work supported by the U.S. Department of Energy under contract
    46 *       DE-AC03-76SF00515.
    47 *
    48 *                               Disclaimer Notice
    49 *
    50 *        The items furnished herewith were developed under the sponsorship
    51 *   of the U.S. Government.  Neither the U.S., nor the U.S. D.O.E., nor the
    52 *   Leland Stanford Junior University, nor their employees, makes any war-
    53 *   ranty, express or implied, or assumes any liability or responsibility
    54 *   for accuracy, completeness or usefulness of any information, apparatus,
    55 *   product or process disclosed, or represents that its use will not in-
    56 *   fringe privately-owned rights.  Mention of any product, its manufactur-
    57 *   er, or suppliers shall not, nor is it intended to, imply approval, dis-
    58 *   approval, or fitness for any particular use.  The U.S. and the Univer-
    59 *   sity at all times retain the right to use and disseminate the furnished
    60 *   items for any purpose whatsoever.                       Notice 91 02 01
    61 *
    62 *  @endverbatim
    63 */
    64 
    65 #include <rtems/asm.h>
    66 #include <rtems/powerpc/powerpc.h>
    67 
    68 /*
    69  *  The virtex ELF link scripts support some special sections:
    70  *    .entry    The actual entry point
    71  *    .vectors  The section containing the interrupt entry veneers.
    72  */
    73 
    74 /*
    75  *  Downloaded code loads the vectors separately to 0x00000100,
    76  *  so .entry can be over 256 bytes.
    77  *
    78  *  The other sections are linked in the following order:
    79  *    .entry
    80  *    .text
    81  *    .data
    82  *    .bss
    83  *  see linker command file for section placement
    84  *
    85  *  The initial stack is set to __stack_base.
    86  *
    87  */
    88 
    89         .section .entry
    90 
    91         PUBLIC_VAR (download_entry)
    92         PUBLIC_VAR (__rtems_entry_point)
    93 SYM(download_entry):
    94 SYM(__rtems_entry_point):
    95         b       startupDow        /* Entry point used by xmd dow command */
    96 
    97         PUBLIC_VAR (start)
    98 SYM(start):
    99         b       startupBL         /* Entry point used by bootLoader */
    100 
    101 base_addr:
    102        /*-------------------------------------------------------------------
    103         * Parameters from linker
    104         *-----------------------------------------------------------------*/
    105 toc_pointer:
    106         .long   __got_start
    107 bss_length:
    108         .long   __bss_size
    109 bss_addr:
    110         .long   __bss_start
    111 stack_top:
    112         .long   __stack_base
    113 dccr_contents:
    114         .long   __dccr
    115 iccr_contents:
    116         .long   __iccr
    117 sgr_contents:
    118         .long   __sgr
    119 
    120        /*-------------------------------------------------------------------
    121         * Setup iccr, sgr, msr, cccr0, dcwr, dccr and clear bss
    122         *-----------------------------------------------------------------*/
    123 
    124 startupDow:
    125        /*-------------------------------------------------------------------
    126         * Load the parameter table base address
    127         *------------------------------------------------------------------*/
    128         lis     r1,   base_addr@h
    129         ori     r1,r1,base_addr@l
    130 
    131        /* -------------------------------------------------------------------
    132         * Clear the Machine State Register's Critical and External
    133         * interrupt enables.
    134         *------------------------------------------------------------------*/
    135         mfmsr   r3
    136         lis     r0,   0x00028000@h
    137         ori     r0,r0,0x00028000@l
    138         andc    r3,r3,r0
    139         mtmsr   r3
    140         sync
    141 
    142        /* -------------------------------------------------------------------
    143         * Initialize the memory system.
    144         *------------------------------------------------------------------*/
    145         li      r0,0
    146 
    147         /* Set the Storage Guarded Register. */
    148         lwz     r2,sgr_contents-base_addr(r1)
    149         mtsgr   r2
    150 
    151         /* Configure endianness, compression */
    152         lis     r0,0x00000000@h   // Endianess value
    153         mtsler  r0
    154         lis     r0,0x00000000@h   // Compression value
    155         mtsu0r  r0
    156 
    157         /* Invalidate the entire instruction cache. */
    158         iccci   r0,r0
    159 
    160         /* Set the Instruction Cache Cacheability Register. */
    161         lwz     r2,iccr_contents-base_addr(r1)
    162         mticcr  r2
    163         isync
    164 
    165        /*-------------------------------------------------------------------
    166         * Tell the processor where the exception vector table will be.
    167         *------------------------------------------------------------------*/
    168         .extern SYM(__vectors)
    169         lis     r0, __vectors@h    /* set EVPR exc. vector prefix */
    170         mtspr   evpr,r0
    171 
    172        /*-------------------------------------------------------------------
    173         * Set up the debug register to freeze timers on debug events.
    174         *------------------------------------------------------------------*/
    175         mfdbcr0 r0
    176         ori     r0,r0,0x0001
    177         mtdbcr0 r0
    178         isync
    179 
    180         /* Select whether APU, Wait Enable, interrupts/exceptions and address
    181            translation should be enabled when application starts */
    182         lis     r0,0x00000000@h   /* SRR1 value */
    183         mtsrr1  r0                /* Potentially: 0x80000000 >> 6 is APU */
    184 
    185         /* Clear out stale values in certain registers to avoid confusion */
    186         mtxer   r0                /* Fixed-point exception register */
    187         mtesr   r0                /* Exception syndrome register */
    188         mtdear  r0                /* Data exception address register */
    189         mtmcsr  r0                /* Machine check syndrome register */
    190         mtpit   r0                /* Programmable interval timer */
    191         li      r0,-1             /* -1 to clear TSR */
    192         mttsr   r0                /* Timer status register */
    193 
    194         /* Invalidate the data cache */
    195         li      r2,0              /* Start address */
    196         li      r3,0x100          /* Number of cache lines */
    197         mtctr   r3                /* Transfer data cache congruence class count to CTR */
    198 1:      dccci   0,r2              /* Invalidate this congruence class */
    199         addi    r2,r2,0x20        /* Point to next congruence class */
    200         bdnz    1b                /* Decrement counter and loop whilst not zero */
    201 
    202        /* -------------------------------------------------------------------
    203         * Set Core Configuration Register 0 as follows:
    204         * sum: 0x02700E00
    205         * bit 1 off:   as told by ppc405 errata to avoid CPU_213 ppc bug
    206         * bit 3 off:   as told by ppc405 errata to avoid CPU_213 ppc bug
    207                        (Note added later: PPC405F6 is not subject to CPU_213.)
    208         * bit 1 on:    Xilinx: CR 203746 Patch for PPC405 errata (RiC 12/8/11)
    209         * bit 2 on:    Xilinx: CR 203746 Patch for PPC405 errata (RiC 12/8/11)
    210         * bit 6 on:    load word as line
    211         * bit 7 off:   load  misses allocate cache line
    212         * bit 8 off:   store misses allocate cache line
    213         * bit 9-11 on: default settings to do with plb priority
    214         * bit 20 on:   prefetching for cacheable regions
    215         * bit 21 on:   prefetching for non-cacheable regions
    216         * bit 22 on:   request size of non-cacheable inst fetches is 8 words
    217         * bit 23 off:  fetch misses allocate cache line
    218         *------------------------------------------------------------------*/
    219         lis     r5,   0x52700E00@h
    220         ori     r5,r5,0x52700E00@l
    221 
    222        /* -------------------------------------------------------------------
    223         * To change CCR0 we make sure the code writing to it is
    224         *  running from the I-cache. This is needed because changing some
    225         * CCR0 fields will cause a hang if the processor is trying to
    226         * access memory at the same time.
    227         *------------------------------------------------------------------*/
    228         lis     r4,   2f@h
    229         ori     r4,r4,2f@l
    230         icbt    r0,r4
    231         b       2f
    232 
    233         .align  5 /* New cache line (32 bytes each) */
    234 2:
    235         icbt    r0,r4       /* Put this line into the I-cache. */
    236         isync
    237         mtccr0  r5
    238         isync
    239         b       3f
    240 
    241         .align  5
    242 3:
    243         /* Set the Data Cache Write-Through Register for no write-through, i.e., for write-back. */
    244         li      r0,0
    245         mtdcwr  r0
    246 
    247         /* Set the Data Cache Cacheablility Register. */
    248         lwz     r0,dccr_contents-base_addr(r1)
    249         mtdccr  r0
    250         isync
    251 
    252        /* Fall through */
    253 
    254 
    255        /* -------------------------------------------------------------------
    256         * If a bootloader has run that has already performed some
    257         * initialization, which among other things has loaded
    258         * this code into memory and jumped to start above, the initialization
    259         * above does not need to be done.  Execution thus resumes here.
    260         *------------------------------------------------------------------*/
    261 
    262 startupBL:
    263        /* -------------------------------------------------------------------
    264         * Note that some initialization has already been performed by the
    265         * bootloader code in Block RAM, which among other things has loaded
    266         * this code into memory and jumped to start above.
    267         *------------------------------------------------------------------*/
    268 
    269        /*-------------------------------------------------------------------
    270         * Load the parameter table base address
    271         *------------------------------------------------------------------*/
    272         lis     r1,   base_addr@h
    273         ori     r1,r1,base_addr@l
    274 
    275        /*-------------------------------------------------------------------
    276         * Setup stack for RTEMS and call boot_card(). From this
    277         * point forward registers will be used in accordance with the
    278         * PowerPC EABI.
    279         *
    280         * boot_card() supervises the initialization of RTEMS and the C
    281         * library.  It calls bsp_start(), bsp_pretasking_hook(), etc.
    282         *------------------------------------------------------------------*/
    283         lwz     r2,toc_pointer-base_addr(r1)        /* set r2 to toc */
    284         lwz     r1,stack_top-base_addr(r1)          /* set r1 to stack_top */
    285 
    286         /* Align as required by ABI */
    287         li      r3,PPC_STACK_ALIGNMENT-1
    288         andc    r1,r1,r3
    289 
    290        /*-------------------------------------------------------------------
    291         * Set up r2 and r13. Upon entry r1 must have a nonzero value
    292         *  as it will be stored in an "init done" flag. Stupid but true.
    293         *  r1 must also be set up as a stack pointer as __eabi() jumps
    294         *  to __init() which has a standard function prolog.
    295         *------------------------------------------------------------------*/
    296         bl      __eabi
    297 
    298        /*-------------------------------------------------------------------
    299         * Zero the .bss, .sbss and .sbss2 sections.
    300         * Must have r2 and r13 properly set.
    301         *------------------------------------------------------------------*/
    302         bl      zero_bss
    303 
    304        /*-------------------------------------------------------------------
    305         * Create a minimal stack frame for this code, the caller of boot_card().
    306         *------------------------------------------------------------------*/
    307         addi    r1,r1, -PPC_MINIMUM_STACK_FRAME_SIZE
    308 
    309         xor     r3,r3,r3
    310         stw     r3,0(r1)            /* Terminate the chain of stack frames. */
    311         stw     r3,4(r1)
    312         stw     r3,8(r1)
    313         stw     r3,12(r1)
    314         lis     r5,environ@ha
    315         la      r5,environ@l(r5)    /* environp */
    316 
    317        /*-------------------------------------------------------------------
    318         * Call boot_card() with its arguments, the command-line pointer and
    319         * the argument count, set to NULL.
    320         *------------------------------------------------------------------*/
    321         li      r4,0                /* argv */
    322         li      r3,0                /* argc */
    323         .extern SYM (boot_card)
    324         b       SYM (boot_card)