diff options
Diffstat (limited to '')
-rw-r--r-- | spec/build/bsps/aarch64/raspberrypi/abi.yml | 19 | ||||
-rw-r--r-- | spec/build/bsps/aarch64/raspberrypi/bspraspberrypi4.yml | 74 | ||||
-rw-r--r-- | spec/build/bsps/aarch64/raspberrypi/linkercmds.yml | 76 | ||||
-rw-r--r-- | spec/build/bsps/aarch64/raspberrypi/objclock.yml | 31 | ||||
-rw-r--r-- | spec/build/bsps/aarch64/raspberrypi/objsystemtimer.yml | 23 | ||||
-rw-r--r-- | spec/build/bsps/aarch64/raspberrypi/optsystemtimer.yml | 25 |
6 files changed, 248 insertions, 0 deletions
diff --git a/spec/build/bsps/aarch64/raspberrypi/abi.yml b/spec/build/bsps/aarch64/raspberrypi/abi.yml new file mode 100644 index 0000000000..38a8d8bc8f --- /dev/null +++ b/spec/build/bsps/aarch64/raspberrypi/abi.yml @@ -0,0 +1,19 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +actions: +- get-string: null +- split: null +- env-append: null +build-type: option +copyrights: +- Copyright (C) 2022 Mohd Noor Aman +default: +- enabled-by: true + value: + - -mcpu=cortex-a72 + - -march=armv8-a +description: | + ABI flags +enabled-by: true +links: [] +name: ABI_FLAGS +type: build diff --git a/spec/build/bsps/aarch64/raspberrypi/bspraspberrypi4.yml b/spec/build/bsps/aarch64/raspberrypi/bspraspberrypi4.yml new file mode 100644 index 0000000000..7b6511a8cc --- /dev/null +++ b/spec/build/bsps/aarch64/raspberrypi/bspraspberrypi4.yml @@ -0,0 +1,74 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +arch: aarch64 +bsp: raspberrypi4b +build-type: bsp +cflags: [] +copyrights: +- Copyright (C) 2022 Mohd Noor Aman +cppflags: [] +enabled-by: true +family: raspberrypi +includes: [] +install: +- destination: ${BSP_INCLUDEDIR} + source: + - bsps/aarch64/raspberrypi/include/bsp.h + - bsps/aarch64/raspberrypi/include/tm27.h +- destination: ${BSP_INCLUDEDIR}/bsp + source: + - bsps/aarch64/raspberrypi/include/bsp/irq.h + - bsps/aarch64/raspberrypi/include/bsp/raspberrypi.h +links: +- role: build-dependency + uid: objclock +- role: build-dependency + uid: objsystemtimer +- role: build-dependency + uid: ../grp +- role: build-dependency + uid: ../start +- role: build-dependency + uid: ../optmmupages +- role: build-dependency + uid: ../optgtusevirt +- role: build-dependency + uid: ../optgtuseps +- role: build-dependency + uid: abi +- role: build-dependency + uid: ../../optcachedata +- role: build-dependency + uid: ../../optcacheinst +- role: build-dependency + uid: ../../opto2 +- role: build-dependency + uid: ../../bspopts +- role: build-dependency + uid: linkercmds +- role: build-dependency + uid: ../../obj +- role: build-dependency + uid: ../../objirq +source: +- bsps/aarch64/raspberrypi/console/console.c +- bsps/aarch64/raspberrypi/start/bspstart.c +- bsps/aarch64/raspberrypi/start/bspstarthooks.c +- bsps/aarch64/raspberrypi/start/bspstartmmu.c +- bsps/aarch64/shared/cache/cache.c +- bsps/aarch64/shared/mmu/vmsav8-64.c +- bsps/shared/dev/irq/arm-gicv2.c +- bsps/shared/dev/irq/arm-gicv2-get-attributes.c +- bsps/shared/dev/serial/console-termios-init.c +- bsps/shared/dev/serial/console-termios.c +- bsps/shared/dev/serial/arm-pl011.c +- bsps/shared/dev/getentropy/getentropy-cpucounter.c +- bsps/shared/dev/btimer/btimer-cpucounter.c +- bsps/shared/irq/irq-default-handler.c +- bsps/shared/start/bspfatal-default.c +- bsps/shared/start/bspreset-arm-psci.c +- bsps/shared/start/gettargethash-default.c +- bsps/shared/start/sbrk.c +- bsps/shared/start/wkspaceinitone.c +- bsps/shared/start/mallocinitmulti.c +- bsps/shared/start/bspgetworkarea-default.c +type: build diff --git a/spec/build/bsps/aarch64/raspberrypi/linkercmds.yml b/spec/build/bsps/aarch64/raspberrypi/linkercmds.yml new file mode 100644 index 0000000000..701f9f935c --- /dev/null +++ b/spec/build/bsps/aarch64/raspberrypi/linkercmds.yml @@ -0,0 +1,76 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +build-type: config-file +content: | + /* SPDX-License-Identifier: BSD-2-Clause */ + + /* + * Copyright (C) 2022 Mohd Noor Aman + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + + MEMORY { + RAM_MMU : ORIGIN = 0x0, LENGTH = (0x1000 * ${AARCH64_MMU_TRANSLATION_TABLE_PAGES}) + RAM : ORIGIN = 0x80000, LENGTH = 1024M + } + + REGION_ALIAS ("REGION_START", RAM); + REGION_ALIAS ("REGION_VECTOR", RAM); + REGION_ALIAS ("REGION_TEXT", RAM); + REGION_ALIAS ("REGION_TEXT_LOAD", RAM); + REGION_ALIAS ("REGION_RODATA", RAM); + REGION_ALIAS ("REGION_RODATA_LOAD", RAM); + REGION_ALIAS ("REGION_DATA", RAM); + REGION_ALIAS ("REGION_DATA_LOAD", RAM); + REGION_ALIAS ("REGION_FAST_TEXT", RAM); + REGION_ALIAS ("REGION_FAST_TEXT_LOAD", RAM); + REGION_ALIAS ("REGION_FAST_DATA", RAM); + REGION_ALIAS ("REGION_FAST_DATA_LOAD", RAM); + REGION_ALIAS ("REGION_BSS", RAM); + REGION_ALIAS ("REGION_WORK", RAM); + REGION_ALIAS ("REGION_STACK", RAM); + REGION_ALIAS ("REGION_NOCACHE", RAM); + REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM); + + bsp_stack_abt_size = DEFINED (bsp_stack_abt_size) ? bsp_stack_abt_size : 1024; + + bsp_section_rwbarrier_align = DEFINED (bsp_section_rwbarrier_align) ? bsp_section_rwbarrier_align : 1M; + + bsp_stack_exception_size = DEFINED (bsp_stack_exception_size) ? bsp_stack_exception_size : 1024; + + bsp_section_rwbarrier_align = DEFINED (bsp_section_rwbarrier_align) ? bsp_section_rwbarrier_align : 1M; + + bsp_vector_table_in_start_section = 1; + bsp_translation_table_base = ORIGIN (RAM_MMU); + bsp_translation_table_end = ORIGIN (RAM_MMU) + LENGTH (RAM_MMU); + + OUTPUT_FORMAT ("elf64-littleaarch64") + OUTPUT_ARCH (aarch64) + + INCLUDE linkcmds.base +copyrights: +- Copyright (C) 2022 Mohd Noor Aman +enabled-by: true +install-path: ${BSP_LIBDIR} +links: [] +target: linkcmds +type: build diff --git a/spec/build/bsps/aarch64/raspberrypi/objclock.yml b/spec/build/bsps/aarch64/raspberrypi/objclock.yml new file mode 100644 index 0000000000..24f61c93c4 --- /dev/null +++ b/spec/build/bsps/aarch64/raspberrypi/objclock.yml @@ -0,0 +1,31 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +copyrights: + - Copyright (C) 2022 Mohd Noor Aman + - Copyright (C) 2023 Utkarsh Verma + - Copyright (C) 2024 Ning Yang + +type: build +enabled-by: + not: BSP_CLOCK_USE_SYSTEMTIMER + +build-type: objects +cflags: [] +cppflags: [] +cxxflags: [] +includes: [] +install: +- destination: ${BSP_INCLUDEDIR}/dev/clock + source: + - bsps/include/dev/clock/arm-generic-timer.h + +source: + - bsps/aarch64/shared/clock/arm-generic-timer-aarch64.c + - bsps/shared/dev/clock/arm-generic-timer.c + +links: + - role: build-dependency + uid: ../optgtusevirt + - role: build-dependency + uid: ../optgtuseps + - role: build-dependency + uid: optsystemtimer
\ No newline at end of file diff --git a/spec/build/bsps/aarch64/raspberrypi/objsystemtimer.yml b/spec/build/bsps/aarch64/raspberrypi/objsystemtimer.yml new file mode 100644 index 0000000000..1ead15fdd5 --- /dev/null +++ b/spec/build/bsps/aarch64/raspberrypi/objsystemtimer.yml @@ -0,0 +1,23 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +copyrights: + - Copyright (C) 2024 Ning Yang + +type: build +enabled-by: +- BSP_CLOCK_USE_SYSTEMTIMER + +build-type: objects +cflags: [] +cppflags: [] +cxxflags: [] +includes: [] +install: [] + +source: + - bsps/shared/dev/clock/bcm2835-system-timer.c + - bsps/shared/dev/cpucounter/cpucounterfrequency.c + - bsps/shared/dev/cpucounter/cpucounterread.c + +links: + - role: build-dependency + uid: optsystemtimer
\ No newline at end of file diff --git a/spec/build/bsps/aarch64/raspberrypi/optsystemtimer.yml b/spec/build/bsps/aarch64/raspberrypi/optsystemtimer.yml new file mode 100644 index 0000000000..c20371ab8b --- /dev/null +++ b/spec/build/bsps/aarch64/raspberrypi/optsystemtimer.yml @@ -0,0 +1,25 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +copyrights: + - Copyright (C) 2024 Ning Yang + +type: build +build-type: option + +enabled-by: true +name: BSP_CLOCK_USE_SYSTEMTIMER +description: | + The clock from the ARM timer is derived from the system clock. This clock can + change dynamically e.g. if the system goes into reduced power or in low power + mode. Thus the clock speed adapts to the overall system performance + capabilities. For accurate timing it is recommended to use the system timers. + +actions: + - get-boolean: null + - define-condition: null + - env-enable: null +default: + - enabled-by: + - aarch64/raspberrypi4b + value: false + +links: []
\ No newline at end of file |