Commit Graph

33461 Commits

Author SHA1 Message Date
Daniel Hellstrom
81e4a15b18 leon,ckinit: avoid assuming 1MHz timer pre-scaler clock
Update #4310.
2021-03-07 16:08:25 +01:00
Daniel Hellstrom
0ed294b6cc leon3: avoid dependency on apbuart/timer driver
Moves drvmgr_drivers[] from amba.c to a separate file in order
to avoid the dependecy on APBUART/GPTIMER drivers. This has
an effect when user configured not to use timer or uart
in their project.

Update #4309.
2021-03-07 16:08:25 +01:00
Daniel Hellstrom
c13205f691 leon,greth: added support for variable sized descriptor table sizes
The descriptor table size is equal to its alignment and set when
configuring the HW IP through VHDL generics. This SW patch simply
probes the HW how large the RX/TX descriptor tables are and adjusts
accordingly.

The number of descriptors actual used are controlled by other
settings (rxDescs and txDescs) controlled by the user.

Update #4308.
2021-03-07 16:08:25 +01:00
Daniel Hellstrom
23cc5a6090 leon,grcan: split out GRCAN non-FD specific support in separate file
Update #4307.
2021-03-07 16:08:24 +01:00
Daniel Hellstrom
e180f281ab leon,grcanfd: split out GRCANFD specific support in separate file
Update #4307.
2021-03-07 16:08:24 +01:00
Daniel Hellstrom
c41e7bae9c leon,grcan: added support for GRCANFD
The new GRCAN_FD IP supports CAN FD standard and is mostly backwards
compatible with GRCAN SW interface. The GRCAN driver have been extended
to support the GRCANFD IP using the same driver.

Additional functions have been added that uses a new CAN FD frame
format and read/write/baud-rate functions that supports both GRCANFD
and GRCAN. To keep the SW API fully backwards compatible with GRCAN,
the old functions remain.

Update #4307.
2021-03-07 16:08:24 +01:00
Daniel Hellstrom
e1062fae3c grlib: added 64-bit read no-cache function
Update #4307.
2021-03-07 16:08:24 +01:00
Daniel Hellstrom
7db032cf02 leon,occan: use common CAN baud-rate calculation routine
Update #4306.
2021-03-07 16:08:24 +01:00
Daniel Hellstrom
78b45cc561 leon,grcan: use common CAN baud-rate calculation routine
Update #4306.
2021-03-07 16:08:23 +01:00
Daniel Hellstrom
da7cb87b4d leon,can: introduce common CAN baud-rate calculation function
Reimplemented the baud-rate algorithm from scratch to cope with
GRCAN, GRCANFD and OC_CAN devices.

Update #4306.
2021-03-07 16:08:23 +01:00
Daniel Hellstrom
0ab993b04a grlib,ambapp: added new IP core IDs
Update #4305.
2021-03-07 16:08:23 +01:00
Daniel Hellstrom
84fb340ac4 leon,grspw: fix for SET_PACKET_SIZE
When the DMA table has been allocated dynamically, the IOCTL_SET_PACKETSIZE
will trigger an issue where pDev->rx and pDev->tx are not updated with
the new DMA tables base address. Instead the old pointers are used.

There is no point in reallocting the DMA tables because there is no
configuration option to it. Therefore the DMA tables allocation is
moved to a separate function never called from SET_PACKETSIZE.

Update #4304.
2021-03-07 16:08:23 +01:00
Arvid Bjorkengren
8004ffb649 leon,gr1553b: Only align allocated memory. Verify alignment of memory.
Update #4303.
2021-03-07 16:08:23 +01:00
Arvid Bjorkengren
14fcf38891 leon,gr1553b: set codec version
This is enables the updated codec for GR740 and is backwards compatible
with all other versions of the IP.

Updates #4275.
2021-03-07 16:08:22 +01:00
Arvid Bjorkengren
1223f5e402 leon,gr1553rt: Fixed spinlock unlock
Update #4274.
2021-03-07 16:08:22 +01:00
Arvid Bjorkengren
a97a4732f7 leon,gr1553rt: Fixed memory leak
Update #4274.
2021-03-07 16:08:22 +01:00
Daniel Cederman
980cdb82a7 sparc: Remove sequences that the B2BST scan script warns about
Update #4154.
2021-03-07 16:08:22 +01:00
Vijay Kumar Banerjee
f4d00aa538 powerpc/beatnik/net: Remove unused files
Close #4293
2021-03-03 19:45:00 -07:00
Chris Johns
d1bab986ca powerpc/motorola_power: Place any common data in the .bss section
- It seems the compiler how defaults to -fcommon and this means
  some uninitialised data is ignored.

Closes #4266
2021-02-27 10:59:25 +11:00
Chris Johns
3824960f24 powerpc/motorola_power: Link all text sections into the executable image
- The change to building all code with code and data sections means
  we have a section per function. Make sure all functions are
  placed in the text section.

Closes #4266
2021-02-24 17:04:36 +11:00
Chris Johns
2f56b7375a Update motorola_power to irq-generic interrupt management
- Add support to the BSP to enable irq-generic management

- Update the powerpc shared irq code to support irq-generic. This
  is an opt in option for existing powerpc bsps. This change
  should be simpler now

- Fix a number of issues in ISA IRQ controller handling by porting
  fixes from the i386 (PC) BSP

Closes #4247
Closes #4248
2021-02-16 15:24:33 +11:00
Chris Johns
388bd8054c bsp/motorola_powerp: Print RTEMS_VERSION from the bootloader
Close #4234
2021-02-10 17:35:30 +11:00
Chris Johns
6d9843e189 powerpc/shared: ISA bus bridge fails to enable the openpic irq
- The call to enable the openpic irq for the ISA bridge fails
  because the IRQ used is offset by the ISA bus signals and
  the openpic call expects an IRQ relative to its signals.

- Add the MVME 2600/2700 to the list of boards with an ISA bridge.

Closes #4233
2021-02-08 09:43:48 +11:00
Sebastian Huber
ef1ac8afff score: Add barrier thread queue operations
This fixes a missing decrement of the number of waiting threads during a
barrier wait timeout.

Close #4232.
2021-02-06 21:06:10 +01:00
Sebastian Huber
cc2a237129 score: Make FIFO thread queue ops public
Update #4232.
2021-02-06 21:06:05 +01:00
Sebastian Huber
5861e42567 score: Constify Thread_queue_First_operation
Update #4232.
2021-02-06 21:05:58 +01:00
Sebastian Huber
5ae7ec9477 Fix RTEMS_LINKER_ROSET_ITEM_ORDERED_DECLARE()
Add "extern" similar to RTEMS_LINKER_RWSET_ITEM_ORDERED_DECLARE().

Close #4224.
2021-01-25 06:46:09 +01:00
Christian Mauderer
0d44334ca1 bsp/imx: Fix system counter init for imx6
For i.MX7 U-Boot initializes the system counter. On i.MX6 Barebox is
often used which doesn't initialize the counter. With this patch, we try
to auto-detect whether the counter is initialized or not and do the
initialization ourself if necessary.

Closes #4220
2021-01-21 10:29:15 +01:00
Sebastian Huber
2a8f755107 bsps/arm: Fix MMU configuration
Update #4185.
2020-12-15 11:26:43 +01:00
Jan Sommer
21ed8d11c5 bsps/arm: Fix MMU small pages support
- For small tables only round to the next 4kiB instead of 1MiB

Close #4185.
2020-12-11 06:55:18 +01:00
Sebastian Huber
dedc3e1d49 rtems: Improve rtems_interrupt_server_create()
Also start interrupt server tasks on processors which do not have a
scheduler.  Applications may dynamically manage processors using
rtems_scheduler_remove_processor() and rtems_scheduler_add_processor().

Close #4190.
2020-11-25 08:32:24 +01:00
Sebastian Huber
1dbdf94e67 bsps: Fix rtems_interrupt_server_delete()
The ISR lock must be destroyed to prevent memory corruption if RTEMS_PROFILING
and RTEMS_SMP is enabled.

Close #4189.
2020-11-25 08:25:02 +01:00
Christian Mauderer
0af682cf5d bsp/atsam: Fix XDMAD status
In "bsp/atsam: Simplify XDMAD_Handler()" (5f813694f6) the interrupt
callback has been made unconditional. That allowed to avoid some special
deadlock situations in error cases. But it removed part of the XDMAD
status handling.

This patch adds the ability to update the XDMAD status from the
callback if that is necessary for the driver.

Fixes #4172
2020-11-12 08:31:41 +01:00
Jan Sommer
f84c4a5b81 confdefs: Add extern C guards to libpci.h
Closes #4169
2020-10-30 13:21:46 +11:00
Chris Johns
7021c01464 libfs/rfs: Check search bit map end on last bit
- Do not write past the last location of the search bit map
  whe nit is being created.

Closes #4149
2020-10-17 10:55:30 +11:00
Sebastian Huber
e71e271ce1 bsps/arm: Add workaround for Errata 794072
Add a workaround for Cortex-A9 Errata 845369: A short loop including a DMB
instruction might cause a denial of service on another which executes a CP15
broadcast operation.

Close #4114.
2020-10-16 06:41:32 +02:00
Sebastian Huber
3d7da43562 bsps/arm: Workaround for Errata 845369
Add a workaround for Cortex-A9 Errata 845369: Under Very Rare Timing
Circumstances Transition into Streaming Mode Might Create Data Corruption.

Update #4114.
2020-10-16 06:41:27 +02:00
Gedare Bloom
40f23ceae6 i386/score: fix assembly mnemonic
This is a backport for assembler error observed in 6. Although the
assembler error does not appear in 5, the backport was requested.

Closes #4083.
2020-10-02 10:38:49 -06:00
Ryan Long
fdbe9b7599 rtems-bsps: add ability to print architecture/bsp list
Closes #4099.
2020-09-29 07:59:31 -05:00
Frank Kühndel
18549295be Fixing bug in line editing of the shell with CTRL-U.
This patch fixes a tiny bug in the command line editing of the RTEMS shell.
Typing CTRL-U in the shell should remove all characters left of the cursor.
After pressing CTRL-U, the current implementation does wrongly place the cursor
at the end of the line instead at its beginning.

To reproduce the bug, start the shell and type 'abc123' (no <RETURN>):

> ~/src/rtems $ qemu-system-arm -net none -nographic -M realview-pbx-a9 \
  -m 256M -kernel build/arm/realview_pbx_a9_qemu/testsuites/libtests/dl10.exe
> *** BEGIN OF TEST libdl (RTL) 10 ***
> *** TEST VERSION: 6.0.0.d9bdf166644f612dd628fe4951c12c6f8e94ba5f
> *** TEST STATE: USER_INPUT
> *** TEST BUILD: RTEMS_DEBUG RTEMS_NETWORKING RTEMS_POSIX_API RTEMS_SMP
> *** TEST TOOLS: 10.2.1 20200904 \
  (RTEMS 6, RSB 31f936a7b74d60bda609a9960c6e1a705ba54974, Newlib a0d7982)
> RTL (libdl) commands: dl, rtl
>
> RTEMS Shell on /dev/foobar. Use 'help' to list commands.
> SHLL [/] # abc123

Then move the cursor onto the '1' by hitting three times the <ARROW-LEFT> key.
Next type <CTRL>-U:

> SHLL [/] # 123

Note that the cursor is at the end of the line (after '3') instead of correctly
at the beginning (on the '1'), now.

Continuing typing 'echo ' incorrectly results in the output:

> SHLL [/] # 123echo 123

The patch changes this behavior so that the cursor in the second last step will
be on the '1' and typing 'echo ' will then correctly reflected as:

> SHLL [/] # echo 123

Close #4096.
2020-09-28 14:20:35 +02:00
Jan Sommer
b11745148d bsps/pc386: Add missing license header
Closes #4902.
2020-09-23 08:24:05 -05:00
Jan Sommer
61ccb9c05d bsp/xilinx-zynq: Flush TX-Buffer before initializing uart
Closes #4055
Closes #4056
5.1
2020-08-22 17:30:12 +10:00
Sebastian Huber
7661402bc2 confdefs: Fix cyclic dependency
Close #4060.
2020-08-21 20:02:35 +02:00
Chris Johns
5284e812e2 powerpc/io: The eieio() function clashes with FreeBSD. Change.
Closes #4021
2020-08-12 13:02:14 +10:00
Kinsey Moore
e95c00a79e posix: Only check shm_unlink obj_err if necessary
In the nominal case checked by spsysinit01, obj_err is unmodified if
_POSIX_Shm_Get_by_name returns non-NULL. In the case of shm_unlink, this means
an uninitialized value is passed into the switch and it appears tests using it
were passing by virtue of the stack having the right value on it in most cases.
This now checks obj_err only if _POSIX_Shm_Get_by_name returns NULL.

Close #4016
2020-08-11 07:48:19 -05:00
Chris Johns
95036a4591 shell: Only clear std handles when the shell task exits
Clearing the std file handles when the main loop exited crashes
telnetd as it reuses its session threads.

Closes #3859
2020-08-08 18:07:32 +10:00
Sebastian Huber
534f9dbe13 arm/atsam: Make interrupt server configurable
The external UART over SPI device SC16IS752 uses the interrupt server
for interrupt processing. The interrupt server is also heavily used by
libbsd. The interrupt processing for the SC16IS752 is time critical and
doesn't work if network traffic is processed at the same priority.
With #4033 custom interrupt servers are available. Change
atsam_sc16is752_spi_create() to support user-defined interrupt servers.
Introduced atsam_sc16is752_spi_config to cut down the argument count of
this function.

Close #4038.
2020-08-05 06:59:10 +02:00
Christian Mauderer
4a2ac5ef8d dosfs: Fix memory leak on failed mounts.
Currently if mount fails, a converter isn't destroyed. We have to take
care of two cases:

1. The user doesn't provide a converter.

In this case mounting a dosfs creates a default converter. This patch
makes sure that the converter is destroyed again if mount failes for
this case.

2. The user provides a converter.

In this case it's not sure that the dosfs specific routines are reached
because mount can fail before that. Therefore the user has to destroy
the converter himself again. This patch adds a documentation for that
and implements it in the media server.

Closes #4041.
2020-08-04 08:26:58 +02:00
Sebastian Huber
5eb0773159 rtems: Add rtems_interrupt_server_create()
Add rtems_interrupt_server_destroy().

Before this patch, the only way to create interrupt servers was
rtems_interrupt_server_initialize(). This function creates the default
interrupt server and in SMP configurations additional interrupt servers
for the additional processors. The interrupt server is heavily used by
libbsd. This includes the epoch based reclamation which performs time
consuming resource and memory deallocation work. This does not work well
with time critical services, for example an UART over SPI or I2C. One
approach to address this problem is to allow the application to create
custom interrupt servers with the right priority and task properties.
The interrupt server API accounted for this, however, it was not
implemented before this patch.

Close #4033.
2020-08-03 08:43:45 +02:00
Jan Sommer
849d741832 i386: Fix possible race condition on first context restore
Make sure that the esp is restored before the eflags register.

When the init task is initially restored, system interrupts are activated when the
eflags register is loaded.
If the esp register still points to an address in the interrupt stack
area (from early system initlization) the ISR might overwrite its own
stack.

Closes #4030
2020-07-29 11:39:35 +02:00