Commit Graph

241 Commits

Author SHA1 Message Date
Sebastian Huber
143696acbd basedefs.h: Add and use RTEMS_NO_RETURN 2015-10-26 09:13:19 +01:00
Sebastian Huber
335e5caa9a score: Add Thread_Control::is_fp
Store the floating-point unit property in the thread control block
regardless of the CPU_HARDWARE_FP and CPU_SOFTWARE_FP settings.  Make
sure the floating-point unit is only enabled for the corresponding
multilibs.  This helps targets which have a volatile only floating point
context like SPARC for example.
2015-06-09 09:05:50 +02:00
Gedare Bloom
46d3c6d833 cpukit: add and use CPU_Uint32ptr type 2015-03-16 16:24:18 -04:00
Sebastian Huber
8ac3549db3 score: Delete unused CPU_UNROLL_ENQUEUE_PRIORITY 2015-03-05 08:12:24 +01:00
Sebastian Huber
c48cf0bd0c score: Rename _BSP_Exception_frame_print()
Rename _BSP_Exception_frame_print() to _CPU_Exception_frame_print() to
be in line with other CPU port functions.
2014-09-11 09:10:16 +02:00
Daniel Hellstrom
f82752a474 Let CPU/BSP Fatal handler have access to source
Without the source the error code does not say that much.
Let it be up to the CPU/BSP to determine the error code
reported on fatal shutdown.

This patch does not change the current behaviour, just
adds the option to handle the source of the fatal halt.
2014-09-10 14:06:08 +02:00
Chris Johns
59990cc975 Regenerate all preinstall.am files.
With this patch the preinstall.am files are in a set order and not
dependent on now perl implements a hash.
2014-08-29 12:48:01 +10:00
Joel Sherrill
b597c0d60c Regenerate all preinstall.am files.
Apparently, at some point automake output changed and these were
not updated.
2014-08-28 08:44:52 -05:00
Sebastian Huber
03b7789ec7 score: Statically initialize _ISR_Vector_table 2014-04-29 09:51:22 +02:00
Sebastian Huber
f570b07199 score: Rename Priority_bit_map_Control
Rename Priority_bit_map_Control in Priority_bit_map_Word.
2014-04-03 11:13:26 +02:00
Chris Johns
c49985691f Change all references of rtems.com to rtems.org. 2014-03-21 08:10:47 +11: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
022851aba5 Add thread-local storage (TLS) support
Tested and implemented on ARM, m68k, PowerPC and SPARC.  Other
architectures need more work.
2014-02-04 10:06:35 +01:00
Joel Sherrill
bd90283947 mips/.../cpu.h: Comment improvement 2013-11-14 17:26:31 -06:00
WeiY
58a70b7635 score: Simplify <rtems/score/cpuatomic.h>
Add proper license and copyright.
2013-08-28 14:58:50 +02:00
Sebastian Huber
d19cce29dc score: Per-CPU thread dispatch disable level
Use a per-CPU thread dispatch disable level.  So instead of one global
thread dispatch disable level we have now one instance per processor.
This is a major performance improvement for SMP.  On non-SMP
configurations this may simplifiy the interrupt entry/exit code.

The giant lock is still present, but it is now decoupled from the thread
dispatching in _Thread_Dispatch(), _Thread_Handler(),
_Thread_Restart_self() and the interrupt entry/exit.   Access to the
giant lock is now available via _Giant_Acquire() and _Giant_Release().
The giant lock is still implicitly acquired via
_Thread_Dispatch_decrement_disable_level().

The giant lock is only acquired for high-level operations in interrupt
handlers (e.g. release of a semaphore, sending of an event).

As a side-effect this change fixes the lost thread dispatch necessary
indication bug in _Thread_Dispatch().

A per-CPU thread dispatch disable level greatly simplifies the SMP
support for the interrupt entry/exit code since no spin locks have to be
acquired in this area.  It is only necessary to get the current
processor index and use this to calculate the address of the own per-CPU
control.  This reduces the interrupt latency considerably.

All elements for the interrupt entry/exit code are now part of the
Per_CPU_Control structure: thread dispatch disable level, ISR nest level
and thread dispatch necessary.  Nothing else is required (except CPU
port specific stuff like on SPARC).
2013-08-09 23:02:38 +02:00
Sebastian Huber
10fd4aacc7 score/cpu: Add CPU_Per_CPU_control
Add CPU port specific per-CPU control.
2013-08-09 21:58:39 +02:00
WeiY
d61e54c2e0 update-all-architectures-to-new-atomic-implementation 2013-07-17 13:07:33 +02:00
Sebastian Huber
39993d6d76 score: Add CPU context validation 2013-05-10 12:10:14 +02:00
Chris Johns
3806e01a77 Revert bootstrap whitespace changes. 2013-05-10 18:33:11 +10:00
WeiY
9b605b28b4 Using the generic atomic ops to implement UP mode atomic for all architectures. SMP atomic port will be later. 2013-05-01 10:28:48 -04:00
Sebastian Huber
59c05590df mips: Fix warnings 2013-04-23 09:59:57 +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
b10825cd5d cpukit: Add EOL on files missing EOL at EOF 2013-01-10 17:06:47 -06:00
Alex Ivanov
1362b7a6d0 score: Doxygen Clean Up Task #4 2013-01-08 11:40:52 -06:00
Mathew Kallada
a1f9934a8f score: Doxygen Clean Up Task #3 2013-01-04 09:01:21 -06:00
Alex Ivanov
e0f91da505 score misc: Score misc: Clean up Doxygen #9 (GCI 2012)
This patch is a task from GCI 2012 which improves the Doxygen
comments in the RTEMS source.

