summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/sparc/leon3/startup (follow)
Commit message (Collapse)AuthorAgeFilesLines
* sparc: Add lazy floating point switchSebastian Huber2017-07-251-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The SPARC ABI is a bit special with respect to the floating point context. The complete floating point context is volatile. Thus, from an ABI point of view nothing needs to be saved and restored during a context switch. Instead the floating point context must be saved and restored during interrupt processing. Historically, the deferred floating point switch was used for SPARC and the complete floating point context is saved and restored during a context switch to the new floating point unit owner. This is a bit dangerous since post-switch actions (e.g. signal handlers) and context switch extensions may silently corrupt the floating point context. The floating point unit is disabled for interrupt handlers. Thus, in case an interrupt handler uses the floating point unit then this will result in a trap (INTERNAL_ERROR_ILLEGAL_USE_OF_FLOATING_POINT_UNIT). In uniprocessor configurations, a lazy floating point context switch is used. In case an active floating point thread is interrupted (PSR[EF] == 1) and a thread dispatch is carried out, then this thread is registered as the floating point owner. When a floating point owner is present during a context switch, the floating point unit is disabled for the heir thread (PSR[EF] == 0). The floating point disabled trap checks that the use of the floating point unit is allowed and saves/restores the floating point context on demand. Update #3077.
* INTERNAL_ERROR_ILLEGAL_USE_OF_FLOATING_POINT_UNITSebastian Huber2017-07-251-0/+4
| | | | | | Add new fatal error INTERNAL_ERROR_ILLEGAL_USE_OF_FLOATING_POINT_UNIT. Update #3077.
* bsps/sparc: Add leon3 BSP variantsDaniel Cederman2017-07-174-0/+60
| | | | | | | | | | | | | | | Rename NGMP to GR740 and add configs for UT699, UT700, and GR712RC The UT699 requires -mcpu=leon as it does not support the CAS instruction provided by -mcpu=leon3. It also requires -mfix-ut699 for errata fixes. UT700 and GR712RC requires the -mfix-ut700 and -mfix-gr712rc flags that have been recently added to GCC's master and 7-branch. Remove -msoft-float from the leon3 config to make the more common case of using the FPU the default. Update #3057.
* Add interrupt vector set/get affinitySebastian Huber2017-07-121-0/+41
| | | | Close #3071.
* leon: allow SMP boot from any CPUMartin Aberg2017-05-141-0/+5
|
* bsps/sparc: Fix warningsSebastian Huber2017-02-151-7/+6
|
* Rename is_internal to always_set_to_falseSebastian Huber2016-12-121-1/+1
| | | | Update #2825.
* sparc: Optimize _ISR_Handler()Sebastian Huber2016-11-281-0/+3
| | | | | | Use _Thread_Do_dispatch() instead of _Thread_Dispatch(). Restore the PSR[EF] state of the interrupted context via new system call syscall_irqdis_fp in case floating-point support is enabled.
* sparc: Optimize CPU counter supportSebastian Huber2016-06-221-5/+2
|
* sparc: Rework CPU counter supportSebastian Huber2016-06-212-51/+46
| | | | | Rework CPU counter support to enable use of the GR740 up-counter via %asr22 and %asr23.
* bsp/leon3: Fix LEON3_Cpu_Index initializationSebastian Huber2016-06-211-2/+12
|
* bsp/leon3: Use sysinit for bsp_debug_uart_init()Sebastian Huber2016-06-201-4/+0
|
* bsp/leon3: Use sysinit for amba_initialize()Sebastian Huber2016-06-201-5/+0
|
* drvmgr: Remove dupl bsp_driver_level_hook() declSebastian Huber2016-01-261-0/+2
|
* bsps/sparc: Use default bsp_pretasking_hook()Sebastian Huber2015-12-101-0/+2
| | | | | | Move content to bsp_predriver_hook() functions of the BSPs. Update #2408.
* leon3,ngmp: cpucounter initialization use proper namesDaniel Hellstrom2015-04-171-2/+3
| | | | | | To be merged with "leon3,ngmp: simplify cpucounter initialization" .. as an affect of previous patch, the next must be updated too.
* LEON3: implemented BSP DRVMGR startup initializationDaniel Hellstrom2015-04-171-1/+31
|
* leon3,ngmp: simplify cpucounter initializationDaniel Hellstrom2015-04-171-49/+6
| | | | | | | | | | | | | Remove support for using the second timer for time stamping. Instead the user can configure the system clock timer to a higher base clock frequency (lower the prescaler). This change does not affect the GR712RC or LEON4-N2X. The GR712RC does not have two GPTIMERs and the N2X uses the Interrupt Controller for time stamping. Bow that the AMBA initialization code exports the AMBA device, the frequency can be obtained without an additional AMBA PnP scanning.
* score: Add _CPU_SMP_Prepare_start_multitasking()Sebastian Huber2015-02-171-8/+5
| | | | Update #2268.
* smp: Add and use _SMP_Should_start_processor()Sebastian Huber2015-01-091-5/+1
|
* bsps/sparc: Fix trap table initializationSebastian Huber2014-12-051-1/+1
| | | | Fixes bug introduced with dff1803cfbec3775fff1b9c34cc707c05494dc3b.
* bsp/leon3: Fix trap table initializationSebastian Huber2014-12-041-1/+2
| | | | Fixes bug introduced with dff1803cfbec3775fff1b9c34cc707c05494dc3b.
* SPARC: optimize IRQ enable & disableDaniel Hellstrom2014-12-041-5/+7
| | | | | | | | | | | | | | | | * Coding style cleanups. * Use OS reserved trap 0x89 for IRQ Disable * Use OS reserved trap 0x8A for IRQ Enable * Add to SPARC CPU supplement documentation This will result in faster Disable/Enable code since the system trap handler does not need to decode which function the user wants. Besides the IRQ disable/enabled can now be inline which avoids the caller to take into account that o0-o7+g1-g4 registers are destroyed by trap handler. It was also possible to reduce the interrupt trap handler by five instructions due to this.
* bsps/sparc: Include right header fileSebastian Huber2014-10-231-1/+1
|
* bsp/leon3: Fix LEON3_mp_irq definitionSebastian Huber2014-10-232-5/+7
| | | | Provide it also if RTEMS_MULTIPROCESSING is defined.
* bsp/sparc: Ensure that data cache snooping is enabledDaniel Cederman2014-10-231-2/+12
| | | | Check that data cache snooping exists and is enabled on all cores.
* LEON3 SMP: support static interrupt affinityDaniel Hellstrom2014-10-091-1/+1
| | | | Changed LEON3_irq-mp to const also.
* LEON3: use CPU_Fatal_halt for haltDaniel Hellstrom2014-10-062-62/+87
| | | | | | | | | | | | | | By removing the bsp_reset() mechanism and instead relying on the CPU_Fatal_halt() routine SMP and single-core can halt by updating the _Internal_errors_What_happened structure and set the state to SYSTEM_STATE_TERMINATED (the generic way). This will be better for test scripts and debugger that can generically look into why the OS stopped. For SMP systems, only the fatal-reporting CPU waits until all other CPUs are powered down (with a time out of one clock tick). The reason why a fatal stop happend may be because CPU0 was soft-locked up so we can never trust that CPU0 should do the halt for us.
* SPARC: Fatal_halt use source and exit codesDaniel Hellstrom2014-10-061-0/+36
| | | | | | | | | | | | | | | The Fatal_halt handler now have two options, either halt as before or enter system error state to return to debugger or simulator. The exit-code is now also propagated to the debugger which is very useful for testing. The CPU_Fatal_halt handler was split up into two, since the only the LEON3 support the CPU power down. The LEON3 halt now uses the power-down instruction to save CPU power. This doesn't stop a potential watch-dog timer from expiring.
* bsp/leon3: Replace the define LEON3_MP_IRQ with a weakly linked variableDaniel Cederman2014-10-021-4/+9
| | | | | | | | The LEON3_MP_IRQ define is used to pick the IRQ to be used by the shared memory driver and for inter-processor interrupts. On some LEON3 systems, for example the GR712RC, the default value of 14 is not suitable. To make this value configurable from the application, it is replaced with a weakly linked variable that can be overridden from the application.
* score: Rename _BSP_Exception_frame_print()Sebastian Huber2014-09-111-1/+1
| | | | | Rename _BSP_Exception_frame_print() to _CPU_Exception_frame_print() to be in line with other CPU port functions.
* score: Define _CPU_Start_multitasking only for LEON SPARC, not SPARC in generalDaniel Cederman2014-09-011-1/+1
| | | | | Rename _BSP_Start_multitasking to _LEON3_Start_multitasking to show that it is LEON specific
* bsp/sparc: Flush icache before first time enabling interruptsDaniel Cederman2014-08-221-0/+9
| | | | | | | A secondary processor might miss changes done to the trap table if the instruction cache is not flushed. Once interrupts are enabled any other required cache flushes can be ordered via the cache manager.
* score/sparc: Add support for paravirtualizationChristian Mauderer2014-06-031-1/+1
| | | | | | | Guest systems in paravirtualization environments run usually in user mode. Thus it is not possible to directly access the PSR and TBR registers. Use functions instead of inline assembler to access these registers if RTEMS_PARAVIRT is defined.
* bsps/sparc: Change tabs to spaces.Daniel Cederman2014-05-271-2/+2
|
* bsps: Use bsp_start_on_secondary_processor()Sebastian Huber2014-05-121-2/+5
| | | | Use a standard function for startup on secondary processors.
* bsps: Use standard file name for BSP supportSebastian Huber2014-05-121-0/+79
|
* bsp/leon3: Delete unused functionSebastian Huber2014-05-121-5/+0
|
* bsps/sparc: Move flags to grlib headerChristian Mauderer2014-05-121-2/+2
| | | | This enables re-use for other BSPs
* rtems: Rename rtems_smp_get_current_processor()Sebastian Huber2014-04-111-1/+1
| | | | | | | Rename rtems_smp_get_current_processor() in rtems_get_current_processor(). Make rtems_get_current_processor() a function in uni-processor configurations to enable ABI compatibility with SMP configurations.
* rtems: Rename rtems_smp_get_processor_count()Sebastian Huber2014-04-111-1/+1
| | | | | | Rename rtems_smp_get_processor_count() in rtems_get_processor_count(). Make rtems_get_processor_count() a function in uni-processor configurations to enable ABI compatibility with SMP configurations.
* LEON3: UT699 and GR712 sleep-mode d-cache fixDaniel Cederman2014-03-311-5/+3
| | | | See errata of respective chip. Some code-cleanup as well.
* bsps/sparc: Make spurious trap handler function static.Daniel Cederman2014-03-211-1/+1
|
* Change all references of rtems.com to rtems.org.Chris Johns2014-03-218-8/+8
|
* bsp/leon3: Use interrupt timestamping counterSebastian Huber2014-03-101-28/+66
| | | | | Use the interrupt controller timestamping counter for the CPU counter if available since it runs with a high frequency.
* bsp/leon3: Add and use cache register functionsSebastian Huber2014-02-281-7/+2
|
* bsp/leon3: Use ambapp_freq_get() for CPU counterSebastian Huber2014-02-281-38/+20
|
* sparc: Fix CPU counter supportSebastian Huber2014-02-241-27/+73
| | | | | | | | The SPARC processors supported by RTEMS have no built-in CPU counter support. We have to use some hardware counter module for this purpose. The BSP must provide a 32-bit register which contains the current CPU counter value and a function for the difference calculation. It can use for example the GPTIMER instance used for the clock driver.
* bsp/leon3: Add bsp_reset() for SMP configurationSebastian Huber2014-02-211-0/+62
|
* bsp/leon3: Add leon3_power_down_loop()Sebastian Huber2014-02-211-0/+2
|