Commit Graph

1052 Commits

Author SHA1 Message Date
Sebastian Huber
b28c0c6690 bsp/raspberrypi: Fix <bsp/irq.h> header guard 2021-07-07 14:49:37 +02:00
Sebastian Huber
1b56073157 bsp/imx: Fix pointer from integer warning 2021-07-07 09:53:39 +02:00
Christian Mauderer
0d3453a47e bsps/imxrt: Simplify linkcmds and make it flexible
Calling the memory FLASH and EXTRAM instead of FLEXSPI and SDRAM makes
it simpler to support other types of external RAM. This patch also
removes some of the calculations and improves names and documentation to
avoid pitfalls. It removes a unnecessary memory definition.

Update #4180
2021-07-02 13:49:47 +02:00
Christian Mauderer
95a38dd3f1 bsps/imxrt: Allow different ARM PLL setting
Update #4180
2021-07-02 13:49:47 +02:00
Gedare Bloom
24e8ddca5c m68k/uC5282: linkcmds KEEP and SORT sections
Fixes a problem with bad epilog code in _fini and to keep sections
necessary with the -ffunction/data-sections.
2021-07-01 13:01:30 -06:00
Sebastian Huber
cb7d26845e bsp/leon3: Move bsp_interrupt_is_valid_vector()
This function is not performance critical.  There is no need to
implement it inline.
2021-07-01 16:43:35 +02:00
Sebastian Huber
52fb74ca65 bsp/leon3: Fix bsp_interrupt_is_valid_vector()
The fix to address CID 1399742 (NO_EFFECT) in commit
f8b6359415 introduced a bug since
LEON3_IrqCtrl_EIrq == -1 in case no extended interrupts are supported by
the interrupt controller.  Fix this by checking for
LEON3_IrqCtrl_EIrq > 0.

In addition, interrupt number 0 is reserved and should not be used.
2021-07-01 16:43:35 +02:00
Sebastian Huber
f2b0877642 bsps: Fix GICv3 support for AArch32
The GICv3 support is shared between AArch32 and AArch64.  For AArch32,
the new AARCH64_IS_NONSECURE is never defined.  Use ARM_MULTILIB_ARCH_V4
instead.

This issue was introduced by 76c6caad52.

There is still a change in bsp_interrupt_vector_enable() for AArch32
compared to the version before 76c6caad52.
2021-06-30 16:28:52 +02:00
Kinsey Moore
c18b041b77 bsps/cadence-spi: Fix moduleid offset
Move the moduleid register to the correct offset according to Cadence IP
documentation.
2021-06-29 15:34:16 -05:00
Kinsey Moore
26d61c8670 bsps/zynq-uart: Make post baud change kick global
The existing fix for the ZynqMP UART hardware bug only caught the vast
majority of instances where it could occur. To fully fix the data
corruption, this fix must be applied after every baud rate change. This
makes the logic reset and kick apply in any locations where the baud
rate could be changed.
2021-06-29 11:42:06 -05:00
Gedare Bloom
17a9103c53 aarch64: whitespace fixes in start.S 2021-06-24 12:55:29 -06:00
Gedare Bloom
93088fb835 bsps/aarch64: replace boot options with asm switch code 2021-06-24 12:55:23 -06:00
Gedare Bloom
76c6caad52 bsps/aarch64: add non-secure mode and versal support 2021-06-24 09:37:31 -06:00
Gedare Bloom
207612957e bsps/aarch64: add physical secure timer 2021-06-24 09:37:31 -06:00
Gedare Bloom
bcad0aaee6 bsps/aarch64: add mnemonic for ICC_IGRPEN1_EL3 2021-06-24 09:37:31 -06:00
Gedare Bloom
fedd279f80 bsps/dev/irq: make icspicfgr an indexable array 2021-06-24 09:37:31 -06:00
Kinsey Moore
e613068ee6 aarch64: add support to drop EL3 to EL2 2021-06-24 09:37:31 -06:00
Gedare Bloom
37059626ac aarch64/xilinx-versal: new BSPs for qemu and vck190 2021-06-24 09:37:31 -06:00
Sebastian Huber
be96cb4345 sparc: Simplify trap table initialization
Move _ISR_Handler() to a separate file since it is now only used if a handler
is installed by _CPU_ISR_install_raw_handler().

Statically initialize the traps for external interrupts to use the new
_SPARC_Interrupt_trap() which directly dispatches the interrupt handlers
installed by rtems_interrupt_handler_install() via the BSP-provided
_SPARC_Interrupt_dispatch().

Since the trap table is now fully statically initialized, there is no longer a
dependency on the Cache Manager in the default configuration.

