Commit Graph

249 Commits

Author SHA1 Message Date
Sebastian Huber
a171e0a867 bsp/leon3: Declare LEON3_IrqCtrl_EIrq only once 2014-02-19 09:59:41 +01:00
Sebastian Huber
f71f3d3196 bsp/leon3: Declare leon3_ext_irq_init() in header 2014-02-19 09:59:41 +01:00
Sebastian Huber
4d9bd56d29 score: Rename rtems_smp_process_interrupt()
Rename rtems_smp_process_interrupt() into
_SMP_Inter_processor_interrupt_handler().  Delete unused header file
<rtems/bspsmp.h>.
2014-02-19 09:59:41 +01:00
Sebastian Huber
911b1d228b score: Rename rtems_smp_secondary_cpu_initialize()
Rename rtems_smp_secondary_cpu_initialize() into
_SMP_Start_multitasking_on_secondary_processor().  Move declaration to
<rtems/score/smpimpl.h>.
2014-02-19 09:59:41 +01:00
Sebastian Huber
f8ff2a011c score: Delete bsp_smp_broadcast_interrupt()
Since the per-CPU SMP lock must be acquired and released to send the
message a single interrupt broadcast operations offers no benefits.  If
synchronization is required, then a SMP barrier must be used anyway.
2014-02-19 09:59:41 +01:00
Sebastian Huber
4627fcdab1 score: Rename bsp_smp_initialize()
Rename bsp_smp_initialize() into _CPU_SMP_Initialize() since every CPU
port must supply this function.
2014-02-19 09:59:40 +01:00
Sebastian Huber
46d7fa5cd3 bsp/leon3: Add and use fatal codes 2014-02-19 09:59:40 +01:00
Sebastian Huber
33cb8bf64d score: Add RTEMS_FATAL_SOURCE_BSP
Merge RTEMS_FATAL_SOURCE_BSP_GENERIC and RTEMS_FATAL_SOURCE_BSP_SPECIFIC
into new fatal source RTEMS_FATAL_SOURCE_BSP.  This makes it easier to
figure out the code position given a fatal source and code.
2014-02-19 09:59:39 +01:00
Sebastian Huber
88ef740ea8 bsp/leon3: Declare amba_initialize() 2014-02-14 10:28:31 +01:00
Sebastian Huber
e644155afa bsp/leon3: Do not define RTEMS_DEBUG
Move vital code out of debug section.  Harmonize variable names with
other implementations.
2014-02-14 10:28:30 +01:00
Sebastian Huber
ad563618ca sparc: Add LEON3_ASR17_PROCESSOR_INDEX_SHIFT
Add _LEON3_Get_current_processor().
2014-02-14 10:28:30 +01:00
Sebastian Huber
24bf11eca1 score: Add CPU counter support
Add a CPU counter interface to allow access to a free-running counter.
It is useful to measure short time intervals.  This can be used for
example to enable profiling of critical low-level functions.

Add two busy wait functions rtems_counter_delay_ticks() and
rtems_counter_delay_nanoseconds() implemented via the CPU counter.
2014-02-14 10:28:29 +01:00
Sebastian Huber
847fc79da1 Revert "bsp/leon3: New BSP variant leon3_qemu"
This reverts commit 7579e25512.

Improve QEMU to support AMBA plug and play instead.
2014-02-07 09:32:31 +01:00
Sebastian Huber
7579e25512 bsp/leon3: New BSP variant leon3_qemu 2014-02-06 08:47:03 +01:00
Sebastian Huber
224b88805e bsp/leon3: Declare bsp_debug_uart_init() in header
Do not return a status.
2014-02-06 08:47:03 +01:00
Sebastian Huber
1c1c2a04c3 bsps: Delete unused bsp_smp_delay() 2014-02-05 15:46:30 +01:00
Sebastian Huber
36a52ab367 bsp/leon3: Avoid magic delays for IPI broadcast 2014-02-05 15:46:30 +01:00
Sebastian Huber
3d770018d9 bsp/leon3: Fix SMP initialization
Avoid usage of the same stack area by multiple secondary processors at
the same time.

