Commit Graph

249 Commits

Author SHA1 Message Date
Sebastian Huber
baf8f4dabc smp: Simplify main CPU initialization
Call _SMP_Handler_initialize() later and move bsp_smp_initialize() into
_SMP_Handler_initialize().  Change bsp_smp_initialize() prototype to
match integer types of calling context.
2013-05-29 11:06:07 +02:00
Sebastian Huber
6c2eedc7dd smp: Add maximum_processors field to config
Delete rtems_configuration_get_smp_maximum_processors().  Delete
rtems_configuration_smp_maximum_processors variable.  Add
maximum_processors field to rtems_configuration_table if RTEMS_SMP is
defined.  Add rtems_configuration_get_maximum_processors().
2013-05-16 11:44:12 +02:00
Gedare Bloom
fad2d38a9f RTEMS: Delete ChangeLog files.
This commit deletes all RTEMS ChangeLog files. These files have been abandoned
since converting to git version control. The historical data may be recovered
by checking out any commit before this one. Most of the contents of these
ChangeLog files can also be found in the git log.

Two external ChangeLog files, ChangeLog.slac and ChangeLog.zlib, remain.
2013-03-08 15:55:06 -05:00
Joel Sherrill
f597cc1ba2 leon3: disable unused ISR handler 2013-01-08 12:49:56 -06:00
Joel Sherrill
4967f6b818 leon3/shmsupp: Fix warnings & comment clean up 2013-01-08 12:37:19 -06:00
Joel Sherrill
4fd1ccaa3c leon3: Open Ethernet Fixed Warning 2013-01-08 12:37:19 -06:00
Sebastian Huber
815994fd17 score: Add CPU_Exception_frame
Add CPU port type CPU_Exception_frame and function
_CPU_Exception_frame_print().

The CPU ports of avr, bfin, h8300, lm32, m32c, m32r, m68k, nios2, sh,
sparc64, and v850 use an empty default implementation of
_CPU_Exception_frame_print().

Add rtems_exception_frame and rtems_exception_frame_print().

Add RTEMS_FATAL_SOURCE_EXCEPTION for CPU exceptions.  Use rtems_fatal()
with source RTEMS_FATAL_SOURCE_EXCEPTION in CPU ports of i386, powerpc,
and sparc for unexpected exceptions.

Add third parameter to RTEMS_BSP_CLEANUP_OPTIONS() which controls the
BSP_PRINT_EXCEPTION_CONTEXT define used in the default
bsp_fatal_extension().

Add test sptests/spfatal26.
2012-11-27 17:03:40 +01:00
Sebastian Huber
39aa75e745 bsps: Use RTEMS_BSP_CLEANUP_OPTIONS 2012-11-25 17:45:29 +01:00
Sebastian Huber
dd8df59413 bsps: Interrupt initialization error is fatal 2012-11-15 15:33:13 +01:00
Sebastian Huber
a052181ca2 score: Add RTEMS_FATAL_SOURCE_EXIT
Include <bsp/default-initial-extension.h> in all BSPs.  Call
rtems_fatal() with RTEMS_FATAL_SOURCE_EXIT as source and the exit()
status code as fatal code in every bsp_cleanup().  Move previous
bsp_cleanup() code into bsp_fatal_extension().
2012-11-15 15:33:12 +01:00
Sebastian Huber
7121cac0cc bsps/sparc: Add BSP_INITIAL_EXTENSION to <bsp.h>
The bsp_fatal_extension() will call BSP_fatal_return().
2012-11-13 09:38:02 +01:00
Sebastian Huber
f536e127be sapi: Use rtems_*_get_user_multiprocessing_table 2012-11-07 15:08:45 +01:00
Sebastian Huber
47a3cd8f73 score: Work area initialization API change
The work areas (RTEMS work space and C program heap) will be initialized
now in a separate step and are no longer part of
rtems_initialize_data_structures().  Initialization is performed with
tables of Heap_Area entries.  This allows usage of scattered memory
areas present on various small scale micro-controllers.

The sbrk() support API changes also.  The bsp_sbrk_init() must now deal
with a minimum size for the first memory chunk to take the configured
work space size into account.
2012-10-25 14:54:06 +02:00
Gedare Bloom
c717fda5c1 Revert "Add bspopts.h.in."
This reverts commit daffa606cc.

Conflicts:

	c/src/lib/libbsp/arm/lpc24xx/include/bspopts.h.in
	c/src/lib/libbsp/powerpc/mpc55xxevb/include/bspopts.h.in
	c/src/lib/libbsp/powerpc/qoriq/include/bspopts.h.in