Update #4458.
2021-06-24 11:36:28 +02:00
Sebastian Huber
005c79beb9 bsps: bsp_interrupt_handler_dispatch_unchecked()
Add bsp_interrupt_handler_dispatch_unchecked() as an alternative to
bsp_interrupt_handler_dispatch().  It may be used if the caller can ensure that
the vector number is valid.
2021-06-24 11:36:28 +02:00
Sebastian Huber
5c30e3d376 bsps/sparc: Use rtems_interrupt_handler_install()
Avoid using set_vector() which depends on _ISR_Vector_table().  Prepare for a
statically initialized trap table.

Update #4458.
2021-06-24 11:36:28 +02:00
Sebastian Huber
d73e657e06 sparc: More reliable bad trap handling
Statically initialize the trap table in start.S to jump to _SPARC_Bad_trap()
for all unexpected traps.  This enables a proper RTEMS fatal error handling
right from the start.  Do not rely on the stack and register settings which
caused an unexpected trap.  Use the ISR stack of the processor to do the fatal
error handling.  Save the full context which caused the trap.  Fatal error
handler may use it for error logging.

Unify the _CPU_Exception_frame_print() implementations and move it to cpukit.

Update #4459.
2021-06-24 11:36:28 +02:00
Sebastian Huber
7a140e2ed5 bsps/sparc: Add a symbol for each trap table entry
This makes it easier to review start.o and set break points to trap table
entries.  This change was checked by inspecting the trap table in start.o with
objdump.

Update #4458.
2021-06-24 11:36:28 +02:00
Sebastian Huber
6b7a38589a bsp/atsam: Fix BSP_INTERRUPT_VECTOR_COUNT
Fix an off by one error.

Update #3269.
2021-06-24 11:36:27 +02:00
Sebastian Huber
fdf2ee773a bsps/irq: Default BSP_INTERRUPT_VECTOR_COUNT == 0
Change the default value of BSP_INTERRUPT_VECTOR_COUNT so that no interrupt
vectors are supported and all related directives return RTEMS_INVALID_ID.

Update #3269.
2021-06-24 11:36:27 +02:00
Sebastian Huber
94cf67ca66 bsps/irq: Remove BSP_INTERRUPT_VECTOR_MAX
This define is no longer used.

Update #3269.
2021-06-24 11:36:27 +02:00
Sebastian Huber
3fee662093 bsps/irq: Use BSP_INTERRUPT_VECTOR_COUNT
Use BSP_INTERRUPT_VECTOR_COUNT instead of BSP_INTERRUPT_VECTOR_MAX.

Update #3269.
2021-06-24 11:36:25 +02:00
Sebastian Huber
049e2b64e1 bsps/irq: Remove BSP_INTERRUPT_VECTOR_NUMBER
Replace it with BSP_INTERRUPT_VECTOR_COUNT.

Update #3269.
2021-06-24 11:35:49 +02:00
Sebastian Huber
cd5573c09d bsps/irq: Add BSP_INTERRUPT_VECTOR_COUNT
Assert BSP_INTERRUPT_VECTOR_MAX + 1 == BSP_INTERRUPT_VECTOR_COUNT.

After building all BSPs with this patch, BSP_INTERRUPT_VECTOR_MAX can be
removed and replaced by BSP_INTERRUPT_VECTOR_COUNT.  The
BSP_INTERRUPT_VECTOR_COUNT allows a default implementation which supports no
interrupt vector at all.  Using COUNT instead of MAX may avoid some
interpretation issues, for example is the maximum value a valid vector number
or not.

Update #3269.
2021-06-24 11:35:49 +02:00
Sebastian Huber
af73b7b64b bsps/irq: Remove BSP_INTERRUPT_VECTOR_MIN
Remove BSP_INTERRUPT_VECTOR_MIN and unconditionally let interrupt vector
numbers start with zero.

The BSP_INTERRUPT_VECTOR_MIN == 0 invariant was tested by the previous commit
and building all BSPs.

Update #3269.
2021-06-24 11:35:49 +02:00
Sebastian Huber
f3acb8bf03 bsps/irq: Assert BSP_INTERRUPT_VECTOR_MIN == 0
After building all BSPs with this patch, this BSP-specific define can be
removed to simplify the implementation.

Update #3269.
2021-06-24 11:35:49 +02:00
Sebastian Huber
5210c7c219 bsp/generic_or1k: Remove incomplete IRQ support
Update #3269.
2021-06-24 11:35:49 +02:00
Sebastian Huber
4146d3948d bsp/genmcf548x: Change BSP_INTERRUPT_VECTOR_MIN
This BSP uses a customized implementation of the interrupt extension API.  It
was the only BSP which defined BSP_INTERRUPT_VECTOR_MIN to a value other than
zero.  Define it to zero and use a custom bsp_interrupt_is_valid_vector()
function instead.

Update #3269.
2021-06-24 11:35:03 +02:00
Sebastian Huber
61d0be7214 bsps/irq: Remove BSP_INTERRUPT_NO_HEAP_USAGE
Remove the support for BSP_INTERRUPT_NO_HEAP_USAGE.  This was only used
by one BSP and provides no real benefit.

Update #3269.
2021-06-24 08:27:21 +02:00
Sebastian Huber
499a89b11d grlib: Register system console as /dev/console
Close #4461.
2021-06-24 08:27:21 +02:00
Vijay Kumar Banerjee
8416e7c322 bsps/powerpc, bsps/shared: Move remaining legacy networking header files 2021-06-23 13:20:38 -06:00
Sebastian Huber
a0a8262fd6 bsp/leon3: Fix compile error
Fix compile error with RTEMS_DRVMGR_STARTUP = True.
2021-06-23 08:12:49 +02:00
Jan Sommer
93f9645595 bsps/i386: Update calibration of TSC to be more accurate
Closes #4455
2021-06-21 09:46:27 +02:00
Sebastian Huber
3ee19b7ac3 bsps/irq: Change license to BSD-2-Clause
Change license to BSD-2-Clause according to file history and
re-licensing agreement.

Update #3053.
2021-06-17 17:24:32 +02:00
Sebastian Huber
11cf6ae3e2 grlib: Simplify apbuart_inbyte_nonblocking() 2021-06-17 12:58:33 +02:00
Sebastian Huber
3af1e5e735 grlib: Fix apbuart_outbyte_polled() prototype
Callers usually want to output a character.
2021-06-17 12:58:33 +02:00
Sebastian Huber
af69a8693b grlib: Add apbuart_outbyte_wait() 2021-06-17 12:58:33 +02:00
Sebastian Huber
85febe7b10 grlib: Remove NL -> CR in apbuart_outbyte_polled()
This is already done in rtems_putc().
2021-06-17 12:58:33 +02:00
Sebastian Huber
634a2c0616 bsps/leon3: Auto initialization for printk()
Get rid of the hack to output into the idle stack during the early system
initialization.  This fixes also a couple of test program failures which fail
due to missing output.
2021-06-17 12:58:33 +02:00
Sebastian Huber
2c07f24af2 grlib: Add ambapp_plb()
Replace the global variable ambapp_plb with a function to allow an automatic on
demand initialization.
2021-06-17 12:58:33 +02:00
Sebastian Huber
c4c8d3fd50 grlib: Customizable allocation in ambapp_scan()
Make the memory allocations in ambapp_scan() customizable via the new struct
ambapp_context parameter which generalizes the memory copy handler.
2021-06-17 12:58:33 +02:00
Sebastian Huber
93afcff7b5 bsps/sparc: Simplify memory initialization
Directly initialize the memory in the start sequence defined by start.S
instead of using a system initialization handler.  This avoids using the
global variable rdb_start which used a memory location which was shared
with _ERC32_MEC_Timer_Control_Mirror.  This change makes it possible to
use _Memory_Allocate() even before the system initialization is started.

Change license to BSD-2-Clause according to file history and
re-licensing agreement.

Update #3053.
2021-06-10 07:59:39 +02:00
Sebastian Huber
ef5a53bcf8 bsps/sparc: Simplify stack initialization
Initialize the stacks for all processors in one place.  Do not rely on
Per_CPU_Control::interrupt_stack_high and directly use the statically
allocated interrupt stack area.
2021-06-10 07:58:57 +02:00
Sebastian Huber
b823c9843d bsps/sparc: Unify stack initialization
Initialize the stacks in start.S in one place and identical to
_CPU_Context_Initialize().
2021-06-10 07:53:04 +02:00
Sebastian Huber
07f6a61d03 bsps/sparc: Remove support to load data section
Remove the support to load the data section and rely on the boot loader.  The
code is an artifact from the old erc32 days, when we would boot and execute
from ROM and the .data had to be copied over to RAM.  With leon1/2/3, this is
not used anymore as a boot loader is made from the RAM image using a custom
tool (mkprom).

In SMP configurations, this support was also broken since LEON3_Boot_Cpu
(in the data section due to the -1 initialization value) was used quite
early in the start sequence.

If the data copy is really necessary, then an application can still add this
step as a very early system initialization step, since boot_card() and the
system initialization loop does not use initialized read-write data (only
read-only and BSS data).  However, the SMP startup would still not work in this
case.  A boot loader is a better place to load the sections.
2021-06-10 07:50:00 +02:00