Avoid magic delay loops.
2014-02-05 15:46:29 +01:00
Sebastian Huber
3ef2d175fa bsp/leon3: Install IPI handler early
Install inter-processor interrupt (IPI) handler before secondary CPUs
are started.  This ensures that secondary CPUs fetch the newly installed
handler.

Remove superfluous return statement.
2014-02-05 15:46:29 +01:00
Sebastian Huber
d212acb7db bsp/leon3: Use printk() only if debug is enabled 2014-02-05 15:46:29 +01:00
Sebastian Huber
1d5d6de35e bsp/leon3: Console driver changes
Move declaration of global variables and functions to <leon.h> header
file.  Make several global variables and functions static.
2014-02-04 14:54:27 +01:00
Sebastian Huber
6fe6d017a4 bsp/leon3: Avoid copy and paste in console driver 2014-02-04 14:54:27 +01:00
Sebastian Huber
1e744efde9 bsp/leon3: Fix interrupt-driven console driver 2014-02-04 14:54:26 +01:00
Daniel Ramirez
296c74e643 doxygen: refactored doxygen in libbsp to illustrate new rule set 2013-12-09 15:27:02 -05:00
Toma Radu
cfeb191e9d sparc shared: improve doxygen
Add doxygen to the header files in sparc/shared/include directory.
2013-12-07 21:24:28 -05:00
Gedare Bloom
5b3dc6824d leon3: fix doxygen description for bsp.h 2013-12-04 15:51:21 -05:00
Toma Radu
df217b0bcc leon3: improve doxygen
Add doxygen to the bsp.h, tm27.h, amba.h and leon.h files
2013-12-04 15:29:47 -05:00
Daniel Ramirez
3f8abd289b sparc: refactored shared/start.S to shared/start/start.S 2013-12-03 19:49:04 -05:00
Daniel Ramirez
b9287a15aa libbsp: refactored sparc/shared/bspgetworkarea.c to sparc/shared/startup/bspgetworkarea.c
* refactored sparc/shared/bspgetworkarea.c to sparc/shared/startup/bspgetworkarea.c
2013-12-03 09:12:31 -05:00
Radu Toma
d230d8eaae sparc/leon3: Add doxygen. 2013-12-01 19:29:12 -05:00
Sebastian Huber
12cbc370c0 bsp/ngmp: New BSP variant 2013-11-13 09:34:27 +01:00
Sebastian Huber
f204e31070 bsp/leon3: Enable linker script variants 2013-11-13 09:34:27 +01:00
Sebastian Huber
198140009f bsp/leon3: Delete unused LEON_REG symbol 2013-11-13 09:34:27 +01:00
Daniel Hellstrom
82e11be20c LEON3 SMP: remove compiler warning from __delay() declaration 2013-10-31 15:31:06 +01:00
Daniel Hellstrom
bedfe131bb LEON3 SMP: CPU ack irq on trap vector entry execution 2013-10-31 15:31:06 +01:00
Joel Sherrill
24a6943c66 sparc all BSPs: Use function and data sections
This reduces the size of the RTEMS tests on average about 45%.
2013-10-24 18:42:39 -05:00
Joel Sherrill
38905d70d8 leon3/bsppredriver.c: Add include file to warning 2013-09-23 08:28:48 -05:00
Joel Sherrill
876af7a1a0 leon3/.../ckinit.c: Change get nanoseconds handler to static 2013-09-23 08:16:55 -05:00
Joel Sherrill
d2c5bff7dc leon3/.../ckinit.c: Fix missing prototype warnings 2013-09-22 10:51:36 -05:00
Joel Sherrill
4650678bb4 leon3/.../bspstart.c: Fix missing prototype warnings 2013-09-22 10:38:31 -05:00
Joel Sherrill
c8707a316b leon3/console.c: Fix misisng prototype issues 2013-09-21 16:25:06 -05:00
Joel Sherrill
564860fb59 leon3/include/bsp.h: Fix spacing 2013-09-16 14:32:36 -05:00
Sebastian Huber
d473dc0b22 bsps: Fix clock driver defines 2013-08-14 13:27:34 +02:00
Sebastian Huber
fe52e7c07c smp: Add and use _Per_CPU_Get()
Add and use _Per_CPU_Get_by_index() and _Per_CPU_Get_index().  Add
_Per_CPU_Send_interrupt().  This avoids direct access of
_Per_CPU_Information.
2013-07-30 09:53:23 +02:00
Sebastian Huber
ca63ae2ec0 smp: Add and use _CPU_SMP_Send_interrupt()
Delete bsp_smp_interrupt_cpu().
2013-07-17 13:09:50 +02:00
Sebastian Huber
39e51758c8 smp: Add and use _CPU_SMP_Get_current_processor()
Add and use _SMP_Get_current_processor() and
rtems_smp_get_current_processor().

Delete bsp_smp_interrupt_cpu().

Change type of current processor index from int to uint32_t to match
_SMP_Processor_count type.
2013-07-17 13:09:49 +02:00
Sebastian Huber
e18db9f0cf termios: Update due to API changes
Termios notifies now the driver about an inactive transmit with the
length argument set to zero.
2013-06-25 17:03:21 +02:00
Sebastian Huber
edde99bd21 score: Rename rtems_smp_get_number_of_processors()
Rename in rtems_smp_get_processor_count().  Always provide
<rtems/score/smp.h> and <rtems/rtems/smp.h>.  Add
_SMP_Get_processor_count().  This function will be a compile time
constant defined to be one on uni-processor configurations.  This allows
iterations over all processors without overhead on uni-processor
configurations.
2013-06-14 16:26:07 +02:00
Sebastian Huber
2f6108f93b smp: Simplify SMP initialization sequence
Delete bsp_smp_wait_for().  Other parts of the system work without
timeout, e.g. the spinlocks.  Using a timeout here does not make the
system more robust.

Delete bsp_smp_cpu_state and replace it with Per_CPU_State.  The
Per_CPU_State follows the Score naming conventions.  Add
_Per_CPU_Change_state() and _Per_CPU_Wait_for_state() functions to
change and observe states.

Use Per_CPU_State in Per_CPU_Control instead of the anonymous integer.

Add _CPU_Processor_event_broadcast() and _CPU_Processor_event_receive()
functions provided by the CPU port.  Use these functions in
_Per_CPU_Change_state() and _Per_CPU_Wait_for_state().

Add prototype for _SMP_Send_message().

Delete RTEMS_BSP_SMP_FIRST_TASK message.  The first context switch is
now performed in rtems_smp_secondary_cpu_initialize().  Issuing the
first context switch in the context of the inter-processor interrupt is
not possible on systems with a modern interrupt controller.  Such an
interrupt controler usually requires a handshake protocol with interrupt
acknowledge and end of interrupt signals.  A direct context switch in an
interrupt handler circumvents the interrupt processing epilogue and may
leave the system in an inconsistent state.

Release lock in rtems_smp_process_interrupt() even if no message was
delivered.  This prevents deadlock of the system.

Simplify and format _SMP_Send_message(),
_SMP_Request_other_cores_to_perform_first_context_switch(),
_SMP_Request_other_cores_to_dispatch() and
_SMP_Request_other_cores_to_shutdown().
2013-05-29 11:06:07 +02:00
Sebastian Huber
8cacceb7b9 smp: Delete bsp_smp_secondary_cpu_initialize()
Do not call bsp_smp_secondary_cpu_initialize() in
rtems_smp_secondary_cpu_initialize().  This allows more flexibilty in
the BSP low-level code.  Specify context requirements for a call to
rtems_smp_secondary_cpu_initialize().
2013-05-29 11:06:07 +02:00