build: namespace the generated headers with zephyr/
Namespaced the generated headers with `zephyr` to prevent potential conflict with other headers. Introduce a temporary Kconfig `LEGACY_GENERATED_INCLUDE_PATH` that is enabled by default. This allows the developers to continue the use of the old include paths for the time being until it is deprecated and eventually removed. The Kconfig will generate a build-time warning message, similar to the `CONFIG_TIMER_RANDOM_GENERATOR`. Updated the includes path of in-tree sources accordingly. Most of the changes here are scripted, check the PR for more info. Signed-off-by: Yong Cong Sin <ycsin@meta.com>
This commit is contained in:
parent
d034106b40
commit
bbe5e1e6eb
294 changed files with 770 additions and 726 deletions
|
@ -415,7 +415,7 @@ static inline void z_vrfy_test_arm_user_interrupt_syscall(void)
|
|||
{
|
||||
z_impl_test_arm_user_interrupt_syscall();
|
||||
}
|
||||
#include <syscalls/test_arm_user_interrupt_syscall_mrsh.c>
|
||||
#include <zephyr/syscalls/test_arm_user_interrupt_syscall_mrsh.c>
|
||||
|
||||
ZTEST_USER(arm_interrupt, test_arm_user_interrupt)
|
||||
{
|
||||
|
|
|
@ -10,6 +10,6 @@
|
|||
|
||||
__syscall void test_arm_user_interrupt_syscall(void);
|
||||
|
||||
#include <syscalls/test_syscalls.h>
|
||||
#include <zephyr/syscalls/test_syscalls.h>
|
||||
|
||||
#endif /* _TEST_SYSCALLS_H_ */
|
||||
|
|
|
@ -66,7 +66,7 @@ static inline void z_vrfy_test_arm_user_syscall(void)
|
|||
{
|
||||
z_impl_test_arm_user_syscall();
|
||||
}
|
||||
#include <syscalls/test_arm_user_syscall_mrsh.c>
|
||||
#include <zephyr/syscalls/test_arm_user_syscall_mrsh.c>
|
||||
|
||||
|
||||
void arm_isr_handler(const void *args)
|
||||
|
@ -271,7 +271,7 @@ static inline void z_vrfy_test_arm_cpu_write_reg(void)
|
|||
{
|
||||
z_impl_test_arm_cpu_write_reg();
|
||||
}
|
||||
#include <syscalls/test_arm_cpu_write_reg_mrsh.c>
|
||||
#include <zephyr/syscalls/test_arm_cpu_write_reg_mrsh.c>
|
||||
|
||||
/**
|
||||
* @brief Test CPU scrubs registers after system call
|
||||
|
|
|
@ -11,6 +11,6 @@
|
|||
__syscall void test_arm_user_syscall(void);
|
||||
__syscall void test_arm_cpu_write_reg(void);
|
||||
|
||||
#include <syscalls/test_syscalls.h>
|
||||
#include <zephyr/syscalls/test_syscalls.h>
|
||||
|
||||
#endif /* _TEST_SYSCALLS_H_ */
|
||||
|
|
|
@ -54,7 +54,7 @@ static inline void z_vrfy_test_cpu_write_reg(void)
|
|||
{
|
||||
z_impl_test_cpu_write_reg();
|
||||
}
|
||||
#include <syscalls/test_cpu_write_reg_mrsh.c>
|
||||
#include <zephyr/syscalls/test_cpu_write_reg_mrsh.c>
|
||||
|
||||
/**
|
||||
* @brief Test CPU scrubs registers after system call
|
||||
|
|
|
@ -10,6 +10,6 @@
|
|||
|
||||
__syscall void test_cpu_write_reg(void);
|
||||
|
||||
#include <syscalls/test_syscalls.h>
|
||||
#include <zephyr/syscalls/test_syscalls.h>
|
||||
|
||||
#endif /* _TEST_SYSCALLS_H_ */
|
||||
|
|
|
@ -238,7 +238,7 @@ void z_vrfy_dump_my_ptables(void)
|
|||
{
|
||||
z_impl_dump_my_ptables();
|
||||
}
|
||||
#include <syscalls/dump_my_ptables_mrsh.c>
|
||||
#include <zephyr/syscalls/dump_my_ptables_mrsh.c>
|
||||
#endif /* CONFIG_USERSPACE */
|
||||
|
||||
void dump_pagetables(void)
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
|
||||
__syscall void dump_my_ptables(void);
|
||||
|
||||
#include <syscalls/main.h>
|
||||
#include <zephyr/syscalls/main.h>
|
||||
|
||||
#endif
|
||||
|
|
|
@ -95,7 +95,7 @@ static timing_t z_vrfy_timing_timestamp_get(void)
|
|||
return z_impl_timing_timestamp_get();
|
||||
}
|
||||
|
||||
#include <syscalls/timing_timestamp_get_mrsh.c>
|
||||
#include <zephyr/syscalls/timing_timestamp_get_mrsh.c>
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
|
@ -126,6 +126,6 @@ extern struct k_mem_slab MAP1;
|
|||
__syscall void test_thread_priority_set(k_tid_t thread, int prio);
|
||||
__syscall timing_t timing_timestamp_get(void);
|
||||
|
||||
#include <syscalls/master.h>
|
||||
#include <zephyr/syscalls/master.h>
|
||||
|
||||
#endif /* _MASTER_H */
|
||||
|
|
|
@ -32,7 +32,7 @@ static inline int z_vrfy_dummy_syscall(void)
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
#include <syscalls/dummy_syscall_mrsh.c>
|
||||
#include <zephyr/syscalls/dummy_syscall_mrsh.c>
|
||||
|
||||
int z_impl_validation_overhead_syscall(void)
|
||||
{
|
||||
|
@ -47,7 +47,7 @@ static inline int z_vrfy_validation_overhead_syscall(void)
|
|||
|
||||
return status_0 || status_1;
|
||||
}
|
||||
#include <syscalls/validation_overhead_syscall_mrsh.c>
|
||||
#include <zephyr/syscalls/validation_overhead_syscall_mrsh.c>
|
||||
|
||||
|
||||
void test_drop_to_user_mode_1(void *p1, void *p2, void *p3)
|
||||
|
|
|
@ -10,6 +10,6 @@
|
|||
__syscall int dummy_syscall(void);
|
||||
__syscall int validation_overhead_syscall(void);
|
||||
|
||||
#include <syscalls/userspace.h>
|
||||
#include <zephyr/syscalls/userspace.h>
|
||||
|
||||
#endif /* _USERSPACE_H_ */
|
||||
|
|
|
@ -29,7 +29,7 @@ timing_t z_vrfy_timing_timestamp_get(void)
|
|||
{
|
||||
return z_impl_timing_timestamp_get();
|
||||
}
|
||||
#include <syscalls/timing_timestamp_get_mrsh.c>
|
||||
#include <zephyr/syscalls/timing_timestamp_get_mrsh.c>
|
||||
#endif
|
||||
|
||||
static void start_thread_entry(void *p1, void *p2, void *p3)
|
||||
|
|
|
@ -16,6 +16,6 @@ __syscall timing_t timing_timestamp_get(void);
|
|||
void timestamp_overhead_init(uint32_t num_iterations);
|
||||
uint64_t timestamp_overhead_adjustment(uint32_t options1, uint32_t options2);
|
||||
|
||||
#include <syscalls/timing_sc.h>
|
||||
#include <zephyr/syscalls/timing_sc.h>
|
||||
|
||||
#endif
|
||||
|
|
|
@ -27,4 +27,8 @@ include(${ZEPHYR_BASE}/cmake/modules/version.cmake)
|
|||
file(READ ${ZEPHYR_BASE}/version.h.in version_content)
|
||||
string(CONFIGURE "${version_content}" version_content)
|
||||
string(CONFIGURE "${version_content}" version_content)
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/zephyr/include/generated/mcuboot_version.h "${version_content}")
|
||||
file(
|
||||
WRITE
|
||||
${CMAKE_CURRENT_BINARY_DIR}/zephyr/include/generated/zephyr/mcuboot_version.h
|
||||
"${version_content}"
|
||||
)
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include <zephyr/settings/settings.h>
|
||||
#include <bootutil/boot_status.h>
|
||||
#include <bootutil/image.h>
|
||||
#include <mcuboot_version.h>
|
||||
#include <zephyr/mcuboot_version.h>
|
||||
|
||||
#define FLASH_SECTOR_SIZE 1024
|
||||
#define FLASH_SECTOR_SIZE_KB 4
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <zephyr/ztest.h>
|
||||
#include <zephyr/kernel_version.h>
|
||||
#include <zephyr/sys/speculation.h>
|
||||
#include "version.h"
|
||||
#include <zephyr/version.h>
|
||||
|
||||
/**
|
||||
* @defgroup kernel_common_tests Common Tests
|
||||
|
|
|
@ -225,7 +225,7 @@ static inline void z_vrfy_blow_up_priv_stack(void)
|
|||
{
|
||||
z_impl_blow_up_priv_stack();
|
||||
}
|
||||
#include <syscalls/blow_up_priv_stack_mrsh.c>
|
||||
#include <zephyr/syscalls/blow_up_priv_stack_mrsh.c>
|
||||
|
||||
#endif /* CONFIG_USERSPACE */
|
||||
#endif /* CONFIG_STACK_SENTINEL */
|
||||
|
|
|
@ -10,6 +10,6 @@
|
|||
|
||||
__syscall void blow_up_priv_stack(void);
|
||||
|
||||
#include <syscalls/test_syscalls.h>
|
||||
#include <zephyr/syscalls/test_syscalls.h>
|
||||
|
||||
#endif /* _TEST_SYSCALLS_H_ */
|
||||
|
|
|
@ -132,7 +132,7 @@ static inline struct k_heap *z_vrfy_ret_resource_pool_ptr(void)
|
|||
{
|
||||
return z_impl_ret_resource_pool_ptr();
|
||||
}
|
||||
#include <syscalls/ret_resource_pool_ptr_mrsh.c>
|
||||
#include <zephyr/syscalls/ret_resource_pool_ptr_mrsh.c>
|
||||
struct k_heap *child_heap_mem_ptr;
|
||||
struct k_heap *parent_heap_mem_ptr;
|
||||
|
||||
|
|
|
@ -93,6 +93,6 @@ static inline void set_fault_valid(bool valid)
|
|||
|
||||
__syscall struct k_heap *ret_resource_pool_ptr(void);
|
||||
|
||||
#include <syscalls/mem_protect.h>
|
||||
#include <zephyr/syscalls/mem_protect.h>
|
||||
|
||||
#endif /* _TEST_SYSCALLS_H_ */
|
||||
|
|
|
@ -63,7 +63,7 @@ static inline size_t z_vrfy_string_nlen(char *src, size_t maxlen, int *err)
|
|||
|
||||
return ret;
|
||||
}
|
||||
#include <syscalls/string_nlen_mrsh.c>
|
||||
#include <zephyr/syscalls/string_nlen_mrsh.c>
|
||||
|
||||
int z_impl_string_alloc_copy(char *src)
|
||||
{
|
||||
|
@ -89,7 +89,7 @@ static inline int z_vrfy_string_alloc_copy(char *src)
|
|||
|
||||
return ret;
|
||||
}
|
||||
#include <syscalls/string_alloc_copy_mrsh.c>
|
||||
#include <zephyr/syscalls/string_alloc_copy_mrsh.c>
|
||||
|
||||
int z_impl_string_copy(char *src)
|
||||
{
|
||||
|
@ -110,7 +110,7 @@ static inline int z_vrfy_string_copy(char *src)
|
|||
|
||||
return z_impl_string_copy(kernel_buf);
|
||||
}
|
||||
#include <syscalls/string_copy_mrsh.c>
|
||||
#include <zephyr/syscalls/string_copy_mrsh.c>
|
||||
|
||||
/* Not actually used, but will copy wrong string if called by mistake instead
|
||||
* of the handler
|
||||
|
@ -125,7 +125,7 @@ static inline int z_vrfy_to_copy(char *dest)
|
|||
{
|
||||
return k_usermode_to_copy((char *)dest, user_string, BUF_SIZE);
|
||||
}
|
||||
#include <syscalls/to_copy_mrsh.c>
|
||||
#include <zephyr/syscalls/to_copy_mrsh.c>
|
||||
|
||||
int z_impl_syscall_arg64(uint64_t arg)
|
||||
{
|
||||
|
@ -139,7 +139,7 @@ static inline int z_vrfy_syscall_arg64(uint64_t arg)
|
|||
{
|
||||
return z_impl_syscall_arg64(arg);
|
||||
}
|
||||
#include <syscalls/syscall_arg64_mrsh.c>
|
||||
#include <zephyr/syscalls/syscall_arg64_mrsh.c>
|
||||
|
||||
/* Bigger 64 bit arg syscall to exercise marshalling 7+ words of
|
||||
* arguments (this one happens to need 9), and to test generation of
|
||||
|
@ -166,7 +166,7 @@ static inline uint64_t z_vrfy_syscall_arg64_big(uint32_t arg1, uint32_t arg2,
|
|||
{
|
||||
return z_impl_syscall_arg64_big(arg1, arg2, arg3, arg4, arg5, arg6);
|
||||
}
|
||||
#include <syscalls/syscall_arg64_big_mrsh.c>
|
||||
#include <zephyr/syscalls/syscall_arg64_big_mrsh.c>
|
||||
|
||||
uint32_t z_impl_more_args(uint32_t arg1, uint32_t arg2, uint32_t arg3,
|
||||
uint32_t arg4, uint32_t arg5, uint32_t arg6,
|
||||
|
@ -190,7 +190,7 @@ static inline uint32_t z_vrfy_more_args(uint32_t arg1, uint32_t arg2,
|
|||
{
|
||||
return z_impl_more_args(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
|
||||
}
|
||||
#include <syscalls/more_args_mrsh.c>
|
||||
#include <zephyr/syscalls/more_args_mrsh.c>
|
||||
|
||||
/**
|
||||
* @brief Test to demonstrate usage of k_usermode_string_nlen()
|
||||
|
@ -417,7 +417,7 @@ static inline bool z_vrfy_syscall_context(void)
|
|||
{
|
||||
return z_impl_syscall_context();
|
||||
}
|
||||
#include <syscalls/syscall_context_mrsh.c>
|
||||
#include <zephyr/syscalls/syscall_context_mrsh.c>
|
||||
|
||||
void test_syscall_context_user(void *p1, void *p2, void *p3)
|
||||
{
|
||||
|
|
|
@ -27,6 +27,6 @@ __syscall uint32_t more_args(uint32_t arg1, uint32_t arg2, uint32_t arg3,
|
|||
uint32_t arg4, uint32_t arg5, uint32_t arg6,
|
||||
uint32_t arg7);
|
||||
|
||||
#include <syscalls/test_syscalls.h>
|
||||
#include <zephyr/syscalls/test_syscalls.h>
|
||||
|
||||
#endif /* _TEST_SYSCALLS_H_ */
|
||||
|
|
|
@ -1009,7 +1009,7 @@ static inline void z_vrfy_check_syscall_context(void)
|
|||
{
|
||||
return z_impl_check_syscall_context();
|
||||
}
|
||||
#include <syscalls/check_syscall_context_mrsh.c>
|
||||
#include <zephyr/syscalls/check_syscall_context_mrsh.c>
|
||||
|
||||
ZTEST_USER(userspace, test_syscall_context)
|
||||
{
|
||||
|
|
|
@ -10,6 +10,6 @@
|
|||
__syscall void missing_syscall(void);
|
||||
__syscall void check_syscall_context(void);
|
||||
|
||||
#include <syscalls/test_syscall.h>
|
||||
#include <zephyr/syscalls/test_syscall.h>
|
||||
|
||||
#endif
|
||||
|
|
|
@ -156,7 +156,7 @@ ZTEST(thread_dynamic, test_thread_index_management)
|
|||
|
||||
switch (K_OBJ_THREAD) {
|
||||
/** @cond keep_doxygen_away */
|
||||
#include <otype-to-size.h>
|
||||
#include <zephyr/otype-to-size.h>
|
||||
/** @endcond */
|
||||
}
|
||||
blob = k_object_create_dynamic_aligned(16, ret);
|
||||
|
|
|
@ -46,7 +46,7 @@ static inline void z_vrfy_stack_info_get(char **start_addr,
|
|||
|
||||
z_impl_stack_info_get(start_addr, size);
|
||||
}
|
||||
#include <syscalls/stack_info_get_mrsh.c>
|
||||
#include <zephyr/syscalls/stack_info_get_mrsh.c>
|
||||
|
||||
int z_impl_check_perms(void *addr, size_t size, int write)
|
||||
{
|
||||
|
@ -57,7 +57,7 @@ static inline int z_vrfy_check_perms(void *addr, size_t size, int write)
|
|||
{
|
||||
return z_impl_check_perms((void *)addr, size, write);
|
||||
}
|
||||
#include <syscalls/check_perms_mrsh.c>
|
||||
#include <zephyr/syscalls/check_perms_mrsh.c>
|
||||
#endif /* CONFIG_USERSPACE */
|
||||
|
||||
/* Global data structure with object information, used by
|
||||
|
|
|
@ -11,6 +11,6 @@ __syscall void stack_info_get(char **start_addr, size_t *size);
|
|||
#ifdef CONFIG_USERSPACE
|
||||
__syscall int check_perms(void *addr, size_t size, int write);
|
||||
#endif
|
||||
#include <syscalls/test_syscall.h>
|
||||
#include <zephyr/syscalls/test_syscall.h>
|
||||
|
||||
#endif
|
||||
|
|
|
@ -18,5 +18,5 @@ __syscall int foo(int bar);
|
|||
}
|
||||
#endif
|
||||
|
||||
#include <syscalls/app_api.h>
|
||||
#include <zephyr/syscalls/app_api.h>
|
||||
#endif /* _TEST_EDK_H_ */
|
||||
|
|
|
@ -19,5 +19,5 @@ static inline int z_vrfy_foo(int bar)
|
|||
/* Nothing to verify */
|
||||
return z_impl_foo(bar);
|
||||
}
|
||||
#include <syscalls/foo_mrsh.c>
|
||||
#include <zephyr/syscalls/foo_mrsh.c>
|
||||
#endif
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include <zephyr/ztest.h>
|
||||
#include <zephyr/bindesc.h>
|
||||
#include <version.h>
|
||||
#include <zephyr/version.h>
|
||||
|
||||
#define STR_ID 1
|
||||
#define UINT_ID 2
|
||||
|
|
|
@ -16,4 +16,4 @@ __syscall int ext_syscall_ok(int a);
|
|||
*/
|
||||
__syscall void ext_syscall_fail(void);
|
||||
|
||||
#include <syscalls/syscalls_ext.h>
|
||||
#include <zephyr/syscalls/syscalls_ext.h>
|
||||
|
|
|
@ -61,7 +61,7 @@ static inline int z_vrfy_ext_syscall_ok(int a)
|
|||
{
|
||||
return z_impl_ext_syscall_ok(a);
|
||||
}
|
||||
#include <syscalls/ext_syscall_ok_mrsh.c>
|
||||
#include <zephyr/syscalls/ext_syscall_ok_mrsh.c>
|
||||
#endif /* CONFIG_USERSPACE */
|
||||
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ static inline void z_vrfy_test_helpers_log_setup(void)
|
|||
{
|
||||
return z_impl_test_helpers_log_setup();
|
||||
}
|
||||
#include <syscalls/test_helpers_log_setup_mrsh.c>
|
||||
#include <zephyr/syscalls/test_helpers_log_setup_mrsh.c>
|
||||
#endif
|
||||
|
||||
int z_impl_test_helpers_cycle_get(void)
|
||||
|
@ -44,7 +44,7 @@ static inline int z_vrfy_test_helpers_cycle_get(void)
|
|||
{
|
||||
return z_impl_test_helpers_cycle_get();
|
||||
}
|
||||
#include <syscalls/test_helpers_cycle_get_mrsh.c>
|
||||
#include <zephyr/syscalls/test_helpers_cycle_get_mrsh.c>
|
||||
#endif
|
||||
|
||||
bool z_impl_test_helpers_log_dropped_pending(void)
|
||||
|
@ -57,5 +57,5 @@ static inline bool z_vrfy_test_helpers_log_dropped_pending(void)
|
|||
{
|
||||
return z_impl_test_helpers_log_dropped_pending();
|
||||
}
|
||||
#include <syscalls/test_helpers_log_dropped_pending_mrsh.c>
|
||||
#include <zephyr/syscalls/test_helpers_log_dropped_pending_mrsh.c>
|
||||
#endif
|
||||
|
|
|
@ -12,6 +12,6 @@ __syscall void test_helpers_log_setup(void);
|
|||
__syscall int test_helpers_cycle_get(void);
|
||||
__syscall bool test_helpers_log_dropped_pending(void);
|
||||
|
||||
#include <syscalls/test_helpers.h>
|
||||
#include <zephyr/syscalls/test_helpers.h>
|
||||
|
||||
#endif /* SRC_TEST_HELPERS_H__ */
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include <zcbor_decode.h>
|
||||
#include <zcbor_encode.h>
|
||||
#include <mgmt/mcumgr/util/zcbor_bulk.h>
|
||||
#include <version.h>
|
||||
#include <zephyr/version.h>
|
||||
#include <string.h>
|
||||
#include <smp_internal.h>
|
||||
#include "smp_test_util.h"
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include <zcbor_decode.h>
|
||||
#include <zcbor_encode.h>
|
||||
#include <mgmt/mcumgr/util/zcbor_bulk.h>
|
||||
#include <version.h>
|
||||
#include <zephyr/version.h>
|
||||
#include <smp_internal.h>
|
||||
#include "smp_test_util.h"
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include <zcbor_decode.h>
|
||||
#include <zcbor_encode.h>
|
||||
#include <mgmt/mcumgr/util/zcbor_bulk.h>
|
||||
#include <version.h>
|
||||
#include <zephyr/version.h>
|
||||
#include <string.h>
|
||||
#include <smp_internal.h>
|
||||
#include "smp_test_util.h"
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include <zcbor_decode.h>
|
||||
#include <zcbor_encode.h>
|
||||
#include <mgmt/mcumgr/util/zcbor_bulk.h>
|
||||
#include <version.h>
|
||||
#include <zephyr/version.h>
|
||||
#include <string.h>
|
||||
#include <smp_internal.h>
|
||||
#include "smp_test_util.h"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <version.h>
|
||||
#include <zephyr/version.h>
|
||||
|
||||
#include <zephyr/device.h>
|
||||
#include <zephyr/devicetree.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue