Commit Graph
25254 Commits
Author SHA1 Message Date
Sebastian Huber 7c5ceea5ba score: Mark as no return
Mark rtems_smp_secondary_cpu_initialize() as no return.
2013-05-31 15:20:31 +02:00
Sebastian Huber e3be691598 score: Remove idle field of Per_CPU_Control
This field is unused except for special case simulator clock drivers.
In these places use an alternative.  Add and use
_Thread_Set_global_exit_status() and _Thread_Get_global_exit_status().
2013-05-31 15:20:31 +02:00
Sebastian Huber 17e09f8e0b bsps: Use _Objects_Information_table
Eliminate copy and paste.  Use the _Objects_Information_table since this
will take into account that more than one internal thread may exist,
e.g. MPCI thread or idle threads of secondary processors.
2013-05-31 15:20:31 +02:00
Sebastian Huber 5b391f857b bsps/arm: Use Write-Allocate cache for ARMv7 2013-05-31 15:20:31 +02:00
Sebastian Huber 1dcf5febf2 bsps/arm: Merge ARMv7 MMU section definitions 2013-05-31 15:20:31 +02:00
Sebastian Huber ac2bb464a5 smptests: Use priority ceiling for locked print
In case the printf() blocks on a semaphore it was possible to end up in
a livelock.
2013-05-31 15:20:30 +02:00
Sebastian Huber e071c18322 smp: Move secondary CPU initialization request
Do not assume that the scheduler selects the main processor for the
initialization thread.
2013-05-29 11:06:08 +02:00
Sebastian Huber 3148438e1e smp: Use _CPU_Fatal_halt() 2013-05-29 11:06:08 +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
Sebastian Huber 42eee51744 smp: Delete rtems_smp_send_message() 2013-05-29 11:06:07 +02:00
Sebastian Huber 9f703b46e7 smp: Delete rtems_smp_initialize_per_cpu() 2013-05-29 11:06:07 +02:00
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 10643e958c smp: Make CPU_ALLOCATE_INTERRUPT_STACK optional 2013-05-29 11:06:06 +02:00
Sebastian Huber a29704eb04 smp: Rely on BSS initialization
The _Per_CPU_Information is part of the BSS segment and must be zero
initialized.  Some processors may already poll some per-CPU fields and
wait for a state change at this point.
2013-05-29 11:06:06 +02:00
Sebastian Huber e70a14ad40 smp: Include missing header 2013-05-29 11:06:06 +02:00
Sebastian Huber 3d7eecc0a6 smp: Replace task delete with suspend
The rtems_task_delete() does not work on SMP at the moment.  See PR1814.
2013-05-29 11:06:06 +02:00
Ralf Corsépius d65de8a121 Update from automake-1.13.2. 2013-05-27 14:47:20 +02:00
Sebastian Huber 10fd953347 smptests/smp09: Add missing newline 2013-05-27 12:49:14 +02:00
Sebastian Huber b734b9e8b0 smptests/smp01: Do not assume CPU 0 runs Init 2013-05-27 12:49:14 +02:00
Sebastian Huber db0cede12c smptests/smp01: Fix semaphore count
The locked print needs one semaphore.
2013-05-27 12:49:14 +02:00
Sebastian Huber 9344677cf4 bsp/qoriq: Avoid NULL pointer access 2013-05-27 12:49:14 +02:00
Sebastian Huber 9984acd10c bsps/arm: Add CLOCK_DRIVER_USE_FAST_IDLE option 2013-05-27 12:49:14 +02:00
Sebastian Huber 0d671d709f bsps/arm: Move .fast_text section
Move the .fast_text section after the .vector section.  The .fast_test
section is normally not empty in case some functions should execute from
an internal SRAM.  This would be also the area for the .vector section.
The vector table must be the first content of such an area.
2013-05-27 12:49:13 +02:00
Sebastian Huber cab410f7d9 bsps: Update due to linker changes
In case the VMA and LMA regions differ, the LMA start address is now no
longer aligned with the alignment of the input sections:

