Commit Graph

14077 Commits

Author SHA1 Message Date
Sebastian Huber
c30584738f bsps/arm: Fix basic cache support for SMP 2016-07-05 08:02:24 +02:00
Punit Vara
5e3096db5a Beaglebone: Update PWM driver imported from BBBIO
This patch adapts the previously added Beaglebone PWM code from BBBIO to RTEMS.
This work was done in the context of the Google Summer of Code 2016, and further
patches will follow to improve the code quality and documentation.
2016-07-04 15:09:06 -03:00
Punit Vara
6dc5c03fad Beaglebone: Add original BBBIO PWM driver
This patch adds the PWM driver code for the Beaglebone Black from BBBIO:

https://github.com/VegetableAvenger/BBBIOlib/blob/master/BBBio_lib/BBBiolib_PWMSS.c

This commit is for tracking purposes only; the next commit will adapt the code for
RTEMS.
2016-07-04 15:08:54 -03:00
Pavel Pisa
06165554b6 bsps/arm: basic on core cache support changed to use l1 functions.
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.
2016-07-04 15:55:58 +02:00
Pavel Pisa
d431653739 bsps/arm: Change code to explicit selection of cache implementation for ARM 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
2016-07-04 15:55:57 +02:00
Pavel Pisa
abea02a832 bsp/arm: Report correct maximal cache line length for ARM Cortex-A + L2C-310. 2016-07-04 15:55:57 +02:00
Pavel Pisa
0e507d5510 rtems+bsps/cache: Define cache manager operations for code synchronization and maximal alignment.
There is need for unambiguous named and defined cache function
which should be called when code is updated, loaded
or is self-modifying.

There should be function to obtain maximal cache line length
as well. This function can and should be used for allocations
which can be used for data and or code and ensures that
there are no partial cache lines overlaps on start and
end of allocated region.
2016-07-04 15:55:57 +02:00
Pavel Pisa
2d5902d6ae arm/raspberrypi: update VideoCore cache flush workaround to work on RPi2.
The arm_cp15_data_cache_clean_and_invalidate leads to hang on RPi2,
clean by individual lines works on RPi1 and RPi2.
2016-07-04 15:55:57 +02:00
Pavel Pisa
fe106ad5e2 arm/raspberrypi: Enable HYP to SVC switch for this BSP.
This support is required when newer firmware is used on
Raspberry Pi 2 boards.
2016-07-04 15:55:57 +02:00
Pavel Pisa
5812df8f52 bsps/arm: Support recent bootloaders starting kernel in HYP mode
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
2016-07-04 15:55:56 +02:00
Pavel Pisa
19a9090164 arm/score and shared: define ARM hypervisor mode and alternate vector table base access.
The main reason for inclusion of minimum hypervisor related defines
is that current ARM boards firmware and loaders (U-boot for example)
start loaded operating system kernel in HYP mode to allow it take
control of virtualization (Linux/KVM for example).
2016-07-04 15:55:56 +02:00
Alexander Krutwig
137bd3747e bsp/atsam: Add RTC driver 2016-07-04 14:10:34 +02:00
Sebastian Huber
0057e38f9d libchip: Simplify RTC driver 2016-07-04 11:06:53 +02:00
Sebastian Huber
729cf694e8 bsps: Do not use fast idle clock for SMP
We may have more than one idle thread.  Thus, the clock driver fast idle
logic would be a bit more complicated.
2016-06-30 09:51:19 +02:00
Alexander Krutwig
891fa3eb5b bsp/atsam: Add support for TCM 2016-06-29 10:38:19 +02:00
Sebastian Huber
9bb3ce3918 score: Fix SMP message handling
According to the C11 standard only atomic read-modify-write operations
guarantee that the last value written in modification order is read, see
"7.17.3 Order and consistency".  Thus we must use a read-modify-write in
_SMP_Inter_processor_interrupt_handler() to make sure we read an
up-to-date message.
2016-06-29 09:50:47 +02:00
Pavel Pisa
b83c23e62a arm/raspberrypi: resolve BSP warnings. 2016-06-28 17:07:02 +02:00
Pavel Pisa
68565b090e arm/raspberrypi: run VideoCore and mailbox code through rtems.uncrustify.
Some changes have been reverted to keep readability.
For example squash of BCM2835_MBOX_TAG_* defines
which are visually aligned in column.
2016-06-28 16:15:38 +02:00
Mudit Jain
48704cdebd arm/raspberrypi: Adding functionalities to Mailbox RPi
Added functions for retrieving firmware revision,
board model and board revision.
2016-06-28 15:44:58 +02:00
Sebastian Huber
aa30e2c115 bsp/mvme162: Include missing <rtems/bspIo.h> 2016-06-28 13:10:16 +02:00
Christian Mauderer
4c02385d8f libnetworking: Import current <arpa/inet.h>
Import the <arpa/inet.h> from current FreeBSD.  Necessary due to changes
in <netinet/in.h>.  Remove BSD hack from <arpa/inet.h>.