Manually deleted conflicting files.
2012-08-06 13:03:46 -04:00
Ralf Corsépius
1c554014af Remove CVS-Ids. 2012-07-19 16:55:18 +02:00
Ralf Corsépius
bb2b8259ea Require automake-1.12.2. 2012-07-19 15:47:55 +02:00
Ralf Corsépius
0f772813aa Require autoconf-2.69. 2012-07-19 15:44:32 +02:00
Ralf Corsépius
daffa606cc Add bspopts.h.in. 2012-05-24 07:16:50 +02:00
Joel Sherrill
8bbf69e6e6 pci.h cleanup - Consolidate common defines to cpukit pci.h
+ libbsp/sparc/shared/include/pci.h was largely a copy of
  an older version of the cpukit pci.h. Removed much of the
  contents and included <rtems/pci.h>.
+ sparc/*/pci*.c - Move to <rtems/pci.h> required updating
  to use uint32_t for dword accesses.
+ Rename PCI_MULTI_FUNCTION to PCI_HEADER_TYPE_MULTI_FUNCTION
+ Define PCI_HEADER_TYPE_MULTI_FUNCTION in cpukit pci.h and remove
  PCI_MULTI_FUNCTION definitions in C files.
+ Move PCI_INVALID_VENDORDEVICEID definitions from various C files
  to cpukit pci.h
2012-05-16 16:11:44 -05:00
Daniel Hellstrom
226d48d826 LEON: moved register definitions into grlib header file
Some register layout definitions for LEON3 reside in ambapp.h which
does not really has anything to do with device registers. The
register structures has been incorrectly named LEON3_*, the cores
are not only used on LEON3 but on LEON4 and perhaps on LEON5 when
that day comes. Some structures has been renamed according to the
GRLIB core name instead, which CPU that actually use it is not
relevant. Drivers has been updated with the new names.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-05-16 13:29:13 -04:00
Joel Sherrill
9b4422a251 Remove All CVS Id Strings Possible Using a Script
Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines
  next to each other after Id string line removed.
+ remove entire comment blocks which only exited to
  contain CVS Ids
+ If the processing left a blank line at the top of
  a file, it was removed.
2012-05-11 08:44:13 -05:00
Joel Sherrill
33a105fb69 Revert: Remove CVS Ids
See http://www.rtems.org/pipermail/rtems-devel/2012-May/001006.html
for details.
2012-05-07 11:08:48 -05:00
Ralf Corsépius
bf8e31645c Remove CVS-Ids. 2012-05-04 09:36:23 +02:00
Joel Sherrill
2579e53a4c LEON3 - Remove bad $Id$ and clean up file header 2012-05-02 15:41:12 -05:00
Daniel Hellstrom
e621bde574 LEON3: rename console/debugputs.c to printk_support.c 2012-04-19 13:34:28 -04:00
Daniel Hellstrom
5d48037f83 LEON3: added TX-wait-complete and CR on NL support for UART
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-04-19 13:28:06 -04:00
Daniel Hellstrom
605b4b649d LEON3: debugputs removed pointless isinit code, invoked only once
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-04-19 12:34:21 -04:00
Daniel Hellstrom
5903484a29 LEON3: debugputs added printk mem buffer when no UART present
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-04-19 12:34:21 -04:00
Daniel Hellstrom
62694fd68f LEON3: add console interrupt mode support
The comment in configure.ac is probably inherited from the LEON2
BSP. The LEON3 console driver implements a "flush" mechanism on
console_close() in order to solve the problem described with
sis/LEON2.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-04-19 12:34:21 -04:00
Daniel Hellstrom
07557c86fd LEON3: add console attributes such as parity and baudrate
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-04-19 12:34:20 -04:00
Daniel Hellstrom
6845f8005c LEON3: console, lower bus utilization waiting for UART TX ready
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-04-19 12:34:20 -04:00
Daniel Hellstrom
fc6f872d3f LEON3: Network initialization code updated to new AMBAPP layer
Updated SMC91111, GRETH and open_eth driver registration
code to use new AMBAPP Layer.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-04-17 22:01:47 -04:00
Daniel Hellstrom
ddf0d60758 LEON3: updated console driver for new AMBAPP layer
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-04-17 22:01:47 -04:00
Daniel Hellstrom
1f7cfbe351 LEON2: clock driver use new AMBAPP layer
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-04-17 22:01:46 -04:00
Daniel Hellstrom
9ea65119f4 LEON: updated AMBA PnP API
The old layer had some limitations/problems for multiple AHB
buses since the data structure containing all AMBA devices
were allocated before scanning.

The new layer create devices as they are found and memory is
allocated using malloc() or bsp_early_malloc() during booting.

The old 8 functions for finding a specific AHB-Slave or
APB-Slave device has been replaced with one function,
ambapp_for_each(), which iterates over all devices matching
the specified search options and calls a user provided
function. The new way lowers the footprint and makes searching
more flexible.

The frequency information is now supported, if the frequency
of one device is reported by the user.

More AHB-to-AHB bridges are supported.

The API has been split into several parts in order to lower the
footprint.

The API also introduces the AMBAPP CORE concept, where one
ambapp_core can be created from one AHB Master, AHB Slave
and one APB Slave, at least one device is required for creating
a core.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-04-17 22:01:46 -04:00
Daniel Hellstrom
7afcb2619b PR2052: LEON3: fix open_eth interrupt initialization bug
Fixed a bug where the vector number is used to clean and unmask
the IRQ at the IRQ controller, the irq number must be used.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-04-10 15:12:23 -04:00
Daniel Hellstrom
7499b84f41 GRETH: use shared-irq service instead of BSP specific set_vec()
The ISR code is updated to use argument instead of global greth
structure, now that the greth private is available in the ISR.

The shared-irq routines will unmask the IRQ, so the forced LEON3
BSP unmask/clear IRQ is removed.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-04-06 11:38:31 -05:00
Daniel Hellstrom
0f04edd9cc SMC91111: updated to use shared IRQ service
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-04-06 11:38:25 -05:00
Joel Sherrill
c500cbc384 LEON3 - Fix spacing 2012-04-06 09:09:35 -05:00
Daniel Hellstrom
3722ff5a73 LEON3: added IRQAMP support 2012-04-06 09:03:40 -05:00
Daniel Hellstrom
684b54a986 LEON3: halt boot if IRQ controller not found
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-04-06 09:03:35 -05:00
Daniel Hellstrom
95518e59bd SPARC BSPs: implemented shared-irq using libbsp/shared layer
The implementation use IRQ number instead of vector number since
some IRQs does not have a unique vector, for example the extended
interrupts all enter the same trap vector entry.

Added support for the LEON3 extended interrupt controller when using
the shared IRQ layer.

ERC32 patches untested.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>

Regenerate
2012-04-06 08:17:58 -05:00
Daniel Hellstrom
e60e862c64 LEON3: console use register pointers instead of UART indexes
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-04-05 14:47:41 -05:00
Daniel Hellstrom
4b557617fd LEON3: cleanup console UART indexing handling
The UART indexing was rather a mess when MP was enabled. The changes
introduces two weak variables syscon_uart_index and debug_uart_index
so that the user can override the default system debug console (printk)
and system console UART (/dev/console).

The two weak variables is updated on boot to reflect the "real" UART
index.

MINOR    DEVICE-FS-NAME       UART
0        /dev/console         Default /dev/console_a, user selectable
1        /dev/console_a       APBUART[0]   (missing by default)
2        /dev/console_b       APBUART[1]
...

/dev/console_a is by default renamed /dev/console and assigned minor=0,
but user can select /dev/console_['a'+N] to be renamed to /dev/console
by setting syscon_uart_index=N.

On a MP system the console renamed to /dev/console is selected by CPU
index (LEON3_Cpu_Index). /dev/console_['a' + LEON3_Cpu_Index] is
renamed unless overrided. Resource sharing is performed by the user,
one should not open/access a console that another OS instance uses.

This patch also moves the initialization of the UART to the open()
call, note that before APBUART[0] was always enabled as debug uart
even on MP systems. The debug UART is initialized at boot time.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-04-05 14:33:48 -05:00
Daniel Hellstrom
2cee553138 LEON3: various cleanups in leon.h
Removed old LEON2 definitions never used in LEON3 leon.h.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-03-29 16:01:19 -04:00
Daniel Hellstrom
226771c5bc LEON3: IRQ index mask was bad, but always shifted out anyway
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-03-29 15:08:35 -04:00
Daniel Hellstrom
4fa6be9779 LEON3: clock timer indexing should be consequent
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-03-29 15:08:26 -04:00
Daniel Hellstrom
0729e2a7af SPARC: bsp_early_malloc() routine for startup memory allocation
If bsp_early_malloc() is called early during boot room will be
allocated after BSS END. If the function is called after boot
is will call malloc() instead. The returned memory is not freeable
and always 8-byte aligned.

If the bsp_early_malloc() isn't called the function is not
dragged in and the workspace will be unmodified in size.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-03-29 12:33:01 -04:00
Daniel Hellstrom
d0dbcf8a1a LEON3: fix GRETH interrupt initialization bug
Fixed a bug where the vector number is used to clean and unmask
the IRQ at the IRQ controller, the irq number must be used.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-03-29 11:17:42 -05:00
Daniel Hellstrom
39671330dc GRETH: added support for non-snooping GRETH 10/100 systems
When data cache snooping is not present the cache needs
flushing, the SPARC LEON CPUs does not have to ability
to flush individual cache rows and flushing all cache is
expensive. Instead the LDA instruction is used to force
cache miss on individual loads during the IP-align copy
operation required anyway.

GRETH GBIT non-snooping systems are still unsupported,
since it use zero-copy (can deal with unaligned DMA).

Let the bsp.h select if the GRETH driver is supported.
Currently only the LEON2/LEON3 platforms BSPs builds the
driver.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-03-27 16:29:22 -04:00