http://sourceware.org/bugzilla/show_bug.cgi?id=15222
2013-05-27 12:49:13 +02:00
Sebastian Huber d9bd5cd699 arm: Add CPU specific idle thread for ARMv7 2013-05-27 12:49:13 +02:00
Sebastian Huber 18e1e5bbf1 arm: Fix CPSR and SPSR access
The GNU assembler translates for example a

	msr spsr, rN
into

	msr SPSR_fc, rN

This would update only a subset of the register and leads to an
incomplete exceptions restore sequence resulting in system corruption.
Correct is this:

	msr SPSR_fsxc, rN
2013-05-27 12:49:13 +02:00
Ralf Kirchner e67025e390 dosfs: Add RTEMS_DOSFS_SEMAPHORES_PER_INSTANCE 2013-05-24 08:55:05 +02:00
Ralf Kirchner a0f3ce25a4 dosfs: Fix typo 2013-05-24 08:52:35 +02:00
Ralf Kirchner 8db586c8c4 fstests: Use "tmacros.h" instead of "pmacros.h" 2013-05-24 08:52:35 +02:00
Gedare Bloom 26ecc744b5 sptests: add test to demonstrate bug in strict order mutex 2013-05-20 09:41:18 -04:00
Gedare Bloom 9cdbf73497 sptests: add test for priority inversion with multiple locks 2013-05-20 09:37:53 -04:00
Gedare Bloom 36a6f58ac5 score: use reference with strict mutex 2013-05-18 14:42:36 -04: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
Sebastian Huber 12c99a6476 fstests/fsstatvfs: Fix end of test message 2013-05-16 11:40:42 +02:00
Andrei Mozzhuhin 7bb71c7e9d shell: Add df command 2013-05-16 11:40:42 +02:00
Andrei Mozzhuhin 56f2260008 dosfs: Add statvfs() support 2013-05-16 11:40:41 +02:00
Andreas Heinig d2d09eac21 shell: Fix NULL pointer access 2013-05-16 11:40:22 +02:00
Daron Chabot 5e45d363f2 Add c++ guard to header. 2013-05-16 11:16:46 +02:00
Sebastian Huber b71336c6e5 libcsupport: Avoid division by zero 2013-05-10 12:10:15 +02:00
Sebastian Huber 9deed9edbf libtests/malloc04: Prevent compiler optimizations 2013-05-10 12:10:14 +02:00
Sebastian Huber cfd8d7a3d7 arm: Support VFP-D32 and Neon 2013-05-10 12:10:14 +02:00
Sebastian Huber 9dcc6837de arm: Simplify architecture selection 2013-05-10 12:10:14 +02:00
Sebastian Huber 39993d6d76 score: Add CPU context validation 2013-05-10 12:10:14 +02:00
Sebastian Huber aedeb57783 arm: Add FUNCTION_THUMB_ENTRY(), etc.
Add FUNCTION_THUMB_ENTRY(), FUNCTION_ENTRY() and FUNCTION_END().
2013-05-10 12:10:13 +02:00
Chris Johns 3806e01a77 Revert bootstrap whitespace changes. 2013-05-10 18:33:11 +10:00
Sebastian Huber ad4ef3c79e sparc: Fix problem with assembler files 2013-05-07 11:35:01 +02:00
Mohammed Khoory b1ce6f29d2 sparc.h: Included stdint.h
This header uses uint32_t but does not include stdint.h
This may cause problems when compiling applications that include BSP
headers that include this file (leon.h for example)
2013-05-06 15:08:12 +02:00
Sebastian Huber a94d46c84b bsp/xilinx-zynq: New BSP 2013-05-06 15:06:52 +02:00
Sebastian Huber 12d182c435 bsps/arm: Fix register usage 2013-05-06 15:06:52 +02:00