Clean up problems with htonl().  These functions are defined in
<arpa/inet.h>.  This lead to some problems because they are defined in
<rtems/endian.h> too.  Add NTOHL, ... to
<rtems/rtems_bsdnet_internal.h>.
2016-06-28 13:10:01 +02:00
Sebastian Huber
1c77a36f11 bsps: Include missing <rtems/bspIo.h> 2016-06-24 14:31:29 +02:00
Pavel Pisa
14de20f15b arm/raspberrypi: Force VC mail box buffer to be synchronized through cache.
This solution is quick fix until CPU_DATA_CACHE_ALIGNMENT is defined
and cache manager is checked on all Raspberry Pi variants.
2016-06-24 11:24:09 +02:00
Alexander Krutwig
0c1413c284 bsp/atsam: Add I2C driver 2016-06-23 07:54:20 +02:00
Alexander Krutwig
0fddefe65b bsp/atsam: Fix QSPI driver API
We support read/write of arbitrary buffers.
2016-06-22 16:09:01 +02:00
Sebastian Huber
655ce0fb00 sparc: Optimize CPU counter support 2016-06-22 14:00:27 +02:00
Sebastian Huber
506bfc8580 Move printer initialization to separate header
The RTEMS print user need to know nothing about a particular printer
implementation.  In particular get rid of the <stdio.h> include which
would be visible via <rtems.h>.
2016-06-22 07:29:26 +02:00
Sebastian Huber
ede1a4182d Make rtems/print.h independent of rtems/bspIo.h 2016-06-22 07:29:26 +02:00
Pavel Pisa
91043bfa91 bsp/tms570: regenerate preinstall makefile by bootstrap -p. 2016-06-21 22:20:17 +02:00
Pavel Pisa
8df196f704 bsp/tms570: include complete peripheral initialization to SCI driver.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
2016-06-21 22:20:17 +02:00
Pavel Pisa
6626efe6f0 bsp/tms570: update pinmux to provide support for initialization lists and clear of alt outputs. 2016-06-21 22:20:17 +02:00
Pavel Pisa
bc884f6538 bsp/tms570: include package balls and PINMMR registers mapping for TMS570LS3135ZWT chip. 2016-06-21 22:20:16 +02:00
Sebastian Huber
a4ff2a2a4b bsp/leon3: Add up counter timecounter 2016-06-21 15:54:18 +02:00
Sebastian Huber
291945f137 bsp/leon3: Fix interrupt timestamping
Close #2684.
2016-06-21 15:54:18 +02:00
Sebastian Huber
9460333e99 sparc: Rework CPU counter support
Rework CPU counter support to enable use of the GR740 up-counter via
%asr22 and %asr23.
2016-06-21 15:54:18 +02:00
Sebastian Huber
4c927c7900 bsp/leon3: Fix LEON3_Cpu_Index initialization 2016-06-21 15:54:18 +02:00
Pavel Pisa
fa239ff26c arm/raspberrypi: Ensure that buffers used for VC mail box communication are synchronized through cache. 2016-06-20 17:01:19 +02:00
Sebastian Huber
40b80d86ef bsp/leon3: Use sysinit for bsp_debug_uart_init() 2016-06-20 08:18:39 +02:00
Sebastian Huber
a4fa007be9 bsp/leon3: Use sysinit for amba_initialize() 2016-06-20 08:11:16 +02:00
Sebastian Huber
16706b723f bsps: Fix printk() format warning 2016-06-17 08:07:14 +02:00
Sebastian Huber
305231bd3c bsps: Fix MPCI_Fatal() prototype
Close #2742.
2016-06-17 08:04:25 +02:00
Joel Sherrill
381b120acc libchip/shmdr/send.c: Fix warning and clean up 2016-06-16 09:03:22 -05:00
Joel Sherrill
82cb100aba libchip/shmdr/poll.c: Fix warning and clean up 2016-06-16 09:03:22 -05:00
Joel Sherrill
4788a074a5 mvme147s/shmsupp/mpisr.c: Fix warnings and clean up 2016-06-16 09:03:22 -05:00
Joel Sherrill
d5ff139894 mvme147s/shmsupp/getcfg.c: Fix warning 2016-06-16 09:03:22 -05:00
Sebastian Huber
b61d5cac7c bsps: Add CLOCK_DRIVER_USE_ONLY_BOOT_PROCESSOR
Add CLOCK_DRIVER_USE_ONLY_BOOT_PROCESSOR clock driver option.  If
defined, then do the clock tick processing on the boot processor on
behalf of all other processors.  Currently, this is intended as a
workaround for a Qemu shortcoming on ARM.

Update #2737.
2016-06-14 11:57:48 +02:00
Sebastian Huber
a0cd238d2b bsp/qoriq: Increase reserved size for FDT
Some boards require this size.
2016-06-13 13:42:02 +02:00
Sebastian Huber
10670a5503 bsp/irq-server: Fix install/remove
Do not wait for the interrupt server while owning the allocator lock.
This could lead to deadlock in case one of interrupt service routines or
user extensions want to obtain the allocator mutex as well.  Instead let
the interrupt server do the install/remove job entirely on behalf of the
requesting task.
2016-06-13 10:30:42 +02:00
Sebastian Huber
89f627b56b bsps/powerpc: Update to RTEMS printer changes 2016-06-09 09:39:18 +02:00
Alexander Krutwig
033443c869 bsp/atsam: Support QSPI flash 2016-06-06 12:57:08 +02:00