Skip to content

Commit

Permalink
Merge branch 'master' into arm_cache_ops_user_space
Browse files Browse the repository at this point in the history
  • Loading branch information
lsf37 authored Jun 16, 2024
2 parents cb4eac8 + 1df49ec commit 0f4b23d
Show file tree
Hide file tree
Showing 15 changed files with 447 additions and 196 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/sel4test-hw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# See sel4test-hw/builds.yml in the repo seL4/ci-actions for configs.

name: seL4Test HW
name: seL4Test-HW

on:
# needs PR target for secrets access; guard by requiring label
Expand All @@ -17,6 +17,12 @@ on:
permissions:
contents: read

# Cancel older runs of this workflow that are still not finished for the
# current PR. This reduces the CI load.
concurrency:
group: ${{ github.workflow }}-pr-${{ github.event.number }}
cancel-in-progress: true

jobs:
hw-build:
name: HW Build
Expand All @@ -33,11 +39,9 @@ jobs:
strategy:
fail-fast: false
matrix:
march: [armv7a, armv8a, nehalem]
# There is no "rv32imac" hardware yet.
march: [armv7a, armv8a, nehalem, rv64imac]
compiler: [gcc, clang]
include:
- march: rv64imac
compiler: gcc
steps:
- name: Build
uses: seL4/ci-actions/sel4test-hw@master
Expand All @@ -46,7 +50,7 @@ jobs:
compiler: ${{ matrix.compiler }}
sha: ${{ github.event.pull_request.head.sha }}
- name: Upload images
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: images-${{ matrix.march }}-${{ matrix.compiler }}
path: '*-images.tar.gz'
Expand Down Expand Up @@ -78,13 +82,12 @@ jobs:
matrix: ${{ fromJson(needs.the_matrix.outputs.matrix) }}
steps:
- name: Get machine queue
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: seL4/machine_queue
path: machine_queue
token: ${{ secrets.PRIV_REPO_TOKEN }}
- name: Download image
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: images-${{ matrix.march }}-${{ matrix.compiler }}
- name: Run
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/sel4test-sim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ on:
branches: [master]
pull_request:

# Cancel older runs of this workflow that are still not finished for the
# current PR. This reduces the CI load. For deployment to the master branch,
# the workflow will run on each push, but no cancellation happens here.
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || format('run-{0}', github.run_id) }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
simulation:
name: Simulation
Expand All @@ -21,11 +28,6 @@ jobs:
matrix:
march: [armv7a, armv8a, nehalem, rv32imac, rv64imac]
compiler: [gcc, clang]
exclude:
- march: rv32imac
compiler: clang
- march: rv64imac
compiler: clang
steps:
- uses: seL4/ci-actions/sel4test-sim@master
with:
Expand Down
5 changes: 5 additions & 0 deletions apps/sel4test-driver/include/test_init_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ typedef struct {
/* sched control cap */
seL4_CPtr sched_ctrl;

#ifdef CONFIG_ALLOW_SMC_CALLS
/* smc cap */
seL4_CPtr smc;
#endif /* CONFIG_ALLOW_SMC_CALLS */

/* device frame cap */
seL4_CPtr device_frame_cap;

Expand Down
1 change: 0 additions & 1 deletion apps/sel4test-driver/src/tests/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ static int test_callback(uintptr_t token)

int test_timer(driver_env_t env)
{
uint64_t time = 0;
test_finished = false;
timer_test_data_t test_data = { .goal_count = 3 };

Expand Down
5 changes: 5 additions & 0 deletions apps/sel4test-driver/src/testtypes.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,11 @@ void basic_set_up(uintptr_t e)
sel4utils_copy_cap_to_process(&(env->test_process), &env->vka, sched_ctrl);
}
}
#ifdef CONFIG_ALLOW_SMC_CALLS
env->init->smc = sel4utils_copy_cap_to_process(&(env->test_process), &env->vka, simple_get_init_cap(&env->simple,
seL4_CapSMC));
#endif /* CONFIG_ALLOW_SMC_CALLS */

/* setup data about untypeds */
env->init->untypeds = copy_untypeds_to_process(&(env->test_process), env->untypeds, env->num_untypeds, env);
/* copy the fault endpoint - we wait on the endpoint for a message
Expand Down
2 changes: 1 addition & 1 deletion apps/sel4test-driver/src/timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#define TIMER_ID 0

/* Timing related functions used only by in sel4test-driver */
/* Timing related functions used only within sel4test-driver */
void handle_timer_interrupts(driver_env_t env, seL4_Word badge);
void wait_for_timer_interrupt(driver_env_t env);
void timeout(driver_env_t env, uint64_t ns, timeout_type_t timeout);
Expand Down
9 changes: 9 additions & 0 deletions apps/sel4test-tests/arch/arm/arch/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,21 @@
*/
#pragma once

#ifdef CONFIG_ARCH_AARCH32
#define TEST_SOFTWARE_BREAK_ASM() \
asm volatile( \
".global sbreak, post_sbreak\n\t" \
".type post_sbreak, function\n\t" \
"sbreak:\n\t" \
"bkpt\n\t")
#elif CONFIG_ARCH_AARCH64
#define TEST_SOFTWARE_BREAK_ASM() \
asm volatile( \
".global sbreak, post_sbreak\n\t" \
".type post_sbreak, function\n\t" \
"sbreak:\n\t" \
"brk #0\n\t")
#endif

/* Tell C about the symbols exported by the ASM above. */
extern char sbreak;
Expand Down
172 changes: 0 additions & 172 deletions apps/sel4test-tests/src/arch/x86/tests/breakpoints.c

This file was deleted.

6 changes: 5 additions & 1 deletion apps/sel4test-tests/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,14 @@ static void init_allocator(env_t env, test_init_data_t *init_data)
arch_init_allocator(env, init_data);

/* create a vspace */
void *existing_frames[init_data->stack_pages + 2];
void *existing_frames[init_data->stack_pages + 3];
existing_frames[0] = (void *) init_data;
existing_frames[1] = seL4_GetIPCBuffer();
assert(init_data->stack_pages > 0);
for (int i = 0; i < init_data->stack_pages; i++) {
existing_frames[i + 2] = init_data->stack + (i * PAGE_SIZE_4K);
}
existing_frames[init_data->stack_pages + 2] = NULL;

error = sel4utils_bootstrap_vspace(&env->vspace, &alloc_data, init_data->page_directory, &env->vka,
NULL, NULL, existing_frames);
Expand Down Expand Up @@ -197,6 +198,9 @@ int main(int argc, char **argv)
env.asid_pool = init_data->asid_pool;
env.asid_ctrl = init_data->asid_ctrl;
env.sched_ctrl = init_data->sched_ctrl;
#ifdef CONFIG_ALLOW_SMC_CALLS
env.smc = init_data->smc;
#endif
#ifdef CONFIG_IOMMU
env.io_space = init_data->io_space;
#endif
Expand Down
Loading

0 comments on commit 0f4b23d

Please sign in to comment.