https://google-melange.appspot.com/gci/task/view/google/gci2012/7977211
2012-11-30 15:35:36 -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
f1738ed619 score: PR1607: Add and use CPU_SIZEOF_POINTER
Add and use new CPU port define CPU_SIZEOF_POINTER.  It must be an
integer literal that can be used by the assembler.  This value will be
used to calculate offsets of structure members.  These offsets will be
used in assembler code.

The size of a pointer is part of the application binary interface (ABI)
and thus independent of the actual programming language.  The compiler
will provide defines to determine the current ABI.  We use these defines
to select the appropriate CPU_SIZEOF_POINTER value.

Static assertions in the new file "cpukit/score/src/percpuasm.c" will
ensure that the value of CPU_SIZEOF_POINTER is consistent with the
current compiler settings.  Also the offset values used by assembler
code are verfied.
2012-11-22 16:35:07 +01:00
Joel Sherrill
09f2ce38aa mips/idtcpu.h: Fix nested comment warning 2012-09-05 12:23:59 -05:00
Joel Sherrill
3e5ff08227 mips/cpu.h: Define CPU_SIMPLE_VECTORED_INTERRUPTS and remove _CPU_ISR_Initialize 2012-06-11 12:40:11 -05: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
ee32f67a6f Remove CVS-Ids. 2012-05-04 09:36:25 +02:00
Jennifer Averett
0c0181dee2 PR 1993 - Convert MIPS to PIC IRQ model 2012-04-04 08:43:08 -05:00
Joel Sherrill
61250b4ce9 Remove all .cvsignore files. 2012-02-01 10:59:44 -06:00
Jennifer Averett
0f98487dae 2011-12-09 Jennifer Averett
* cpu.c: Correct typo.
2011-12-09 14:04:37 +00:00
Sebastian Huber
9c121991d7 2011-09-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
PR 1914/cpukit
	* rtems/score/cpu.h: Select timestamp implementation.
2011-09-27 09:18:25 +00:00
Joel Sherrill
7c2f244849 2011-07-24 Joel Sherrill <joel.sherrill@oarcorp.com>
* cpu.c: Remove /*PAGE markers which were interpreted by a long dead
	print script.
2011-07-24 23:43:20 +00:00
Ralf Corsepius
b3eb2fb9e8 2011-05-17 Ralf Corsépius <ralf.corsepius@rtems.org>
* Makefile.am: Reformat.
2011-05-17 14:54:13 +00:00
Ralf Corsepius
f8958d9c7d 2011-02-11 Ralf Corsépius <ralf.corsepius@rtems.org>
* cpu.c, rtems/score/mips.h:
	Use "__asm__" instead of "asm" for improved c99-compliance.
2011-02-11 08:54:08 +00:00
Joel Sherrill
031785a6cd 2011-01-04 Joel Sherrill <joel.sherrill@oarcorp.com>
* cpu_asm.S: _Thread_Executing was not used.
2011-01-04 15:33:31 +00:00
Joel Sherrill
479cbaf81d 2010-10-21 Joel Sherrill <joel.sherrill@oarcorp.com>
* rtems/score/cpu.h: Add RTEMS_COMPILER_NO_RETURN_ATTRIBUTE to
	_CPU_Context_restore() because it does not return. Telling GCC this
	avoids generation of dead code.
2010-10-21 22:18:05 +00:00
Joel Sherrill
bfc76f9e1b 2010-07-30 Gedare Bloom <giddyup44@yahoo.com>
PR 1599/cpukit
	* cpu_asm.S: Rename _Context_Switch_necessary to
	_Thread_Dispatch_necessary to more properly reflect the intent.
2010-07-30 18:52:12 +00:00
Joel Sherrill
4ef13360d6 2010-07-29 Gedare Bloom <giddyup44@yahoo.com>
PR 1635/cpukit
	* rtems/score/cpu.h, rtems/score/types.h: Refactoring of priority
	handling, to isolate the bitmap implementation of priorities in the
	supercore so that priority management is a little more modular. This
	change is in anticipation of scheduler implementations that can
	select how they manage tracking priority levels / finding the highest
	priority ready task. Note that most of the changes here are simple
	renaming, to clarify the use of the bitmap-based priority management.
2010-07-29 17:51:56 +00:00
Sebastian Huber
89b85e5100 2010-07-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
* rtems/score/cpu.h: Include <rtems/score/types.h> first.
	* rtems/score/types.h: Use <rtems/score/basedefs.h> header file.
2010-07-16 08:46:29 +00:00
Joel Sherrill
9787ee22a1 2010-07-01 Joel Sherrill <joel.sherrill@oarcorp.com>
* rtems/asm.h, rtems/score/cpu.h: cpu.h defines were not available to
	assembly programs. This resulted in percpu.h (when included from
	assembly) not being able to detect that the MIPS does not have a
	dedicated software managed interrupt stack.
2010-07-01 19:43:29 +00:00
Joel Sherrill
6d42b4c60a 2010-06-28 Joel Sherrill <joel.sherrill@oarcorp.com>
PR 1573/cpukit
	* cpu_asm.S, rtems/score/cpu.h: Add a per cpu data structure which
	contains the information required by RTEMS for each CPU core. This
	encapsulates information such as thread executing, heir, idle and
	dispatch needed.
2010-06-29 00:34:00 +00:00
Joel Sherrill
9b5f06cd43 2010-06-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* cpu_asm.S: Remove trailing tabs.
2010-06-16 17:25:55 +00:00
Joel Sherrill
a0cb87cbfc 2010-04-25 Joel Sherrill <joel.sherrilL@OARcorp.com>
* cpu.c, rtems/score/cpu.h: Move _CPU_Context_Initialize() to cpu.c so
	it is easier to make warning free.
2010-04-25 21:37:46 +00:00