summaryrefslogtreecommitdiffstats
path: root/bsps/sparc (follow)
Commit message (Collapse)AuthorAgeFilesLines
* bsp/leon3: Remove <leon.h> include form <bsp.h>Sebastian Huber2021-07-197-3/+9
| | | | | The <leon.h> header file contains a lot of implementation details. Hide them from <bsp.h>.
* bsps/sparc: Improve interrupt affinity supportSebastian Huber2021-07-094-62/+138
| | | | | | | | Fully support the interrupt extension API to set/get the interrupt affinity. Remove LEON3_irq_to_cpu which defined the interrupt to processor mapping in a BSP-specific way. Update #3269.
* bsp/leon3: Move bsp_interrupt_is_valid_vector()Sebastian Huber2021-07-012-16/+14
| | | | | This function is not performance critical. There is no need to implement it inline.
* bsp/leon3: Fix bsp_interrupt_is_valid_vector()Sebastian Huber2021-07-011-3/+7
| | | | | | | | | | The fix to address CID 1399742 (NO_EFFECT) in commit f8b6359415404540864f809cbcffb8c2200261e1 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.
* sparc: Simplify trap table initializationSebastian Huber2021-06-2410-116/+64
| | | | | | | | | | | | | | | 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.
* bsps/sparc: Use rtems_interrupt_handler_install()Sebastian Huber2021-06-2410-31/+98
| | | | | | | Avoid using set_vector() which depends on _ISR_Vector_table(). Prepare for a statically initialized trap table. Update #4458.
* sparc: More reliable bad trap handlingSebastian Huber2021-06-2410-578/+2
| | | | | | | | | | | | | 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.
* bsps/sparc: Add a symbol for each trap table entrySebastian Huber2021-06-241-95/+264
| | | | | | | | 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.
* bsps/irq: Remove BSP_INTERRUPT_VECTOR_MAXSebastian Huber2021-06-243-3/+0
| | | | | | This define is no longer used. Update #3269.
* bsps/irq: Add BSP_INTERRUPT_VECTOR_COUNTSebastian Huber2021-06-243-0/+3
| | | | | | | | | | | | | 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.
* bsps/irq: Remove BSP_INTERRUPT_VECTOR_MINSebastian Huber2021-06-243-3/+0
| | | | | | | | | | 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.
* bsp/leon3: Fix compile errorSebastian Huber2021-06-231-1/+1
| | | | Fix compile error with RTEMS_DRVMGR_STARTUP = True.
* grlib: Add apbuart_outbyte_wait()Sebastian Huber2021-06-171-1/+2
|
* grlib: Remove NL -> CR in apbuart_outbyte_polled()Sebastian Huber2021-06-171-1/+1
| | | | This is already done in rtems_putc().
* bsps/leon3: Auto initialization for printk()Sebastian Huber2021-06-171-28/+14
| | | | | | 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.
* grlib: Add ambapp_plb()Sebastian Huber2021-06-178-39/+60
| | | | | Replace the global variable ambapp_plb with a function to allow an automatic on demand initialization.
* bsps/sparc: Simplify memory initializationSebastian Huber2021-06-102-34/+39
| | | | | | | | | | | | | 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.
* bsps/sparc: Simplify stack initializationSebastian Huber2021-06-101-28/+21
| | | | | | 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.
* bsps/sparc: Unify stack initializationSebastian Huber2021-06-101-8/+6
| | | | | Initialize the stacks in start.S in one place and identical to _CPU_Context_Initialize().
* bsps/sparc: Remove support to load data sectionSebastian Huber2021-06-101-32/+4
| | | | | | | | | | | | | | | | | | 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.
* bsps/sparc: Remove unused __bsp_mem_init symbolSebastian Huber2021-06-101-1/+1
|
* bsps: Support RTEMS_NOINIT in linkcmdsSebastian Huber2021-05-021-0/+3
| | | | Update #3866.
* bsps: Remove networking driversVijay Kumar Banerjee2021-04-076-478/+0
| | | | Update #3850
* leon: restart and load timer counter at initializationDaniel Hellstrom2021-03-111-1/+4
| | | | | | | | | | | | Without this smp05 and smpthreadlife01 tests may fail depending on how the boot loader initialized the GPTIMER. Before the time counter stopped counting when reaching zero, but tests could work since it could take 2^32 us before stopping. The timer driver will potentially overwrite this, but it happens later due to the initialization order having RTEMS_SYSINIT_CPU_COUNTER very early.
* leon3: avoid dependency on apbuart/timer driverDaniel Hellstrom2021-03-112-12/+28
| | | | | | | 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.
* gr_cpci_gr740.c: Unchecked return value from library (CID #1437630)Ryan Long2021-03-051-1/+3
| | | | | | CID 1437630: Unchecked return value from library in gr_cpci_gr740_init1(). Closes #4290
* gr_leon4_n2x.c: Fix Unchecked return value from library (CID #1399767)Ryan Long2021-03-051-1/+3
| | | | | | CID 1399767: Unchecked return value error from library in gr_cpci_leon4_n2x_init1(). Closes #4285
* bsp/leon3: Improve printk() supportSebastian Huber2021-02-011-40/+52
| | | | | | | | Use the idle stack to buffer early uses of printk(). Print the buffered characters during initialization when the UART is available and before the idle stack is used normally. This fix relates to a Coverity issue (PW.SET_BUT_NOT_USED).
* bsp/leon3: Fix incompatible function typesSebastian Huber2021-02-011-4/+6
| | | | This fix relates to a Coverity issue (PW.INCOMPATIBLE_PARAM).
* bsp/leon3: Fix bsp_fatal_extension) indentationSebastian Huber2021-02-011-15/+13
| | | | | | Remove superfluous include. Fix comment formatting. This fix relates to a Coverity issue (NESTING_INDENT_MISMATCH).
* bsp/leon3: Simplify bsp_interrupt_is_valid_vector()Sebastian Huber2021-01-281-5/+5
| | | | | | | There is not need to check that vector >= BSP_INTERRUPT_VECTOR_MIN since BSP_INTERRUPT_VECTOR_MIN is zero and vector is unsigned. This fix relates to CID 1399742 (NO_EFFECT).
* bsps: Replace bsp_specs with an empty fileSebastian Huber2021-01-283-27/+0
| | | | | | | This fixes an issue with the latest tool chain which adds the default linker script in the endfile specification. Update #3250.
* sparc: Add SPARC_INTERRUPT_SOURCE_TO_TRAP()Sebastian Huber2020-11-063-3/+3
| | | | Update #4171.
* sparc: Add SPARC_INTERRUPT_TRAP_TO_SOURCE()Sebastian Huber2020-11-066-6/+6
| | | | Update #4171.
* sparc: Add SPARC_IS_INTERRUPT_TRAP()Sebastian Huber2020-11-066-27/+12
| | | | Update #4171.
* bsp/leon3: Updat due to API changesSebastian Huber2020-10-261-1/+1
|
* grlib: Add ambapp_common_info to derived typesSebastian Huber2020-10-162-2/+2
| | | | This avoids a cast in DEV_TO_COMMON().
* rtems: Improve RTEMS_NO_RETURN attributeSebastian Huber2020-10-101-1/+1
| | | | | | | | | | | Provide RTEMS_NO_RETURN also in case RTEMS_DEBUG is defined to prevent errors like this: error: no return statement in function returning non-void [-Werror=return-type] Use C11 and C++11 standard means to declare a no-return function. Close #4122.
* grlib: Add and use irqmp_has_timestamp()Sebastian Huber2020-10-103-10/+3
| | | | | | | Replace leon3_irqmp_has_timestamp() with irqmp_has_timestamp() and move it to grlib.h. Close #4128.
* bsps: Always install IPI in SMP configsSebastian Huber2020-08-312-14/+6
| | | | | | | The inter-processor interrupt (IPI) may be used to process per-CPU jobs. See for example the blocked handler in T_interrupt_test(). Update #3199.
* bsps/leon3: Remove superfluous includesSebastian Huber2020-08-202-8/+2
|
* testsuite: Add expected-fail to erc32, leon2, and leon3 BSPsChris Johns2020-05-064-0/+28
| | | | Updates #2962
* imfs: Replace devfs with an IMFS specializationSebastian Huber2020-03-091-3/+0
| | | | | | | | | | | | | | | | Add a simplified path evaluation function IMFS_eval_path_devfs() for a device only IMFS configuration. The code size can be further reduced by the application if it disables the support for legacy IO drivers via: #define CONFIGURE_IMFS_DISABLE_MKNOD #define CONFIGURE_IMFS_DISABLE_MKNOD_DEVICE Obsolete CONFIGURE_MAXIMUM_DEVICES. Remove BSP_MAXIMUM_DEVICES. Update #3894. Update #3898.
* Use RTEMS_SYSINIT_ORDER_LAST_BUT_5Sebastian Huber2020-02-042-2/+2
| | | | | | | | Use RTEMS_SYSINIT_ORDER_LAST_BUT_5 instead of RTEMS_SYSINIT_ORDER_LAST to allow applications and support functions to place system initialization handlers behind the standard handlers. Update #3838.
* bsps: Rework work area initializationSebastian Huber2020-02-041-11/+25
| | | | | | | | | | | | | | | | | | | | The work area initialization was done by the BSP through bsp_work_area_initialize(). This approach predated the system initialization through the system initialization linker set. The workspace and C program heap were unconditionally initialized. The aim is to support RTEMS application configurations which do not need the workspace and C program heap. In these configurations, the workspace and C prgram heap should not get initialized. Change all bsp_work_area_initialize() to implement _Memory_Get() instead. Move the dirty memory, sbrk(), per-CPU data, workspace, and malloc() heap initialization into separate system initialization steps. This makes it also easier to test the individual initialization steps. This change adds a dependency to _Heap_Extend() to all BSPs. This dependency will be removed in a follow up change. Update #3838.
* bsps: Remove uses of BSP_GET_WORK_AREA_DEBUGSebastian Huber2020-02-041-28/+0
| | | | | | | | | The code covered by BSP_GET_WORK_AREA_DEBUG was basically dead code since there was no normal way to activate it (e.g. via a BSP configuration option). A follow up patch will bring back this feature through a CONFIGURE_VERBOSE_SYSTEM_INITIALIZATION configuration option. Update #3838.
* bsp/erc32: Improve pseudo-SMP supportSebastian Huber2019-10-011-0/+84
| | | | | Add support for _SMP_Send_message() to the own processor. This is required by the smpmulticast01 test program.
* rtems: Add rtems_scheduler_get_processor_maximum()Sebastian Huber2019-04-093-4/+4
| | | | | | | | | | | 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.
* rtems: Add rtems_scheduler_get_processor()Sebastian Huber2019-04-091-1/+1
| | | | | | | | | | | 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.
* erc32/start/setvec.c: Fix warningJoel Sherrill2019-03-251-3/+8
|