test: Add arm64_high_addresses test
Latel we have had several failures and regressions due to the setting of CONFIG_SRAM_BASE_ADDRESS to really high values (over the 4GB boundary). To try to catch these problems as early as possible we add a build-only test based on the hello_world_user sample that tries to compile the test using a combination of CONFIG_SRAM_BASE_ADDRESS and CONFIG_KERNEL_VM_BASE set to high values in memory. Signed-off-by: Carlo Caione <ccaione@baylibre.com>
This commit is contained in:
parent
010b448454
commit
0f3d2d9230
4 changed files with 64 additions and 0 deletions
8
tests/arch/arm64/arm64_high_addresses/CMakeLists.txt
Normal file
8
tests/arch/arm64/arm64_high_addresses/CMakeLists.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
cmake_minimum_required(VERSION 3.20.0)
|
||||
|
||||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
||||
project(arm64_high_addresses)
|
||||
|
||||
target_sources(app PRIVATE src/main.c)
|
6
tests/arch/arm64/arm64_high_addresses/prj.conf
Normal file
6
tests/arch/arm64/arm64_high_addresses/prj.conf
Normal file
|
@ -0,0 +1,6 @@
|
|||
CONFIG_USERSPACE=y
|
||||
CONFIG_APPLICATION_DEFINED_SYSCALL=y
|
||||
CONFIG_ASSERT=y
|
||||
CONFIG_LOG=y
|
||||
CONFIG_LOG_MODE_MINIMAL=y
|
||||
CONFIG_MAIN_STACK_SIZE=2560
|
25
tests/arch/arm64/arm64_high_addresses/src/main.c
Normal file
25
tests/arch/arm64/arm64_high_addresses/src/main.c
Normal file
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright (c) 2020 BayLibre, SAS
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr.h>
|
||||
#include <stdio.h>
|
||||
#define USER_STACKSIZE 2048
|
||||
|
||||
struct k_thread user_thread;
|
||||
K_THREAD_STACK_DEFINE(user_stack, USER_STACKSIZE);
|
||||
|
||||
static void user_function(void *p1, void *p2, void *p3)
|
||||
{
|
||||
printf("Hello World from UserSpace! %s\n", CONFIG_BOARD);
|
||||
}
|
||||
|
||||
|
||||
void main(void)
|
||||
{
|
||||
k_thread_create(&user_thread, user_stack, USER_STACKSIZE,
|
||||
user_function, NULL, NULL, NULL,
|
||||
-1, K_USER, K_MSEC(0));
|
||||
}
|
25
tests/arch/arm64/arm64_high_addresses/testcase.yaml
Normal file
25
tests/arch/arm64/arm64_high_addresses/testcase.yaml
Normal file
|
@ -0,0 +1,25 @@
|
|||
common:
|
||||
arch_allow: arm64
|
||||
tags: arm userspace
|
||||
build_only: true
|
||||
|
||||
tests:
|
||||
arch.arm64.high_addr.high_sram_low_vm:
|
||||
extra_configs:
|
||||
- CONFIG_SRAM_BASE_ADDRESS=0x200880000
|
||||
- CONFIG_KERNEL_VM_BASE=0x00400000
|
||||
|
||||
arch.arm64.high_addr.low_sram_high_vm:
|
||||
extra_configs:
|
||||
- CONFIG_SRAM_BASE_ADDRESS=0x00400000
|
||||
- CONFIG_KERNEL_VM_BASE=0x200880000
|
||||
|
||||
arch.arm64.high_addr.high_sram_equal_vm:
|
||||
extra_configs:
|
||||
- CONFIG_SRAM_BASE_ADDRESS=0x200880000
|
||||
- CONFIG_KERNEL_VM_BASE=0x200880000
|
||||
|
||||
arch.arm64.high_addr.high_sram_high_vm:
|
||||
extra_configs:
|
||||
- CONFIG_SRAM_BASE_ADDRESS=0x200880000
|
||||
- CONFIG_KERNEL_VM_BASE=0x200800000
|
Loading…
Add table
Add a link
Reference in a new issue