forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
arch: Cmake: Add __ZEPHYR_SUPERVISOR__ macro for arch files.
Normally a syscall would check the current privilege level and then decide to go to _impl_<syscall> directly or go through a _handler_<syscall>. __ZEPHYR_SUPERVISOR__ is a compiler optimization flag which will make all the system calls from the arch files directly link to the _impl_<syscall>. Thereby reducing the overhead of checking the privileges. In the previous implementation all the source files would be compiled by zephyr_source() rule. This means that zephyr_* is a catchall CMake library for source files that can be built purely with the include paths, defines, and other compiler flags that all zephyr source files uses. This states that adding one extra compiler flag for only one complete directory would fail. This limitation can be overcome by using zephyr_libray* APIs. This creates a library for the required directories and it also supports directory level properties. Hence we use zephyr_library* to create a new library with macro _ZEPHYR_SUPERVISOR_ for the optimization. Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
- Loading branch information
1 parent
8618716
commit 5ab3960
Showing
7 changed files
with
38 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
add_definitions(-D__ZEPHYR_SUPERVISOR__) | ||
|
||
add_subdirectory(common) | ||
add_subdirectory(${ARCH}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
zephyr_sources_if_kconfig(arc_core_mpu.c) | ||
zephyr_sources_if_kconfig(arc_mpu.c) | ||
zephyr_library_ifdef(CONFIG_ARC_CORE_MPU) | ||
|
||
zephyr_library_sources_if_kconfig(arc_core_mpu.c) | ||
zephyr_library_sources_if_kconfig(arc_mpu.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
zephyr_sources( | ||
zephyr_library() | ||
|
||
zephyr_library_sources( | ||
vector_table.S | ||
reset.S | ||
nmi_on_reset.S | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
zephyr_sources_ifdef(CONFIG_ARM_CORE_MPU arm_core_mpu.c) | ||
zephyr_sources_if_kconfig( arm_mpu.c) | ||
zephyr_sources_if_kconfig( nxp_mpu.c) | ||
zephyr_library_ifdef(CONFIG_ARM_CORE_MPU) | ||
|
||
zephyr_library_sources_ifdef(CONFIG_ARM_CORE_MPU arm_core_mpu.c) | ||
zephyr_library_sources_if_kconfig( arm_mpu.c) | ||
zephyr_library_sources_if_kconfig( nxp_mpu.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters