Commit Graph

60 Commits

Author SHA1 Message Date
Jeff Kubascik
b51a1d07d0 bsps/arm: Unmask generic timer in interrupt handler
Xen will mask the virtual timer before injecting the interrupt to the
guest.
2019-12-05 07:25:52 +01:00
Jeff Kubascik
001cd9bd5c bsps/arm: Add zImage boot header
Xen currently only supports the zImage loader for 32 bit guests on ARM
targets.
2019-12-05 07:25:52 +01:00
Sebastian Huber
f9648baf65 bsps/arm: Add support for small pages MMU
The small page MMU support reduces the granularity for memory settings
through the MMU from 1MiB sections to 4KiB small pages.

Enable it by default on the realview_pbx_a9_qemu BSP.
2019-10-31 09:48:05 +01:00
Chris Johns
15b6f44deb arm/tlb: Fix the MP affinity check to invalidate ASIDs.
- The TI's CortexA7 MP MPIDR register returns 0

Updates #3760
2019-08-12 13:58:31 +10:00
Chris Johns
98d6792376 arm: Select the TLB invalidate based on the core's Id variant.
Closes #3760
2019-07-31 08:33:05 +10:00
Sebastian Huber
1e6380baf2 bsps/arm: Move HYP to SVC change to start.S
This fixes the corruption of r3 by the call to
bsp_start_arm_drop_hyp_mode().

Moving the code makes it easier to review changes in start.S.

Close #3773.
2019-07-26 08:12:20 +02:00
Sebastian Huber
0ee2125a92 bsps/arm: Move register init to start.S
This makes it easier to review changes in start.S.

Update #3773.
2019-07-26 08:00:48 +02:00
Sebastian Huber
0f5c1d5344 bsps/arm: Remove register init for ARMv7-M
There are no known ARMv7-M chips with a dual lockstep mode.

Update #3773.
2019-07-26 08:00:39 +02:00
Chris Johns
c43071f523 arm: Return the current handler from arm_cp15_set_exception_handler
Closes #3762
2019-06-28 09:01:27 +10:00
Sebastian Huber
7fdf48aaf2 score: Add _SMP_Othercast_action() 2019-05-20 08:49:39 +02:00
Sebastian Huber
658700449d score: Add _SMP_Broadcast_action() 2019-05-20 08:49:39 +02:00
Sebastian Huber
ad40d05eba score: Remove _SMP_Before_multitasking_action()
Use _SMP_Multicast_action() instead.
2019-04-12 09:44:48 +02:00
Jeff Kubascik
b0044305a6 bsp/zynq-uart: Move Zynq UART driver to shared directory
This driver will be shared with the xilinx-zynqmp BSP.

Update #3682.
2019-04-11 07:29:06 +02:00
Sebastian Huber
3fe215502a Remove superfluous <rtems/system.h> includes 2019-03-14 13:13:27 +01:00
Sebastian Huber
15359bb6cb bsps/arm: Adjust CMSIS Doxygen groups
Update #3706.
2019-03-08 07:42:54 +01:00
Sebastian Huber
828276b081 bsps: Adjust shared Doxygen groups
Update #3706.
2019-03-08 07:42:54 +01:00
Sebastian Huber
212663bede bsps: Adjust architecture Doxygen groups
- 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.
2019-03-04 07:51:38 +01:00
Sebastian Huber
76918e180a bsps/arm: Add BSP_ARM_GIC_ENABLE_FIQ_FOR_GROUP_0
The following variants

 * GICv1 with Security Extensions,
 * GICv2 without Security Extensions, or
 * within Secure processor mode

have the ability to assign group 0 or 1 to individual interrupts.  Group
0 interrupts can be configured to raise an FIQ exception.  This enables
the use of NMIs with respect to RTEMS.

BSPs can enable this feature with the BSP_ARM_GIC_ENABLE_FIQ_FOR_GROUP_0
define.  Use arm_gic_irq_set_group() to change the group of an
interrupt (default group is 1, if BSP_ARM_GIC_ENABLE_FIQ_FOR_GROUP_0 is
defined).
2019-02-28 11:52:30 +01:00
Sebastian Huber
e33be09cfb bsps/arm: Support GIC group 0/1 2019-02-28 11:50:18 +01:00
Sebastian Huber
feea03b625 Remove explicit file names from @file
This makes the @file documentation independent of the actual file name.

Update #3707.
2019-02-28 11:47:33 +01:00
Sebastian Huber
bdec62c4d5 bsps/arm: Move device tree copy
Move device tree copy operation after the mode initialization so that
bsp_fdt_copy() uses the initialization stack and not the stack provided
up by the boot loader.
2019-02-18 09:01:27 +01:00
Sebastian Huber
0fb52cede1 bsps/arm: Fix generic timer frequency
Update #3456.
2019-02-07 08:48:18 +01:00
Sebastian Huber
95c19211d1 bsps/arm: Remove unused bsp_stack_irq_size
Update #3459.
2019-01-21 09:17:51 +01:00
Sebastian Huber
e7d623e7e2 bsps/arm: Conditional ARMv7-AR data cache disable
Update #3667.
Close #3674.
2019-01-10 08:12:16 +01:00
Thomas Dörfler
0abe47f142 bsps/arm: Fix typo in disable cache for ARMv7-AR
Update #3667.
2019-01-10 08:12:16 +01:00
Sebastian Huber
c37807e97c bsps/arm: Add cache size support for CP15 2018-12-21 11:57:49 +01:00
Sebastian Huber
41a557bc2f bsps/arm: Add ARMv7-AR disable data cache
Close #3667.
2018-12-21 10:32:41 +01:00
Sebastian Huber
ba856559a4 ARM_CACHE_L1_CPU_SUPPORT_PROVIDES_RANGE_FUNCTIONS
Remove this superfluous define.

Update #3667.
2018-12-21 10:32:25 +01:00
Sebastian Huber
e0caabe08d bsps/arm: Avoid short range branch in start.S 2018-11-21 07:48:23 +01:00
Sebastian Huber
faafc22928 bsps/arm: Use local labels in start.S 2018-11-21 07:48:23 +01:00
Sebastian Huber
945291312c bsps/arm: Simplify start.S
The boot_card() function does not return.
2018-11-21 07:48:23 +01:00
Sebastian Huber
ff081aee72 score: Rename interrupt stack symbols
Rename

  * _Configuration_Interrupt_stack_area_begin in _ISR_Stack_area_begin,
  * _Configuration_Interrupt_stack_area_end in _ISR_Stack_area_end, and
  * _Configuration_Interrupt_stack_size in _ISR_Stack_size.

Move definitions to <rtems/score/isr.h>.  The new names are considerable
shorter and in the right namespace.

Update #3459.
2018-11-08 08:09:20 +01:00
Sebastian Huber
186a0b1dc0 bsps/arm: Recognize .tm_clone_table input section 2018-10-15 10:40:31 +02:00
Sebastian Huber
511ef83ce4 bsps/arm: Fix ctor/dtor invocation order
Remove obsolete .ctor and .dtor output sections.
2018-10-09 12:01:27 +02:00
Sebastian Huber
cb682532cf network: Use kernel/user space header files
Add and use <machine/rtems-bsd-kernel-space.h> and
<machine/rtems-bsd-user-space.h> similar to the libbsd to avoid command
line defines and defines scattered throught the code base.

Simplify cpukit/libnetworking/Makefile.am.

Update #3375.
2018-09-10 10:38:44 +02:00
Sebastian Huber
0d362ff397 score: _SMP_Inter_processor_interrupt_handler()
Pass current processor control via parameter since it may be already
available at the caller side.
2018-07-25 10:07:42 +02:00
Sebastian Huber
511dc4b2be Rework initialization and interrupt stack support
Statically initialize the interrupt stack area
(_Configuration_Interrupt_stack_area_begin,
_Configuration_Interrupt_stack_area_end, and
_Configuration_Interrupt_stack_size) via <rtems/confdefs.h>.  Place the
interrupt stack area in a special section ".rtemsstack.interrupt".  Let
BSPs define the optimal placement of this section in their linker
command files (e.g. in a fast on-chip memory).

This change makes makes the CPU_HAS_SOFTWARE_INTERRUPT_STACK and
CPU_HAS_HARDWARE_INTERRUPT_STACK CPU port defines superfluous, since the
low level initialization code has all information available via global
symbols.

This change makes the CPU_ALLOCATE_INTERRUPT_STACK CPU port define
superfluous, since the interrupt stacks are allocated by confdefs.h for
all architectures.  There is no need for BSP-specific linker command
file magic (except the section placement), see previous ARM linker
command file as a bad example.

Remove _CPU_Install_interrupt_stack().  Initialize the hardware
interrupt stack in _CPU_Initialize() if necessary (e.g.
m68k_install_interrupt_stack()).

The optional _CPU_Interrupt_stack_setup() is still useful to customize
the registration of the interrupt stack area in the per-CPU information.

The initialization stack can reuse the interrupt stack, since

  * interrupts are disabled during the sequential system initialization,
    and

  * the boot_card() function does not return.

