summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/arm (follow)
Commit message (Collapse)AuthorAgeFilesLines
* bsps/arm: Fix bit field offset in GIC supportSebastian Huber2017-05-111-1/+1
| | | | Close #3002.
* arm/tms570: document BSP setup with included hardware initialization.Pavel Pisa2016-10-021-22/+100
|
* arm/tms570: update bootstrap generated preinstall.amPavel Pisa2016-10-021-0/+13
|
* arm/tms570: include TMS570_USE_HWINIT_STARTUP option to select bare metal ↵Pavel Pisa2016-10-022-0/+26
| | | | startup and selftest.
* arm/tms570: include hardware initialization and selftest based on Ti ↵Pavel Pisa2016-10-0216-0/+3519
| | | | | | | | | | | | | | | | | | | | HalCoGen generated files. The configuration is specific for TMS570LS3137 based HDK. Pins configuration can be easily changed in rtems/c/src/lib/libbsp/arm/tms570/hwinit/init_pinmux.c file. The list tms570_selftest_par_list in the file rtems/c/src/lib/libbsp/arm/tms570/hwinit/bspstarthooks-hwinit.c specifies peripherals which health status is examined by parity self-test at BSP start-up. It can be easily modified for other TMS570 family members variants same as the selection of other tests in bspstarthooks-hwinit.c.
* arm/tms570: define base addresses of all TMS570LS3137 SPI interfaces.Pavel Pisa2016-10-021-1/+5
| | | | | | | | Generated header file ti_herc/reg_spi.h contains complete registers and fields set for Ti MibSPI peripheral. Care has to be taken that only TMS570_SPI1, TMS570_SPI3 and TMS570_SPI5 are of this complete multibuffer type. TMS570_SPI2 and TMS570_SPI4 have substantial part of registers removed but else they are compatible.
* bsp/tms570: ensure that change of SCI baudrate is not applied in the middle ↵Pavel Pisa2016-10-021-2/+23
| | | | | | | | | | | | | | | | | | | of character Tx. The rtems_monitor_task() setups/updates termios attributes of the opened TTY and if there is ongoing some other output it leads to the stuck. It would be better to use some termios API function which would call drainOutput() in rtems/cpukit/libcsupport/src/termios.c. But functionality is not accessible outside of core termios implementation. The loop waiting for last character to be sent has to be there anyway because hardware does not provide Tx machine/shift register empty interrupt. Closes #2794
* bsp/tms570: regenerate preinstall makefile by bootstrap -p.Pavel Pisa2016-10-021-0/+8
|
* bsp/tms570: include complete peripheral initialization to SCI driver.Pavel Pisa2016-10-021-2/+36
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* bsp/tms570: update pinmux to provide support for initialization lists and ↵Pavel Pisa2016-10-024-69/+196
| | | | clear of alt outputs.
* bsp/tms570: include package balls and PINMMR registers mapping for ↵Pavel Pisa2016-10-022-0/+700
| | | | TMS570LS3135ZWT chip.
* bsps/arm: Export bsp_start_hook_0_done symbol from ARM start.S.Pavel Pisa2016-10-021-0/+1
| | | | | | | | The symbol can be used by bsp_start_hook_0 when complete RAM memory is initialization and overwritten during BSP self-test. The test overwrites even memory used to store return address / link register and regular resturn from bsp_start_hook_0 is not possible then.
* arm/raspberrypi: minimized mainline patch move MMU in front of application ↵Pavel Pisa2016-10-022-3/+4
| | | | | | | | | | | | | | | | image and correct RPi2 boot on 4.11 branch. This is minimized version of mainline patch arm/raspberrypi: move MMU in front of application image to respect variable memory size. plus correction which has been part of other mainline patches. This is end of series which allows 4.11 to boot on Raspberry Pi. Closes #2782 Closes #2783
* arm/raspberrypi: change interrupt dispatch and enable to generic vector id ↵Pavel Pisa2016-10-022-43/+94
| | | | | | | | | | based approach. Using conditional branches to find bits is extremely inefficient and for asynchronous delivery of different interrupt sources lead to total confusion of branch prediction unit. Updates #2783
* arm/raspberrypi: remove duplicate setup of IRQ handler in the main ARM ↵Pavel Pisa2016-10-022-21/+0
| | | | | | | | | | | | | | | | | | | | | | | | | exception table. Exception table setup is processed by common CPU architecture support. For ARM architecture, it can be found in the file rtems/c/src/lib/libbsp/arm/shared/start/start.S and ends by bsp_vector_table_copy_done label. The actual tabel content can be found at bsp_start_vector_table_begin For ARMv7-A and even other variant with hypervisor mode support, it is even not necessary to copy table to address 0 at all because CP15 register can be used to specify alternative table start address arm_cp15_set_vector_base_address(&)bsp_start_vector_table_begin; ARMv7-M have register to set exception table base as well. Updates #2783
* arm/raspberrypi: ensure that correct RPI_PERIPHERAL_BASE is provided by ↵Pavel Pisa2016-10-022-0/+2
| | | | | | | | | | | | | raspberrypi.h If the raspberrypi.h has been included without preceding inclussion of bsp.h then BSP_IS_RPI2 has not been set for Raspberry Pi 2 BSP variant and bad things happen later. The patch includes bspopts.h by raspberrypi.h and even includes bsp.h in critical peripherals support. Updates #2783
* arm/raspberrypi: reorder and update MMU config table to nor force RW section ↵Pavel Pisa2016-10-021-9/+22
| | | | | | | | | | | later to RO. Enable even the first megabyte of SDRAM to be cache-able after problems with stale cache content has been resolved by previous commit. Because major part of application usually fits to the first megabyte this speedups test dhrystone application by factor 40. Updates #2783
* arm/raspberrypi: Enable HYP to SVC switch for this BSP.Pavel Pisa2016-10-022-0/+7
| | | | | | | This support is required when newer firmware is used on Raspberry Pi 2 boards. Updates #2783
* bsps/arm: Support recent bootloaders starting kernel in HYP modePavel Pisa2016-10-025-7/+175
| | | | | | | | | | | | | | | | | | | | | When HYP mode is detected at startup then setup HYP mode vectors table (for future extensions) clean exceptions switching to HYP mode and switch CPU to ARM SVC mode. BSPs which want to use this support need to include next option in their configure.ac RTEMS_BSPOPTS_SET([BSP_START_IN_HYP_SUPPORT],[*],[1]) RTEMS_BSPOPTS_HELP([BSP_START_IN_HYP_SUPPORT], [Support start of BSP in ARM HYP mode]) AM_CONDITIONAL(BSP_START_IN_HYP_SUPPORT,test "$BSP_START_IN_HYP_SUPPORT" = "1") and need to include next lines in corresponding Makefile.am if BSP_START_IN_HYP_SUPPORT libbsp_a_SOURCES += ../shared/startup/bsp-start-in-hyp-support.S endif Updates #2783
* libbsp/arm: Fix ARM BSPs missing the bsp_translation_table_end symbol.Chris Johns2016-10-022-0/+2
| | | | Closes #2775.
* libbsp/arm: Add the TTB table to the default MMU set up as read/write.Chris Johns2016-10-021-0/+4
| | | | | | | This lets the table be changed at runtime for dynamic loading and debugger support. Closes #2775.
* bsps/arm: Fix basic cache support for SMPSebastian Huber2016-10-021-8/+8
| | | | | Updates #2782 Updates #2783
* bsps/arm: remove lock in arm_cp15_set_translation_table_entries().Pavel Pisa2016-10-021-9/+1
| | | | | | | | | | | | | | Protection by rtems_interrupt_disable() is incompatible with SMP build. Actual page table entries manipulation function does not need locking and disabling cache and can be run concurrently even on multiple CPUs as long as changes do not modify same region. If the function is called from more threads/CPUs to modify same region with different mapping options concurrently then there is problem at another level of virtual address space management and has to be solved by mutex or other locking at that level. Updates #2782 Updates #2783
* arm/xilinx_zynq: ensure that cache is cleaned and MMU disabled when ↵Pavel Pisa2016-10-021-0/+35
| | | | | | | | | initialization starts. The u-boot loader enables the MMU plus the data and instruction caches in some versions which results in RTEMS boot failure. Closes #2774.
* arm/raspberrypi: use cache manager operations to flush/invalidate all cache ↵Pavel Pisa2016-10-021-7/+7
| | | | | | | | | | | | levels. This fix strange behavior where some stale content has been stored in level 2 cache before RTEMS has been start from U-boot which has reappeared after MMU enable and shadow vector table at start of SDRAM. Updates #2782 Updates #2783
* arm/bsps: CP15 and basic cache support entire cache clean for more ↵Pavel Pisa2016-10-022-4/+24
| | | | | | | | | | | | | | | | | | | | architecture variants now. Next cache operations should work on most of cores now rtems_cache_flush_entire_data() rtems_cache_invalidate_entire_data() rtems_cache_invalidate_entire_instruction() Instruction cache invalidate works on the first level for now only. Data cacache operations are extended to ensure flush/invalidate on all cache levels. The CP15 arm_cp15_data_cache_clean_all_levels() function extended to continue through unified levels too (ctype = 4). Updates #2782 Updates #2783
* bsps/arm: do not disable MMU during translation table management operations.Pavel Pisa2016-10-021-8/+42
| | | | | | | | | | | | | | | | | | | | | | | Disabling MMU requires complex cache flushing and invalidation operations. There is almost no way how to do that right on SMP system without stopping all other CPUs. On the other hand, there is documented sequence of operations which should be used according to ARM manual and it guarantees even distribution of maintenance operations to other cores for last generation of Cortex-A cores with multiprocessor extension. This change could require addition of appropriate entry to arm_cp15_start_mmu_config_table for some BSPs to ensure that MMU table stays accessible after MMU is enabled { .begin = (uint32_t) bsp_translation_table_base, .end = (uint32_t) bsp_translation_table_base + 0x4000, .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED } Updates #2782 Updates #2783
* bsps/arm: basic on core cache support changed to use l1 functions.Pavel Pisa2016-10-022-45/+69
| | | | | | | | | | | | | | | | | The basic data and instruction rage functions should be compatible for all ARMv4,5,6,7 functions. On the other hand, some functions are not portable, for example arm_cp15_data_cache_test_and_clean() and arm_cp15_data_cache_invalidate() for all versions and there has to be specialized version for newer cores. arm_cache_l1_properties_for_level uses CCSIDR which is not present on older chips. Actual version is only experimental, needs more changes and problem has been found on RPi1 with dlopen so there seems to be real problem. Updates #2783 Updates #2782
* bsps/arm: Change code to explicit selection of cache implementation for ARM ↵Pavel Pisa2016-10-029-20/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | BSPs. The original ARM architecture wide cache_.h is changed to dummy version for targets not implementing/enablig cache at all. The ARM targets equipped by cache should include appropriate implementation. Next options are available for now c/src/lib/libbsp/arm/shared/armv467ar-basic-cache/cache_.h basic ARM cache integrated on the CPU core directly which requires only CP15 oparations c/src/lib/libbsp/arm/shared/arm-l2c-310/cache_.h support for case where ARM L2C-310 cache controller is used. It is accessible as mmaped peripheral. c/src/lib/libbsp/arm/shared/armv7m/include/cache_.h Cortex-M specific cache support Updates #2782 Updates #2783
* bsp/arm: Report correct maximal cache line length for ARM Cortex-A + L2C-310.Pavel Pisa2016-10-021-0/+4
| | | | | Updates #2782 Updates #2783
* arm/raspberrypi: ensure that RTEMS application image can be started by U-boot.Pavel Pisa2016-10-022-1/+39
| | | | | | | | | | | | | | | | | | The current versions of U-boot start kernel/RTEMS application image with instruction and data caches enabled and it sets exception base register to new address after its self-relocation. ldr r0, [r9, #GD_RELOCADDR] /* r0 = gd->relocaddr */ mcr p15, 0, r0, c12, c0, 0 /* Set VBAR */ Included changes in bsp_start_hook_0 restore default state to allow RTEMS image to run after startup from newer U-boot version on Raspberry Pi. Clear interrupt enable registers in interrupt controller to ensure that RTEMS starts from well defined state. Updates #2783
* score: Fix simple timecounter supportSebastian Huber2016-01-271-14/+37
| | | | Close #2502.
* bsps/arm: Fix broken switch statementSebastian Huber2016-01-181-4/+5
| | | | Close #2530.
* bsp/tms570: ensure that linker symbol comparison to NULL is not optimized out.Pavel Pisa2015-12-011-2/+12
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* bsp/tms570: unite code duplication in pinmux and clean SCI close per review ↵Premysl Houdek2015-11-183-18/+21
| | | | | | remarks. Signed-off-by: Premysl Houdek <kom541000@gmail.com>
* bsp/tms570: use common tms570ls3137.inc file for all board ling variants.Pavel Pisa2015-11-185-64/+24
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* bsp/tms570: separate Flash variants to one which boots directly and one for ↵Premysl Houdek2015-11-184-0/+57
| | | | | | | | | | | | boot loader. The default tms570ls3137_hdk variant is for building RTEMS application image starting directly from start of Flash. Variant tms570ls3137_hdk_with_loader skips 256kB at start of Flash to allow use with application loader. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* bsp/tms570: use POM only when application image does not start at address 0.Pavel Pisa2015-11-187-14/+159
| | | | | | | | | | | | | | | | | | | | | Parameters overlay module is initialized and cleared first. It is used later to replace exception target vectors only if that is required. The application loader code with CPU and SDRAM setup code has to provide well defined pattern of instructions at addresses 0x00000000 and 0x0000001f, because only data read accesses can be processed reliably by POM. The expected instruction pattern can be seen in the next example https://github.com/hornmich/tms570ls3137-hdk-sdram/blob/master/SDRAM_SCI_configuration/source/sys_intvecs.asm Comments with detailed description of code, background and reasons for selected approach have been included in TMS570 bsp startup code. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz> Signed-off-by: Premysl Houdek <kom541000@gmail.com>
* bsp/tms570: updated reserved space for vector overlay in internal RAMPremysl Houdek2015-11-183-4/+6
|
* bsp/tms570: fixed sci driver freeze when closing terminal bugPremysl Houdek2015-11-181-3/+5
| | | | | | tms570_sci_interrupt_last_close: do not wait for old data transmit. Signed-off-by: Premysl Houdek <kom541000@gmail.com>
* bsp/tms570: Pinmux support and EMAC pin definition addedPremysl Houdek2015-11-184-1/+216
| | | | Signed-off-by: Premysl Houdek <kom541000@gmail.com>
* bsp/tms570: EMAC control header file corrected and EMAC interrupt vector addedPremysl Houdek2015-11-186-236/+295
| | | | | Signed-off-by: Premysl Houdek <kom541000@gmail.com> Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Beaglebone: fix missing clobber in inline assembly.Marcos Diaz2015-09-101-1/+7
| | | | | | | | flush_data_cache uses R0 directly but doesn't list it as a clobbered register. Compiling with -O3 made this code break, since the function that calls flush_data_cache already uses r0. closes #2416.
* bsps/arm: Update due to API changesSebastian Huber2015-07-211-4/+4
|
* bsp/tms570 Use bitfields instead of hard-coded valuesPremysl Houdek2015-07-204-32/+52
| | | | Signed-off-by: Premysl Houdek <kom541000@gmail.com>
* bsp/tms570: skipped 32bit field definitions and corrected single bit fieldsPremysl Houdek2015-07-2036-3298/+2641
| | | | | | | | there is no need to define access macros for field covering whole registers. In addition, BSP_FLD32 does not work right for field 32bit length. Signed-off-by: Premysl Houdek <kom541000@gmail.com>
* bsp/tms570: source changes reflecting new headers.Premysl Houdek2015-07-1611-230/+335
| | | | Signed-off-by: Premysl Houdek <kom541000@gmail.com>
* bsp/tms570: fix get time resolution after infrastructure change to timecounter.Pavel Pisa2015-07-161-6/+35
| | | | | | | | | | | | | | | | | The update fixes breakage of TMS570 support after Alexander Krutwig switch of RTEMS time read to timecounter mechanism bsps: Convert clock drivers to use a timecounter Mechanism to specify odd (non 1 Mhz) time base update frequencies implemented after objections of Martin Galvan. Code is adjusted to convert RTEMS configuration parameter microseconds_per_tick to such odd base if TMS570_PREFERRED_TC_FREQUENCY is specified appropriately. Signed-off-by: Premysl Houdek <kom541000@gmail.com> Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* bsp/tms570: New/generated header files for TMS570 SoC peripherals registers.Premysl Houdek2015-07-1637-0/+14362
| | | | | | | | | | | The header files are generated by script make_header.py. Current script's version can be found at: https://github.com/AoLaD/rtems-tms570-utils/tree/headers/headers/python Registers offsets and fields have been extracted from reference manual. Signed-off-by: Premysl Houdek <kom541000@gmail.com>
* remaining bsp.h: Fix by hand to LIBBSP_@CPU@_@BSP_FAMILY@_BSP_HJoel Sherrill2015-07-162-4/+4
| | | | These files were left after running the script in the previous patch.