summaryrefslogtreecommitdiffstats
path: root/bsps/sparc/leon2/include/bsp.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-06-16bsps/sparc: Deprecate BSP-specific interrupt APISebastian Huber1-5/+5
Update #3269.
2023-06-16bsps: Remove uses of BSP-specific interrupt APISebastian Huber1-3/+12
Update #3269.
2021-06-24sparc: Simplify trap table initializationSebastian Huber1-6/+0
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-24bsps/sparc: Use rtems_interrupt_handler_install()Sebastian Huber1-0/+2
Avoid using set_vector() which depends on _ISR_Vector_table(). Prepare for a statically initialized trap table. Update #4458.
2021-06-24sparc: More reliable bad trap handlingSebastian Huber1-2/+0
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.
2019-03-08bsps: Adjust bsp.h Doxygen groupsSebastian Huber1-5/+8
Update #3706.
2019-03-04bsps: Adjust architecture Doxygen groupsSebastian Huber1-1/+1
- Use CamelCase as it is not used in our C code. Enables simple search and replace. - Prefix with "RTEMS" to aid deployment and integration. It aids searching and sorting. Update #3706.
2018-12-05bsp/leon2: Move printk() supportSebastian Huber1-0/+4
Avoid assert() in console_inbyte_nonblocking(). Do not poll forever in bsp_in_char(). This allows the caller to decide what to do if no character is available. This entangles some dependencies and fixes a spconfig02 test failure.
2018-01-25Remove make preinstallChris Johns1-0/+0
A speciality of the RTEMS build system was the make preinstall step. It copied header files from arbitrary locations into the build tree. The header files were included via the -Bsome/build/tree/path GCC command line option. This has at least seven problems: * The make preinstall step itself needs time and disk space. * Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error. * There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult. * The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit. * An introduction of a new build system is difficult. * Include paths specified by the -B option are system headers. This may suppress warnings. * The parallel build had sporadic failures on some hosts. This patch removes the make preinstall step. All installed header files are moved to dedicated include directories in the source tree. Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc, etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g. erc32, imx, qoriq, etc. The new cpukit include directories are: * cpukit/include * cpukit/score/cpu/@RTEMS_CPU@/include * cpukit/libnetworking The new BSP include directories are: * bsps/include * bsps/@RTEMS_CPU@/include * bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include There are build tree include directories for generated files. The include directory order favours the most general header file, e.g. it is not possible to override general header files via the include path order. The "bootstrap -p" option was removed. The new "bootstrap -H" option should be used to regenerate the "headers.am" files. Update #3254.
2018-01-02sparc: Remove BSP specifics from <pci/irq.h>Sebastian Huber1-7/+0
Update #3254. Update #3260. Update #3269.
2016-03-29sparc/leon2: Remove include of <rtems/console.h> from <bsp.h> and fix warningsJoel Sherrill1-1/+0
2016-03-27sparc/leon2/include/bsp.h: Do not include <rtems/clockdrv.h>Joel Sherrill1-1/+0
2015-12-10bsps: Call bsp_work_area_initialize() earlySebastian Huber1-7/+0
Call bsp_work_area_initialize() before bsp_start(). This allows bsp_start() to use malloc() etc. which is beneficial for systems with a plug-and-play hardware enumeration. Update #2408.
2015-07-16Most bsp.h: Switch to LIBBSP_@CPU@_@BSP_FAMILY@_H for guardJoel Sherrill1-2/+2
This was done by the following script run from libbsp: find * -name bsp.h | xargs -e grep -l "#ifndef.*_BSP_H" | while read b do echo $b cpu=`echo $b | cut -d'/' -f1 | tr '[:lower:]' '[:upper:]' ` bsp=`echo $b | cut -d'/' -f2 | tr '[:lower:]' '[:upper:]' ` g="LIBBSP_${cpu}_${bsp}_BSP_H" # echo $g sed -e "s/ifndef _BSP_H/ifndef ${g}/" \ -e "s/define _BSP_H/define ${g}/" \ -i $b done
2015-04-17LEON: added new drivers to the LEON2/LEON3 BSPsDaniel Hellstrom1-0/+1
Most drivers use the Driver Manager for device probing, they work on AMBA-over-PCI systems if PCI is big-endian. New APIs: * GPIO Library, interfaced to GRGPIO * GENIRQ, Generic interrupt service implementation helper New GRLIB Drivers: * ACTEL 1553 RT, user interface is similar to 1553 BRM driver * GR1553 (1553 BC, RT and BM core) * AHBSTAT (AHB error status core) * GRADCDAC (Core interfacing to ADC/DAC hardware) * GRGPIO (GPIO port accessed from GPIO Library) * MCTRL (Memory controller settings configuration) * GRETH (10/100/1000 Ethernet driver using Driver manager) * GRPWM (Pulse Width Modulation core) * SPICTRL (SPI master interface) * GRSPW_ROUTER (SpaceWire Router AMBA configuration interface) * GRCTM (SpaceCraft on-board Time Management core) * SPWCUC (Time distribution over SpaceWire) * GRTC (SpaceCraft up-link Tele core) * GRTM (SpaceCraft down-link Tele Metry core) GR712RC ASIC specific interfaces: * GRASCS * CANMUX (select between OCCAN and SATCAN) * SATCAN * SLINK
2015-04-17LEON: GPTIMER driver, Timer Library and System Clock for LEON3Daniel Hellstrom1-0/+1
With this patch the LEON family can access the GRLIB GPTIMER using the Timer library (TLIB). A System Clock driver instead of BSP/clock/ck_init.c is provided using the TLIB. The classic clock driver is split in two parts, clock driver and timer driver. The BSPs need only to fullfill the timer interface instead of the clock interface. Currently only LEON3 uses it. The LEON2 Timer is not ported to TLIB. The GPTIMER driver is implemented using the Driver Manager, so the System Clock Driver is at this point only suitable for LEON3 when the driver manager is initialized during BSP startup. When the DrvMgr is not initialized during startup the standard BSP/clock dirver is used. LEON2 sometimes also needs to access GPTIMER when a off-chip GRLIB AMBA systems is connected, for example AMBA-over-PCI.
2015-04-17LEON2: implemented AMBA Bus Driver for Driver ManagerDaniel Hellstrom1-0/+7
2015-04-17sparc BSPs: implemented libpci IRQ BSP supportDaniel Hellstrom1-0/+10
2015-02-11bsp/sparc: Move BSP_ISR_handler to a separate file and rename itDaniel Cederman1-0/+3
This allows it to be wrapped by another function at link-time and can be used to trace interrupts. If not placed in a separate file, the function pointer address used in BSP_shared_interrupt_init will be resolved at compile-time, and the function will not be wrappable.
2014-10-23bsps: Move extern "C" to not cover includesSebastian Huber1-4/+4
Some includes may use C++ and this conflicts if surrounded extern "C".
2014-10-19sparc/leon2/include/bsp.h: Fix warningsJoel Sherrill1-1/+7
2014-10-13sparc/leon2: Fix warningsJoel Sherrill1-1/+5
2014-10-06SPARC: add BSP specific error handlerDaniel Hellstrom1-0/+2
Instead of calling the system call TA instruction directly it is better paractise to isolate the trap implementation to the system call functions. BSP_fatal_exit() is added.
2014-10-06SPARC BSPs: remove BSP_fatal_return unreached codeDaniel Hellstrom1-2/+0
2014-05-27bsps/sparc: Change tabs to spaces.Daniel Cederman1-1/+1
2014-05-27bsps/sparc: Make lines in SPARC BSPs adhere to 80 character limit.Daniel Cederman1-2/+2
2014-03-21Change all references of rtems.com to rtems.org.Chris Johns1-1/+1
2013-12-09doxygen: refactored doxygen in libbsp to illustrate new rule setDaniel Ramirez1-3/+12
2013-12-07sparc shared: improve doxygenToma Radu1-3/+4
Add doxygen to the header files in sparc/shared/include directory.
2013-12-02leon2_doxygen_1Radu1-0/+7
2012-11-25bsps: Use RTEMS_BSP_CLEANUP_OPTIONSSebastian Huber1-2/+0
2012-11-15bsps: Interrupt initialization error is fatalSebastian Huber1-1/+1
2012-11-15score: Add RTEMS_FATAL_SOURCE_EXITSebastian Huber1-2/+3
Include <bsp/default-initial-extension.h> in all BSPs. Call rtems_fatal() with RTEMS_FATAL_SOURCE_EXIT as source and the exit() status code as fatal code in every bsp_cleanup(). Move previous bsp_cleanup() code into bsp_fatal_extension().
2012-11-13bsps/sparc: Add BSP_INITIAL_EXTENSION to <bsp.h>Sebastian Huber1-0/+2
The bsp_fatal_extension() will call BSP_fatal_return().
2012-10-25score: Work area initialization API changeSebastian Huber1-2/+2
The work areas (RTEMS work space and C program heap) will be initialized now in a separate step and are no longer part of rtems_initialize_data_structures(). Initialization is performed with tables of Heap_Area entries. This allows usage of scattered memory areas present on various small scale micro-controllers. The sbrk() support API changes also. The bsp_sbrk_init() must now deal with a minimum size for the first memory chunk to take the configured work space size into account.
2012-04-06SPARC BSPs: implemented shared-irq using libbsp/shared layerDaniel Hellstrom1-0/+74
The implementation use IRQ number instead of vector number since some IRQs does not have a unique vector, for example the extended interrupts all enter the same trap vector entry. Added support for the LEON3 extended interrupt controller when using the shared IRQ layer. ERC32 patches untested. Signed-off-by: Daniel Hellstrom <daniel@gaisler.com> Regenerate
2012-03-29SPARC: bsp_early_malloc() routine for startup memory allocationDaniel Hellstrom1-2/+7
If bsp_early_malloc() is called early during boot room will be allocated after BSS END. If the function is called after boot is will call malloc() instead. The returned memory is not freeable and always 8-byte aligned. If the bsp_early_malloc() isn't called the function is not dragged in and the workspace will be unmodified in size. Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-03-27GRETH: added support for non-snooping GRETH 10/100 systemsDaniel Hellstrom1-0/+4
When data cache snooping is not present the cache needs flushing, the SPARC LEON CPUs does not have to ability to flush individual cache rows and flushing all cache is expensive. Instead the LDA instruction is used to force cache miss on individual loads during the IP-align copy operation required anyway. GRETH GBIT non-snooping systems are still unsupported, since it use zero-copy (can deal with unaligned DMA). Let the bsp.h select if the GRETH driver is supported. Currently only the LEON2/LEON3 platforms BSPs builds the driver. Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-03-21SMC91111: ERC32 was never supported by driverDaniel Hellstrom1-0/+2
Moved the intelligence whether the driver is supported or not completely to the BSP, now that bsp.h is included (even though it is a driver... hmm). The ERC32 was never supported, so HAS_SMC91111 is not added to erc32/include/bsp.h. Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2011-04-252011-04-25 Jennifer Averett <jennifer.averett@OARcorp.com>Joel Sherrill1-8/+0
PR 1783/bsps * include/bsp.h: Remove dead prototypes of Clock_delay() and delay(). Neither had bodies.
2009-11-29Whitespace removal.Ralf Corsepius1-5/+5
2009-08-192009-08-19 Joel Sherrill <joel.sherrill@OARcorp.com>Joel Sherrill1-12/+14
* Makefile.am, include/bsp.h, startup/setvec.c: Split idle method into its own file. Properly note to confdefs.h that this BSP has its own idle thread. * startup/bspidle.c: New file.
2008-09-102008-09-10 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-4/+0
* include/bsp.h: Review of all bsp_cleanup() implementations. In this phase, all prototypes were removed from bsp.h and empty implementations were removed and made to use the shared stub.
2007-12-112007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com>Joel Sherrill1-2/+0
* clock/ckinit.c, include/bsp.h: Eliminate copies of the Configuration Table. Use the RTEMS provided accessor macros to obtain configuration fields.
2007-12-042007-12-04 Joel Sherrill <joel.sherrill@OARcorp.com>Joel Sherrill1-3/+0
* include/bsp.h: Move interrupt_stack_size field from CPU Table to Configuration Table. Eliminate CPU Table from all ports. Delete references to CPU Table in all forms.
2007-09-062007-09-05 Daniel Hellstrom <daniel@gaisler.com>Joel Sherrill1-0/+2
* include/bsp.h: LEON2 and LEON3 Data cache snooping detection on startup, for drivers. (LEON2,3 are configurable processors, they can be with or without DCache snooping. Caches without snooping needs the drivers to flush cache or use the sparc instruction lda to force cache miss...)
2007-09-052007-09-05 Daniel Hellstrom <daniel@gaisler.com>Joel Sherrill1-0/+3
* include/bsp.h: This patch prepares bsp.h so that shared code (new drivers) can easily have small small sections of BSP specific code.
2007-05-092007-05-09 Joel Sherrill <joel.sherrill@OARcorp.com>Joel Sherrill1-2/+0
* console/debugputs.c, include/bsp.h, leon_smc91111/leon_smc91111.c, startup/spurious.c: Remove debug print methods that are redundant with prntk and replace their use with printk.
2007-03-102007-03-10 Joel Sherrill <joel@OARcorp.com>Joel Sherrill1-11/+0
PR 1227/bsps * include/bsp.h: Remove MAX_LONG_TEST_DURATION and MAX_SHORT_TEST_DURATION. They are obsolete and unused.
2006-01-09Backport from rtems-4-6-branch.Ralf Corsepius1-22/+24