Commit Graph

22 Commits

Author SHA1 Message Date
Sebastian Huber
f6895c6d55 bsps/powerpc: Fix C++ exception handling
Close #3736.
2019-05-07 10:31:51 +02:00
Sebastian Huber
9e4895805a bsps/powerpc: Initialize stack earlier
The __eabi() call may use the stack.

Update #3459.
2019-03-15 07:34:07 +01:00
Sebastian Huber
828276b081 bsps: Adjust shared Doxygen groups
Update #3706.
2019-03-08 07:42:54 +01:00
Chris Johns
ec1dd51aae libdl: Add small data support to the remaining PowerPC BSPs.
Updates #3687
2019-03-07 06:33:47 +11:00
Sebastian Huber
dbe6e0ad09 bsps/powerpc: Move .rtemstack section
Move the .rtemsstack section from a read-only to a read-write area, see
page table setup in __BSP_default_pgtbl_setup().
2019-03-04 09:25:21 +01:00
Sebastian Huber
e1fc23f057 bsps/powerpc: Fix PAGE_ALIGN() macros
Previous warning fixes which include <sys/param.h> broke this macro.
The definition of PAGE_MASK changed.
2019-03-04 09:25:21 +01:00
Sebastian Huber
eec706e2bf bsps/powerpc: Fix small data area section
Fix small data area in case no fixed size is desired.  Rename
bsp_section_set_sdata_sbss_size into bsp_section_small_data_area_size
since this symbol reflects the overall small data area size (including
space for libdl).  Do not use bsp_section_sbss_size before definition in
linker command file.  Add new symbols to <bsp/linker-symbols.h>.

Update #3687.
2019-02-11 11:41:13 +01:00
Chris Johns
6c9f0176a9 libdl: Add powerpc large memory and small data support.
- Add support for architecure sections that can be handled by the
  architecture back end.

- Add trampoline/fixup support for PowerPC. This means the PowerPC
  now supports large memory loading of applications.

- Add a bit allocator to manage small block based regions of memory.

- Add small data (sdata/sbss) support for the PowerPC. The support
  makes the linker allocated small data region of memory a global
  resource available to libdl loaded object files.

Updates #3687
Updates #3685
2019-02-09 10:06:34 +11:00
Sebastian Huber
81aec18146 bsps/powerpc: Fix 64-bit issues in assembler files
We have to be careful with instructions which operate explicitly on
words or doublewords.

Update #3082.
2019-01-25 15:40:11 +01:00
Sebastian Huber
84e59b7c04 bsps/powerpc: Use interrupt stack for init stack
Move start.o to separate file.

Update #3459.
2018-11-19 07:15:47 +01:00
Sebastian Huber
efdb4a767a bsp/beatnik: Fix warnings 2018-11-09 09:42:31 +01:00
Sebastian Huber
54d87f2e52 bsps/powerpc: Simplify ppc_exc_initialize()
Remove parameters from ppc_exc_initialize() since all BSPs passed the
same values.

Update #3459.
2018-09-06 07:04:28 +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
7bf072bbb8 bsp/powerpc: Remove wildcards in linkcmds.base
This reverts commit 40c623a883.

The use of postfix wildcards, e.g. of the form "*.x" is dangerous since
it circumvents the standard matching rules for sections.

Unknown input sections should be added explicitly to the desired output
section via "x.*" wildcards.

Update #3307.
2018-05-18 10:44:18 +02:00
Sebastian Huber
3460c52286 bsps/powerpc: Move bsp-start-zero.S to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-26 07:17:57 +02:00
Sebastian Huber
afa90ee59d bsps: Move vpd.c to bsps
This patch is a part of the BSP source reorganization.

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

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

Update #3285.
2018-04-24 10:24:23 +02:00
Sebastian Huber
1163f50285 bsps: Move tictac.c to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-24 10:24:22 +02:00
Sebastian Huber
9964895866 bsps: Move startup files to bsps
Adjust build support files to new directory layout.

This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-20 13:52:14 +02:00
Sebastian Huber
fbcd7c8fa6 bsps: Move start files to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-20 13:08:36 +02:00