Commit Graph

4408 Commits

Author SHA1 Message Date
Sebastian Huber
5fa893ea20 score: Add _SMP_Unicast_action() 2019-05-20 09:31:25 +02:00
Sebastian Huber
577293f0a9 score: Add _SMP_Synchronize() 2019-05-20 09:01:15 +02:00
Sebastian Huber
fe24820e95 smpipi01: Use per-CPU jobs for IPI flood test 2019-05-20 08:54:31 +02:00
Sebastian Huber
21e691b7d7 smpipi01: Ensure IPI works on all processors 2019-05-20 08:54:31 +02:00
Sebastian Huber
7cb881f5b1 smpipi01: Use per-CPU jobs for pending IPI test 2019-05-20 08:54:31 +02:00
Sebastian Huber
c63e8bbeb9 score: Modify _Per_CPU_Perform_jobs()
Process only the jobs initially registered on the processing list.  This
makes it possible to add jobs for the current processor in a job
handler.  These jobs are processed with the next
SMP_MESSAGE_PERFORM_JOBS message.  The lock is only acquired and
released once.
2019-05-20 08:54:27 +02:00
Sebastian Huber
85d6e845d2 score: Add _Per_CPU_Add_job() 2019-05-20 08:52:39 +02:00
Sebastian Huber
3b2481f9a7 score: Simplify _SMP_Multicast_action()
Move resposibility to disable thread dispatching to the caller of
_SMP_Multicast_action().  Using an interrupt disable for this purpose is
questionable.
2019-05-20 08:49:39 +02:00
Sebastian Huber
658700449d score: Add _SMP_Broadcast_action() 2019-05-20 08:49:39 +02:00
Sebastian Huber
9f52acb5e5 smptests: Move SMP broadcast action test case 2019-05-20 08:49:39 +02:00
Sebastian Huber
317997fd1b smpmulticast01: Use T_TEST_CASE() 2019-05-20 08:49:39 +02:00
Joel Sherrill
6d3e3934cd Makefile.am: Add psxhdrs/termios files to build 2019-05-07 15:01:03 -05:00
Jacob Shin
7bd38f88c7 psxhdrs: Add POSIX API Signature Compliance Tests for termios.h 2019-05-07 14:35:30 -05:00
Chris Johns
b36c52097f libdl: Do not access the ELF file while the allocator is locked.
- Load symbols before allocation.
- Parse reloc records and place any reloc recs in a cache to use
  while the allocator is locked.
- Relocate symbols after section allocation.
- Split section loading into allocation/locating and loading.
- Update all arch back-ends with a new reloc interface to control
  tramp handling.
- Add `-a` and `-t` to the object list shell command.

Closes #3741
2019-05-03 10:15:20 +10:00
Sebastian Huber
ef9d20f691 score: More robust _SMP_Multicast_action()
If the caller already disabled interrupts, then do not disable thread
dispatching.  Calling _SMP_Multicast_action() with interrupts disabled
is a questionable use case.
2019-04-12 11:15:40 +02:00
Sebastian Huber
f410b31be4 score: Improve _SMP_Multicast_action()
Let it work during system initialization.
2019-04-12 09:44:48 +02:00
Sebastian Huber
e90486ab41 score: Rework SMP multicast action
Use a FIFO list of jobs per processor to carry out the SMP multicast
action.  Use a done indicator per job to reduce the bus traffic a bit.
2019-04-12 09:44:48 +02:00
Sebastian Huber
df8d7bd76f score: Use processor mask in _SMP_Multicast_action
Processor_mask is the internal data type to deal with processor sets.
2019-04-12 09:44:48 +02:00
Sebastian Huber
18d45d9d25 score: Add _ISR_lock_Set_name()
Add _ISR_lock_Set_name() to optimize the initialization of
zero-initialized locks.
2019-04-12 09:12:03 +02:00
Sebastian Huber
ad87de4a67 score: Rename _SMP_Get_processor_count()
Rename _SMP_Get_processor_count() in _SMP_Get_processor_maximum() to be
in line with the API level rtems_scheduler_get_processor_maximum().

