Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/test-bkao.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Bao Kao Testing Framework

on:
push:
branches: [ main ]
pull_request:
workflow_dispatch:


jobs:

run-tests:
runs-on: ubuntu-latest
container:
image: baoproject/bao:latest
options: --user root
strategy:
matrix:
platform: [
"qemu-aarch64-virt",
"qemu-riscv64-virt",
"fvp-a",
"fvp-r"
]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Mark workspace as safe for Git
run: git config --global --add safe.directory $GITHUB_WORKSPACE

- name: Checkout private benchmarks submodule
env:
TOKEN: ${{ secrets.BENCHMARKS_TOKEN }}
run: |
git config --global url."https://x-access-token:${TOKEN}@github.com/".insteadOf "git@github.com:"
git submodule update --init tests/benchs

- name: Run bao kao tests
run: make tests PLATFORM=${{ matrix.platform }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
bin/*
build/*
**/wrkdir/
*.o
*.elf
*.bin
Expand Down
7 changes: 7 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
[submodule "ci"]
path = ci
url = git@github.com:bao-project/bao-ci.git
[submodule "tests/kao"]
path = tests/kao
url = git@github.com:bao-project/bao-kao.git
[submodule "tests/benchs"]
path = tests/benchs
url = git@github.com:osyxtechnologies/bao-benchmarks.git
update = none
18 changes: 17 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ configs_dir=$(cur_dir)/configs
CONFIG_REPO?=$(configs_dir)
scripts_dir:=$(cur_dir)/scripts
ci_dir:=$(cur_dir)/ci
tests_dir:=$(cur_dir)/tests
kao_dir:=$(tests_dir)/kao/src
src_dirs:=

-include $(ci_dir)/ci.mk
Expand All @@ -76,7 +78,7 @@ targets:=$(MAKECMDGOALS)
ifeq ($(targets),)
targets:=all
endif
non_build_targets+=ci clean
non_build_targets+=ci clean tests benchs
build_targets:=$(strip $(foreach target, $(targets), \
$(if $(findstring $(target),$(non_build_targets)),,$(target))))

Expand Down Expand Up @@ -437,3 +439,17 @@ $(call ci, format, $(all_c_files))
ci: license-check format-check

endif

-include $(tests_dir)/tests.mk

.PHONY: tests

tests:
@echo "Running bao-kao tests for $(PLATFORM)..."
@python3 $(kao_dir)/kao.py -t -p $(PLATFORM)

.PHONY: benchs

benchs:
@echo "Running bao-kao benchmarks for $(PLATFORM)..."
@python3 $(kao_dir)/kao.py -b -p $(PLATFORM)
1 change: 1 addition & 0 deletions tests/benchs
Submodule benchs added at a9db83
1 change: 1 addition & 0 deletions tests/kao
Submodule kao added at 8b5fc4
28 changes: 28 additions & 0 deletions tests/tests/configs/baremetal/fvp-a.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Bao Hypervisor VM Configuration
# This YAML describes the fields needed to generate a C config file (config.c)

vms:
- vm1:
name: "baremetal"
build_options: ""
config:
image:
base_addr: 0x90000000
entry: 0x90000000
platform:
cpu_num: 4
regions:
- base: 0x90000000
size: 0x4000000
devs:
- pa: 0x1c090000
va: 0x1c090000
size: 0x10000
interrupts:
- 37
- interrupts:
- 27
arch:
gic:
gicd_addr: 0x2F000000
gicr_addr: 0x2F100000
30 changes: 30 additions & 0 deletions tests/tests/configs/baremetal/fvp-r.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Bao Hypervisor VM Configuration
# This YAML describes the fields needed to generate a C config file (config.c)

vms:
- vm1:
name: "baremetal"
build_options: "MEM_BASE=0x10000000"
config:
image:
load_addr: 0x10000000
phys_addr: 0x10000000
size: 102400
entry: 0x10000000
platform:
cpu_num: 4
regions:
- base: 0x10000000
size: 0x4000000
devs:
- pa: 0x9c0A0000
va: 0x9c0A0000
size: 0x10000
interrupts:
- 38
- interrupts:
- 27
arch:
gic:
gicd_addr: 0xAF000000
gicr_addr: 0xAF100000
30 changes: 30 additions & 0 deletions tests/tests/configs/baremetal/qemu-aarch64-virt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@


# Bao Hypervisor VM Configuration
# This YAML describes the fields needed to generate a C config file (config.c)

vms:
- vm1:
name: "baremetal"
build_options:
config:
image:
base_addr: 0x50000000
entry: 0x50000000
platform:
cpu_num: 4
regions:
- base: 0x50000000
size: 0x4000000
devs:
- pa: 0x9000000
va: 0x9000000
size: 0x10000
interrupts:
- 33
- interrupts:
- 27
arch:
gic:
gicd_addr: 0x08000000
gicr_addr: 0x080A0000
26 changes: 26 additions & 0 deletions tests/tests/configs/baremetal/qemu-riscv64-virt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Bao Hypervisor VM Configuration
# This YAML describes the fields needed to generate a C config file (config.c)

vms:
- vm1:
name: "baremetal"
build_options:
config:
image:
base_addr: 0x80200000
entry: 0x80200000
platform:
cpu_num: 4
regions:
- base: 0x80200000
size: 0x4000000
devs:
- pa: 0x10000000
va: 0x10000000
size: 0x1000
interrupts:
- 10
arch:
irqc:
plic:
base: 0xc000000
43 changes: 43 additions & 0 deletions tests/tests/configs/baremetal/s32z270.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@


# Bao Hypervisor VM Configuration
# This YAML describes the fields needed to generate a C config file (config.c)

setup:
name: "baremetal"
vms:
- vm1:
name: "baremetal"
build_options:
config:
image:
load_addr: 0x32200000
phys_addr: 0x32200000
size: 0x14000
entry: 0x32200000
platform:
cpu_num: 4
regions:
- base: 0x32200000
size: 0x100000
- base: 0x317C0000
size: 0x40000
devs:
- pa: 0x40170000
va: 0x40170000
size: 0x10000
interrupts:
- 244
- pa: 0x40520000
va: 0x40520000
size: 0x10000
- pa: 0x40030000
va: 0x40030000
size: 0x500
- interrupts:
- 27
arch:
gic:
gicc_addr: 0x2C000000
gicd_addr: 0x47800000
gicr_addr: 0x47900000
Loading
Loading