This stack resuse saves memory.

Changes per architecture:

arm:

  * Mostly replace the linker symbol based configuration of stacks with
    the standard <rtems/confdefs.h> configuration via
    CONFIGURE_INTERRUPT_STACK_SIZE.  The size of the FIQ, ABT and UND
    mode stack is still defined via linker symbols.  These modes are
    rarely used in applications and the default values provided by the
    BSP should be sufficient in most cases.

  * Remove the bsp_processor_count linker symbol hack used for the SMP
    support. This is possible since the interrupt stack area is now
    allocated by the linker and not allocated from the heap.  This makes
    some configure.ac stuff obsolete.  Remove the now superfluous BSP
    variants altcycv_devkit_smp and realview_pbx_a9_qemu_smp.

bfin:

  * Remove unused magic linker command file allocation of initialization
    stack.  Maybe a previous linker command file copy and paste problem?
    In the start.S the initialization stack is set to a hard coded value.

lm32, m32c, mips, nios2, riscv, sh, v850:

  * Remove magic linker command file allocation of initialization stack.
    Reuse interrupt stack for initialization stack.

m68k:

  * Remove magic linker command file allocation of initialization stack.
    Reuse interrupt stack for initialization stack.

powerpc:

  * Remove magic linker command file allocation of initialization stack.
    Reuse interrupt stack for initialization stack.

  * Used dedicated memory region (REGION_RTEMSSTACK) for the interrupt
    stack on BSPs using the shared linkcmds.base (replacement for
    REGION_RWEXTRA).

sparc:

  * Remove the hard coded initialization stack.  Use the interrupt stack
    for the initialization stack on the boot processor.  This saves
    16KiB of RAM.

Update #3459.
2018-06-27 08:58:16 +02:00
Sebastian Huber
715d6167e0 bsps: Support .rtemsstack.* linker input sections
Use a dedicated memory region or place it between the BSS and workspace.

Update #3459.
2018-06-27 08:58:16 +02:00
Sebastian Huber
7ee5931393 Remove Clock_driver_support_shutdown_hardware()
The aim of this clock driver hook was to stop clock tick interrupts at
some late point in the exit() procedure.

The use of atexit() pulls in malloc() which pulls in errno. It is
incompatible with the intention of the
CONFIGURE_DISABLE_NEWLIB_REENTRANCY configuration option.

The exit() function must be called from thread context, so accompanied
clock tick interrupts should cause no harm.  On the contrary, someone
may assume a normal operating system operation, e.g. working timeouts.

Remove the Clock_driver_support_shutdown_hardware() clock driver hook.

Close #3436.
2018-06-27 08:58:16 +02:00
Sebastian Huber
762fa62cca arm: Simplify CPU counter support
Use the standard ARMv7-M systick module for the ARMv7-M CPU counter
instead of DWT counter since the DWT counter is affected by power saving
states.

Use an inline function for _CPU_Counter_difference() for all ARM BSPs.

Update #3456.
2018-06-15 13:12:05 +02:00
Sebastian Huber
65f868cac6 Add _CPU_Counter_frequency()
Add rtems_counter_frequency() API function.  Use it to initialize the
counter value converter via the new system initialization step
(RTEMS_SYSINIT_CPU_COUNTER).  This decouples the counter implementation
and the counter converter.  It avoids an unnecessary pull in of the
64-bit integer division from libgcc.

Update #3456.
2018-06-15 13:02:44 +02:00
Joel Sherrill
a3fe23ccbb Drop executable permissions on .[S] files 2018-05-14 15:22:52 -05:00
Sebastian Huber
891754f764 bsps: Move arm-cp15-set-ttb-entries.c to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-24 10:24:30 +02:00
Sebastian Huber
aa705fe347 bsps: Move arm-cp15-set-exception-handler.c to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-24 10:24:29 +02:00
Sebastian Huber
864e72e400 bsps: Move arm-a9mpcore-smp.c to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-24 10:24:29 +02:00
Sebastian Huber
fc6d8c2ba5 bsps: Move arm-pl050.c to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-24 10:24:29 +02:00
Sebastian Huber
3ad74cbac7 bsps: Move arm-pl011.c to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-24 10:24:29 +02:00
Sebastian Huber
bbedc47b89 bsps: Move arm-pl111-fb.c to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-24 10:24:29 +02:00
Sebastian Huber
1ded97b93e bsps: Move arm-generic-timer-clock-config.c to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-24 10:24:29 +02:00
Sebastian Huber
e2f63219df bsps: Move arm-a9mpcore-clock-config.c to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-24 10:24:28 +02:00