Update #3732.
2019-04-11 09:19:12 +02:00
Sebastian Huber
71c5b005c7 spmisc01: Use RTEMS_CONST
Update #3734.
2019-04-09 08:18:28 +02:00
Sebastian Huber
f9219db2a9 rtems: Add rtems_scheduler_get_processor_maximum()
Add rtems_scheduler_get_processor_maximum() as a replacement for
rtems_get_processor_count(). The rtems_get_processor_count() is a bit
orphaned. Adopt it by the Scheduler Manager. The count is also
misleading, since the processor set may have gaps and the actual count
of online processors may be less than the value returned by
rtems_get_processor_count().

Update #3732.
2019-04-09 08:06:46 +02:00
Sebastian Huber
03c9f24061 rtems: Add rtems_scheduler_get_processor()
Add rtems_scheduler_get_processor() as a replacement for
rtems_get_current_processor(). The rtems_get_current_processor() is a
bit orphaned. Adopt it by the Scheduler Manager. This is in line with
the glibc sched_getcpu() function.

Deprecate rtems_get_current_processor().

Update #3731.
2019-04-09 08:06:46 +02:00
Sebastian Huber
cbfc341560 ttest01: New test
This is an example test using the RTEMS Test Framework.  It tests also
the framework itself.

Add T_FILE_NAME command line define to get rid of the full file path.
This is important to reduce the read-only data of test files and make
them build system independent.

Update #3199.
2019-03-27 07:21:31 +01:00
Sebastian Huber
6fe01e4b3d build: Move test support to librtemstest.a
One reason to move the test support into a dedicated library are the
standard output __wrap_*() functions.  They may conflict with
application level wrappers.

Update #3199.
2019-03-26 11:29:58 +01:00
Joel Sherrill
127ee3a552 psxhdrs/stdio/v*.c: Fix warnings in varargs tests 2019-03-25 16:27:44 -05:00
Chris Johns
dad6fd4333 libdl: Add an archive command
- The archive command lists archives, symbols and any duplicate
  symbols.
- Change the RTL shell commands to the rtems_printer to allow
  the output to be captured.
2019-03-22 14:16:52 +11:00
Sebastian Huber
3fe215502a Remove superfluous <rtems/system.h> includes 2019-03-14 13:13:27 +01:00
Sebastian Huber
20d472d3d7 Add rtems_board_support_package() 2019-03-14 13:13:27 +01:00
Sebastian Huber
d91951fbc0 record: Rename internal per-CPU events
Update #3665.
2019-03-12 13:44:24 +01:00
Shashvat Jain
0a154d5c9c Correct psxtmtests_plan.csv 2019-03-11 18:56:56 -05:00
Chris Johns
96e4b22312 testsuite: Make the OPERATION_COUNT a test configuration parameter.
- Add a small memory test config file.
- Update the small memory PowerPC BSPs to use the new test config.
2019-03-07 06:33:47 +11:00
Chris Johns
a06356b455 testsuite: Add rexclude, rinclude and cflags to test config files. 2019-03-07 06:33:47 +11:00
Sebastian Huber
03b21633d9 score: Fix _Scheduler_EDF_Cancel_job()
Remove the priority node only in case it is active.
2019-03-01 10:12:42 +01:00
Sebastian Huber
3d65f457ea psxtests/psxonce01: Fix typo
Update #3334.
2019-02-18 08:33:26 +01:00
Sebastian Huber
e4ad14cc78 score: Avoid some deadlocks in _Once()
Recursive usage of the same pthread_once_t results now in a deadlock.
Previously, an error of EINVAL was returned.  This usage scenario is
invalid according to the POSIX pthread_once() specification.

Close #3334.
2019-02-18 07:25:58 +01:00
Sebastian Huber
7fdcd02338 psxtests: Remove bogus file
This file is unused and makes trouble on Windows.

Updates #3638.
2019-02-12 10:26:34 +01:00
Chris Johns
6c9f0176a9 libdl: Add powerpc large memory and small data support.
- Add support for architecure sections that can be handled by the
  architecture back end.

