[PATCH v2 00/10] Rework work area initialization
Gedare Bloom
gedare at rtems.org
Sun Feb 2 15:17:06 UTC 2020
On Sun, Feb 2, 2020 at 6:28 AM Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
>
> This change set reworks the work area initialization carried out by the BSPs to
> initialize the workspace and C program heap only on demand, e.g. in case these
> components are used by the application.
>
> Currently, the workspace is always used, however, this may change in a follow up
> change set.
>
> v2:
>
> Add a CONFIGURE_VERBOSE_INITIALIZATION as a replacement for the removed BSP_GET_WORK_AREA_DEBUG. Example output:
>
> sysinit: begin
> sysinit: stack pointer: 0x00200bb8
> sysinit: memory area 0: begin = 0x00205348, size = 0x0f9f6cb8
> sysinit: DIRTY_MEMORY: done
> sysinit: ISR_STACK: done
> sysinit: memory area 0: free begin = 0x00205348, free size = 0x0f9f6cb8
> sysinit: PER_CPU_DATA: done
> sysinit: memory area 0: free begin = 0x0020a94a, free size = 0x0f9f16b6
> sysinit: WORKSPACE: done
> sysinit: memory area 0: free begin = 0x0fbfc000, free size = 0x00000000
> sysinit: MALLOC: done
>
>
> *** BEGIN OF TEST SPSYSINIT 1 ***
> *** TEST VERSION: 5.0.0.4f94d279bfdad4e941bda1b3ea81d189e58a4866-modified
> *** TEST STATE: EXPECTED_PASS
> *** TEST BUILD: RTEMS_DEBUG RTEMS_POSIX_API RTEMS_SMP
> *** TEST TOOLS: 7.5.0 20191114 (RTEMS 5, RSB 5 (599c4d7c87fa), Newlib d14714c69)
> sysinit: BSP_START: done
Why is "sysinit: begin" missing?
> sysinit: CPU_COUNTER: done
> sysinit: INITIAL_EXTENSIONS: done
> sysinit: DATA_STRUCTURES: done
> sysinit: USER_EXTENSIONS: done
> sysinit: CLASSIC_TASKS: done
> sysinit: CLASSIC_TIMER: done
> sysinit: CLASSIC_MESSAGE_QUEUE: done
> sysinit: CLASSIC_SEMAPHORE: done
> sysinit: CLASSIC_PARTITION: done
> sysinit: CLASSIC_REGION: done
> sysinit: CLASSIC_DUAL_PORTED_MEMORY: done
> sysinit: CLASSIC_RATE_MONOTONIC: done
> sysinit: CLASSIC_BARRIER: done
> sysinit: POSIX_SIGNALS: done
> sysinit: POSIX_THREADS: done
> sysinit: POSIX_MESSAGE_QUEUE: done
> sysinit: POSIX_SEMAPHORE: done
> sysinit: POSIX_TIMER: done
> sysinit: POSIX_SHM: done
> sysinit: POSIX_KEYS: done
> sysinit: POSIX_CLEANUP: done
> sysinit: IDLE_THREADS: done
> sysinit: LIBIO: done
> sysinit: ROOT_FILESYSTEM: done
> sysinit: BSP_PRE_DRIVERS: done
> sysinit: DEVICE_DRIVERS: done
> sysinit: CLASSIC_USER_TASKS: done
> sysinit: POSIX_USER_THREADS: done
> sysinit: STD_FILE_DESCRIPTORS: done
> sysinit: done
>
> *** END OF TEST SPSYSINIT 1 ***
>
> Sebastian Huber (10):
> score: Add Memory Handler
> score: Add _Memory_Dirty()
> bsps: Add RamEnd to linker command files
> bsps: Add RTEMS_SYSINIT_BSP_EARLY
> stackchk: Add RTEMS_SYSINIT_ISR_STACK
> bsps: Remove uses of BSP_GET_WORK_AREA_DEBUG
> bsps: Rework work area initialization
> sysinit: Add RTEMS_SYSINIT_ORDER_LAST_BUT_[1-9]
> Use RTEMS_SYSINIT_ORDER_LAST_BUT_5
> config: Add CONFIGURE_VERBOSE_INITIALIZATION
>
Can you try to get your mailer to inline send your patch emails
instead of attach?
> bsps/arm/altera-cyclone-v/start/bspgetworkarea.c | 87 ++--
> bsps/arm/atsam/console/debug-console.c | 2 +-
> .../contrib/libraries/libchip/source/pio_it.c | 2 +-
> .../atsam/contrib/libraries/libchip/source/xdmad.c | 2 +-
> bsps/arm/atsam/start/getentropy-trng.c | 2 +-
> bsps/arm/beagle/start/bspstart.c | 2 +-
> bsps/arm/gdbarmsim/include/bsp.h | 2 -
> bsps/arm/imx/console/console-config.c | 2 +-
> bsps/arm/imx/start/bspstarthooks.c | 28 +-
> bsps/arm/raspberrypi/console/console-config.c | 2 +-
> bsps/arm/raspberrypi/start/bspstarthooks.c | 30 +-
> bsps/arm/shared/start/linkcmds.base | 1 +
> bsps/arm/tms570/console/printk-support.c | 2 +-
> bsps/arm/xilinx-zynq/console/debug-console.c | 2 +-
> bsps/arm/xilinx-zynqmp/console/console-config.c | 2 +-
> bsps/bfin/TLL6527M/start/linkcmds | 1 +
> bsps/bfin/bf537Stamp/start/linkcmds | 1 +
> bsps/bfin/eZKit533/start/linkcmds | 1 +
> bsps/epiphany/epiphany_sim/start/linkcmds | 1 +
> bsps/i386/pc386/start/bspgetworkarea.c | 35 +-
> bsps/include/bsp/bootcard.h | 97 +---
> bsps/lm32/lm32_evr/start/linkcmds | 1 +
> bsps/lm32/milkymist/start/linkcmds | 1 +
> bsps/m68k/av5282/start/linkcmds | 1 +
> bsps/m68k/av5282/start/linkcmdsflash | 1 +
> bsps/m68k/av5282/start/linkcmdsram | 1 +
> bsps/m68k/csb360/start/linkcmds | 1 +
> bsps/m68k/gen68340/start/linkcmds | 1 +
> bsps/m68k/gen68360/start/linkcmds | 1 +
> bsps/m68k/gen68360/start/linkcmds.bootp | 1 +
> bsps/m68k/gen68360/start/linkcmds.prom | 1 +
> bsps/m68k/mcf5206elite/start/linkcmds | 1 +
> bsps/m68k/mcf52235/start/linkcmds | 1 +
> bsps/m68k/mcf5225x/start/linkcmds | 1 +
> bsps/m68k/mcf5235/start/linkcmds | 1 +
> bsps/m68k/mcf5235/start/linkcmdsflash | 1 +
> bsps/m68k/mcf5235/start/linkcmdsram | 1 +
> bsps/m68k/mcf5329/start/linkcmds | 1 +
> bsps/m68k/mcf5329/start/linkcmdsflash | 1 +
> bsps/m68k/mrm332/start/linkcmds | 2 +-
> bsps/m68k/mvme162/start/linkcmds | 1 +
> bsps/m68k/mvme167/start/linkcmds | 1 +
> bsps/m68k/shared/start/linkcmds.base | 1 +
> bsps/m68k/uC5282/start/linkcmds | 1 +
> bsps/mips/csb350/start/linkcmds | 1 +
> bsps/mips/hurricane/start/linkcmds | 1 +
> bsps/mips/jmr3904/start/linkcmds | 1 +
> bsps/mips/malta/start/linkcmds | 1 +
> bsps/mips/rbtx4925/start/linkcmds | 1 +
> bsps/mips/rbtx4938/start/linkcmds | 1 +
> bsps/moxie/moxiesim/start/linkcmds | 1 +
> bsps/nios2/nios2_iss/start/linkcmds | 1 +
> bsps/or1k/shared/start/linkcmds.base | 1 +
> bsps/powerpc/beatnik/start/bspstart.c | 19 +-
> bsps/powerpc/gen5200/start/linkcmds.gen5200_base | 1 +
> bsps/powerpc/haleakala/start/linkcmds | 1 +
> bsps/powerpc/motorola_powerpc/start/bspstart.c | 19 +-
> bsps/powerpc/mpc55xxevb/start/bspgetworkarea.c | 27 +-
> bsps/powerpc/mpc8260ads/start/linkcmds | 1 +
> bsps/powerpc/mvme3100/start/bspstart.c | 19 +-
> bsps/powerpc/mvme5500/start/bspstart.c | 13 +-
> bsps/powerpc/qoriq/start/mmu-config.c | 27 +-
> bsps/powerpc/shared/start/bspgetworkarea.c | 34 +-
> bsps/powerpc/shared/start/linkcmds.base | 1 +
> bsps/powerpc/shared/start/sbrk.c | 63 ++-
> bsps/powerpc/ss555/start/linkcmds | 1 +
> bsps/powerpc/tqm8xx/start/bspgetworkarea.c | 26 +-
> bsps/powerpc/virtex4/start/linkcmds | 1 +
> bsps/powerpc/virtex5/start/linkcmds | 1 +
> bsps/riscv/riscv/console/console-config.c | 2 +-
> bsps/riscv/shared/start/linkcmds.base.in | 1 +
> bsps/sh/gensh1/start/linkcmds | 1 +
> bsps/sh/gensh2/start/linkcmds | 1 +
> bsps/sh/gensh2/start/linkcmds.ram | 1 +
> bsps/sh/gensh2/start/linkcmds.rom | 1 +
> bsps/sh/gensh4/start/linkcmds | 1 +
> bsps/sh/gensh4/start/linkcmds.rom | 1 +
> bsps/sh/gensh4/start/linkcmds.rom2ram | 1 +
> bsps/sh/shsim/start/linkcmds | 1 +
> bsps/shared/dev/getentropy/getentropy-cpucounter.c | 2 +-
> bsps/shared/start/bootcard.c | 11 +-
> bsps/shared/start/bspgetworkarea-default.c | 46 +-
> bsps/sparc/erc32/start/bspsmp.c | 2 +-
> bsps/sparc/leon3/start/bspstart.c | 2 +-
> bsps/sparc/shared/start/bspgetworkarea.c | 66 +--
> bsps/sparc64/shared/start/linkcmds | 1 +
> bsps/v850/gdbv850sim/start/linkcmds | 1 +
> bsps/x86_64/amd64/start/linkcmds | 1 +
> cpukit/Makefile.am | 3 +
> cpukit/headers.am | 1 +
> cpukit/include/rtems/confdefs.h | 23 +-
> cpukit/include/rtems/malloc.h | 6 +-
> cpukit/include/rtems/score/memory.h | 340 +++++++++++++
> cpukit/include/rtems/score/wkspace.h | 9 +-
> cpukit/include/rtems/sysinit.h | 48 +-
> cpukit/libcsupport/src/malloc_initialize.c | 57 ++-
> cpukit/libmisc/stackchk/check.c | 4 +-
> cpukit/libtrace/record/record-sysinit.c | 2 +-
> cpukit/sapi/src/cpucounterconverter.c | 2 +-
> cpukit/sapi/src/exinit.c | 13 +
> cpukit/sapi/src/sysinitverbose.c | 557 +++++++++++++++++++++
> cpukit/score/src/memoryallocate.c | 67 +++
> cpukit/score/src/memorydirty.c | 48 ++
> cpukit/score/src/smp.c | 42 ++
> cpukit/score/src/wkspace.c | 123 +----
> testsuites/libtests/malloc04/init.c | 32 +-
> testsuites/smptests/smpfatal09/init.c | 33 +-
> testsuites/sptests/spfatal09/init.c | 34 +-
> testsuites/sptests/spfatal12/init.c | 30 +-
> testsuites/sptests/spsysinit01/init.c | 36 +-
> 110 files changed, 1742 insertions(+), 502 deletions(-)
> create mode 100644 cpukit/include/rtems/score/memory.h
> create mode 100644 cpukit/sapi/src/sysinitverbose.c
> create mode 100644 cpukit/score/src/memoryallocate.c
> create mode 100644 cpukit/score/src/memorydirty.c
>
> --
> Sebastian Huber, embedded brains GmbH
>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone : +49 89 189 47 41-16
> Fax : +49 89 189 47 41-09
> E-Mail : sebastian.huber at embedded-brains.de
> PGP : Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
More information about the devel
mailing list