- Add trampoline/fixup support for PowerPC. This means the PowerPC
  now supports large memory loading of applications.

- Add a bit allocator to manage small block based regions of memory.

- Add small data (sdata/sbss) support for the PowerPC. The support
  makes the linker allocated small data region of memory a global
  resource available to libdl loaded object files.

Updates #3687
Updates #3685
2019-02-09 10:06:34 +11:00
Chris Johns
194eb403c3 libdl: Add support for large memory programs
- Add trampolines to support relocs that are out of range on
  support architectures.

- Support not loading separate text/data sections in an object
  file if the symbol provided in the section is a duplicate.
  A base image may have pulled in part of an object and another
  part needs to be dynamically loaded.

- Refactor the unresolved handling to scale to hundreds of
  unresolved symbols when loading large number of files.

Updates #3685
2019-02-09 10:06:34 +11:00
Chris Johns
d8c70ba65b libdl: Add support for trampolines
- Trampolines or fixups for veneers provide long jump support
  for instruciton sets that implement short relative address
  branches. The linker provides trampolines when creating a
  static image. This patch adds trampoline support to libdl
  and the ARM architecture.

- The dl09 test requires enough memory so modules are outside
  the relative branch instruction ranges for the architecture.

Updates #3685
2019-02-09 10:06:34 +11:00
Chris Johns
4408603e27 libdl: Fix the support for constructors and desctructors.
- Fix the handling of pending objects.
- Add a constructor flags in objects to track then being called.

Closes #2921
2019-02-09 10:06:34 +11:00
Chris Johns
a7c6176293 libtest/dl08: Add a test for archives.
- Create 2 archives.
- Load 1 object file which loads 6 object files from the libraries.

Updates #3686
2019-02-09 10:06:34 +11:00
Chris Johns
bac5363453 libtests/dl02: Update the rtl-shell path. More verbose test.
Updates #3686
2019-02-09 10:06:34 +11:00
Chris Johns
85b599747e libtests/dl02: Update the rtl-shell path.
Updates #3686
2019-02-09 10:06:34 +11:00
Sebastian Huber
fbd08066af score: Fix plain priority thread queues (SMP)
We must add/remove the priority queue to the FIFO of priority queues.
2019-02-07 08:48:18 +01:00
Sebastian Huber
03fcbb15d2 fs: Add struct dirent::d_type support 2019-02-05 10:17:04 +01:00
Sebastian Huber
b015c01443 build: Do not install test programs 2019-01-30 09:46:35 +01:00
Sebastian Huber
03cdd5eab8 record: Add enum value for each event
Update #3665.
2019-01-30 09:46:35 +01:00
Sebastian Huber
dca618404e Add low level event recording support
Add low level event recording infrastructure for system and user
defined events.  The infrastructure is able to record high frequency
events such as

 * SMP lock acquire/release,
 * interrupt entry/exit,
 * thread switches,
 * UMA zone allocate/free, and
 * Ethernet packet input/output, etc.

It allows post-mortem analysis in fatal error handlers, e.g. the last
events are in the record buffer, the newest event overwrites the oldest
event.  It is possible to detect record buffer overflows for consumers
that expect a continuous stream of events, e.g. to display the system
state in real-time.

The implementation supports high-end SMP machines (more than 1GHz
processor frequency, more than four processors).

Add a new API instead. The implementation uses per-processor data
structures and no atomic read-modify-write operations.  It is uses
per-processor ring buffers to record the events.

The CPU counter is used to get the time of events. It is combined with
periodic uptime events to synchronize it with CLOCK_REALTIME.

The existing capture engine tries to solve this problem also, but its
performance is not good enough for high-end production systems.  The
main issues are the variable-size buffers and the use of SMP locks for
synchronization.  To fix this, the API would change significantly.

Update #3665.
2019-01-29 13:51:33 +01:00
Sebastian Huber
e74a3fd13d samples/pppd: Use less memory hungry configuration
This avoids link-time failures on some low memory BSPs.
2019-01-29 13:27:01 +01:00