diff --git a/.gitignore b/.gitignore index ef3b6a9bcc..5336b2fe9c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ **/.DS_Store +**/.vscode *.o *.tmp *.d @@ -16,13 +17,18 @@ composite_new *.out tags +src/kernel/include/chal/shared/cpu_ghz.h +src/platform/x86_64/gdb* +src/platform/x86_64/grub.cfg +src/platform/x86_64/qemu.sh src/components/lib/libc/musl-1.1.11/bin/musl-gcc -src/kernel/include/shared/cpu_ghz.h src/Makefile.cosconfig +src/Makefile.arch src/.PLATFORM_ID modules.order .depend *.img +*.bin transfer/ GPATH GRTAGS @@ -35,6 +41,20 @@ provision.sh src/components/lib/ck/include src/components/lib/ck/lib src/components/lib/ck/share +src/kernel/include/chal +src/platform/*/chal/shared/cpu_ghz.h +src/components/lib/libc/libc.READY doc/dev_manual/composite_dev_manual.pdf doc/dev_manual/resources/*.pdf system_binaries/cos_build-* +src/components/lib/libc/musl-1.2.0/include/bits/ +src/components/lib/libc/musl-1.2.0/bin/ +constructor +kernel.iso +grub.cfg +gdbinit +src/components/lib/libc/musl-1.2.0/include/asm/ +src/components/lib/libc/musl-1.2.0/include/asm-generic/ +src/components/lib/libc/musl-1.2.0/include/linux/ +src/components/lib/libc/musl-1.2.0/include/sys/queue.h +src/kernel/include/shared/cpu_ghz.h diff --git a/.gitmodules b/.gitmodules index b5d218ff5b..83fdd087ff 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,16 @@ [submodule "src/components/lib/ps/ps"] path = src/components/lib/ps/ps url = https://github.com/gwsystems/ps.git + branch = master [submodule "src/components/lib/ck/ck"] path = src/components/lib/ck/ck url = https://github.com/gwsystems/ck.git + branch = cos_profile +[submodule "src/components/lib/dpdk/dpdk"] + path = src/components/lib/dpdk/dpdk + url = https://github.com/gwsystems/dpdk.git + branch = cos_dpdk +[submodule "src/components/lib/lwip/lwip"] + path = src/components/lib/lwip/lwip + url = https://github.com/gwsystems/lwip.git + branch = cos_stable_2_1_x diff --git a/README.md b/README.md index 4702eaa38a..d0258d998f 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ more information. Branches -------- -- `master` is the original system with a full user-level set of components. +- `main` is the original system with a full user-level set of components. - `ppos` is the Speck kernel emphasizing scalable predictability. - `tcaps` has mainly been integrated into `ppos`, but a few unrelated pieces remain. @@ -37,7 +37,8 @@ _Composite_ system support -------------------------- - x86-32 -- Qemu with 32 bit, x86 support +- x86-64 +- Qemu with 32/64 bit, x86 support Important note -------------- diff --git a/composition_scripts/bench_chan_crt.toml b/composition_scripts/bench_chan_crt.toml new file mode 100644 index 0000000000..3a973c5127 --- /dev/null +++ b/composition_scripts/bench_chan_crt.toml @@ -0,0 +1,31 @@ +[system] +description = "Crt channel benchmarking test." + +[[components]] +name = "booter" +img = "no_interface.llbooter" +implements = [{interface = "init"}, {interface = "addr"}] +deps = [{srv = "kernel", interface = "init", variant = "kernel"}] +constructor = "kernel" + +[[components]] +name = "capmgr" +img = "capmgr.simple" +deps = [{srv = "booter", interface = "init"}, {srv = "booter", interface = "addr"}] +implements = [{interface = "capmgr"}, {interface = "init"}, {interface = "memmgr"}, {interface = "capmgr_create"}] +constructor = "booter" + +[[components]] +name = "sched" +img = "sched.root_fprr" +deps = [{srv = "capmgr", interface = "init"}, {srv = "capmgr", interface = "capmgr"}, {srv = "capmgr", interface = "memmgr"}] +implements = [{interface = "sched"}, {interface = "init"}] +constructor = "booter" + +[[components]] +name = "tests" +img = "tests.bench_chan_crt" +implements = [{interface = "init"}] +deps = [{srv = "sched", interface = "sched"}, {srv = "sched", interface = "init"}, {srv = "capmgr", interface = "capmgr_create"}, {srv = "capmgr", interface = "memmgr"}] +baseaddr = "0x1600000" +constructor = "booter" diff --git a/composition_scripts/bench_chan_inter.toml b/composition_scripts/bench_chan_inter.toml new file mode 100644 index 0000000000..1cfe456aae --- /dev/null +++ b/composition_scripts/bench_chan_inter.toml @@ -0,0 +1,51 @@ +[system] +description = "Inter-process channel benchmarking." + +[[components]] +name = "booter" +img = "no_interface.llbooter" +implements = [{interface = "init"}, {interface = "addr"}] +deps = [{srv = "kernel", interface = "init", variant = "kernel"}] +constructor = "kernel" + +[[components]] +name = "capmgr" +img = "capmgr.simple" +deps = [{srv = "booter", interface = "init"}, {srv = "booter", interface = "addr"}] +implements = [{interface = "capmgr"}, {interface = "init"}, {interface = "memmgr"}, {interface = "capmgr_create"}] +constructor = "booter" + +[[components]] +name = "sched" +img = "sched.root_fprr" +deps = [{srv = "capmgr", interface = "init"}, {srv = "capmgr", interface = "capmgr"}, {srv = "capmgr", interface = "memmgr"}] +implements = [{interface = "sched"}, {interface = "init"}] +constructor = "booter" + +[[components]] +name = "chanmgr" +img = "chanmgr.simple" +deps = [{srv = "sched", interface = "init"}, {srv = "sched", interface = "sched"}, {srv = "capmgr", interface = "capmgr_create"}, {srv = "capmgr", interface = "memmgr"}, {srv = "capmgr", interface = "capmgr"}] +implements = [{interface = "chanmgr"}, {interface = "chanmgr_evt"}] +constructor = "booter" + +[[components]] +name = "evtmgr" +img = "evt.evtmgr" +deps = [{srv = "sched", interface = "init"}, {srv = "sched", interface = "sched"}, {srv = "capmgr", interface = "capmgr_create"}] +implements = [{interface = "evt"}] +constructor = "booter" + +[[components]] +name = "chanhi" +img = "tests.bench_chan_inter_send" +deps = [{srv = "sched", interface = "sched"}, {srv = "sched", interface = "init"}, {srv = "capmgr", interface = "capmgr_create"}, {srv = "capmgr", interface = "memmgr"}, {srv = "chanmgr", interface = "chanmgr"}, {srv = "chanmgr", interface = "chanmgr_evt"}, {srv = "evtmgr", interface = "evt"}] +baseaddr = "0x1600000" +constructor = "booter" + +[[components]] +name = "chanlo" +img = "tests.bench_chan_inter_recv" +deps = [{srv = "sched", interface = "sched"}, {srv = "sched", interface = "init"}, {srv = "capmgr", interface = "capmgr_create"}, {srv = "capmgr", interface = "memmgr"}, {srv = "chanmgr", interface = "chanmgr"}, {srv = "chanmgr", interface = "chanmgr_evt"}, {srv = "evtmgr", interface = "evt"}] +baseaddr = "0x1600000" +constructor = "booter" diff --git a/composition_scripts/bench_dpdk.toml b/composition_scripts/bench_dpdk.toml new file mode 100644 index 0000000000..a30f331021 --- /dev/null +++ b/composition_scripts/bench_dpdk.toml @@ -0,0 +1,30 @@ +[system] +description = "Simple DPDK component: test if it can drive NIC and sent/receive packets" + +[[components]] +name = "booter" +img = "no_interface.llbooter" +implements = [{interface = "init"}, {interface = "addr"}] +deps = [{srv = "kernel", interface = "init", variant = "kernel"}] +constructor = "kernel" + +[[components]] +name = "capmgr" +img = "capmgr.simple" +deps = [{srv = "booter", interface = "init"}, {srv = "booter", interface = "addr"}] +implements = [{interface = "capmgr"}, {interface = "init"}, {interface = "memmgr"}, {interface = "capmgr_create"}] +constructor = "booter" + +[[components]] +name = "sched" +img = "sched.root_fprr" +deps = [{srv = "capmgr", interface = "init"}, {srv = "capmgr", interface = "capmgr"}, {srv = "capmgr", interface = "memmgr"}] +implements = [{interface = "sched"}, {interface = "init"}] +constructor = "booter" + +[[components]] +name = "dpdk" +img = "tests.bench_dpdk" +deps = [{srv = "sched", interface = "sched"}, {srv = "sched", interface = "init"}, {srv = "capmgr", interface = "capmgr_create"}, {srv = "capmgr", interface = "memmgr"}] +baseaddr = "0x1600000" +constructor = "booter" \ No newline at end of file diff --git a/composition_scripts/bench_lock.toml b/composition_scripts/bench_lock.toml new file mode 100644 index 0000000000..5633ce5dc6 --- /dev/null +++ b/composition_scripts/bench_lock.toml @@ -0,0 +1,31 @@ +[system] +description = "Crt lock benchmarking test." + +[[components]] +name = "booter" +img = "no_interface.llbooter" +implements = [{interface = "init"}, {interface = "addr"}] +deps = [{srv = "kernel", interface = "init", variant = "kernel"}] +constructor = "kernel" + +[[components]] +name = "capmgr" +img = "capmgr.simple" +deps = [{srv = "booter", interface = "init"}, {srv = "booter", interface = "addr"}] +implements = [{interface = "capmgr"}, {interface = "init"}, {interface = "memmgr"}, {interface = "capmgr_create"}] +constructor = "booter" + +[[components]] +name = "sched" +img = "sched.root_fprr" +deps = [{srv = "capmgr", interface = "init"}, {srv = "capmgr", interface = "capmgr"}, {srv = "capmgr", interface = "memmgr"}] +implements = [{interface = "sched"}, {interface = "init"}] +constructor = "booter" + +[[components]] +name = "tests" +img = "tests.bench_lock" +implements = [{interface = "init"}] +deps = [{srv = "sched", interface = "sched"}, {srv = "sched", interface = "init"}, {srv = "capmgr", interface = "capmgr_create"}, {srv = "capmgr", interface = "memmgr"}] +baseaddr = "0x1600000" +constructor = "booter" diff --git a/composition_scripts/bench_sched_yield.toml b/composition_scripts/bench_sched_yield.toml new file mode 100644 index 0000000000..4e0ef0013b --- /dev/null +++ b/composition_scripts/bench_sched_yield.toml @@ -0,0 +1,30 @@ +[system] +description = "Sched interface context switch benchmarking." + +[[components]] +name = "booter" +img = "no_interface.llbooter" +implements = [{interface = "init"}, {interface = "addr"}] +deps = [{srv = "kernel", interface = "init", variant = "kernel"}] +constructor = "kernel" + +[[components]] +name = "capmgr" +img = "capmgr.simple" +deps = [{srv = "booter", interface = "init"}, {srv = "booter", interface = "addr"}] +implements = [{interface = "capmgr"}, {interface = "init"}, {interface = "memmgr"}, {interface = "capmgr_create"}] +constructor = "booter" + +[[components]] +name = "sched" +img = "sched.root_fprr" +deps = [{srv = "capmgr", interface = "init"}, {srv = "capmgr", interface = "capmgr"}, {srv = "capmgr", interface = "memmgr"}] +implements = [{interface = "sched"}, {interface = "init"}] +constructor = "booter" + +[[components]] +name = "bench_sched_yield" +img = "tests.bench_sched_yield" +deps = [{srv = "sched", interface = "sched"}, {srv = "sched", interface = "init"}, {srv = "capmgr", interface = "capmgr_create"}, {srv = "capmgr", interface = "memmgr"}] +baseaddr = "0x1600000" +constructor = "booter" diff --git a/composition_scripts/bench_sem.toml b/composition_scripts/bench_sem.toml new file mode 100644 index 0000000000..0c32d1db83 --- /dev/null +++ b/composition_scripts/bench_sem.toml @@ -0,0 +1,31 @@ +[system] +description = "Crt semaphore benchmarking test." + +[[components]] +name = "booter" +img = "no_interface.llbooter" +implements = [{interface = "init"}, {interface = "addr"}] +deps = [{srv = "kernel", interface = "init", variant = "kernel"}] +constructor = "kernel" + +[[components]] +name = "capmgr" +img = "capmgr.simple" +deps = [{srv = "booter", interface = "init"}, {srv = "booter", interface = "addr"}] +implements = [{interface = "capmgr"}, {interface = "init"}, {interface = "memmgr"}, {interface = "capmgr_create"}] +constructor = "booter" + +[[components]] +name = "sched" +img = "sched.root_fprr" +deps = [{srv = "capmgr", interface = "init"}, {srv = "capmgr", interface = "capmgr"}, {srv = "capmgr", interface = "memmgr"}] +implements = [{interface = "sched"}, {interface = "init"}] +constructor = "booter" + +[[components]] +name = "tests" +img = "tests.bench_sem" +implements = [{interface = "init"}] +deps = [{srv = "sched", interface = "sched"}, {srv = "sched", interface = "init"}, {srv = "capmgr", interface = "capmgr_create"}, {srv = "capmgr", interface = "memmgr"}] +baseaddr = "0x1600000" +constructor = "booter" diff --git a/composition_scripts/bench_sl_yield.toml b/composition_scripts/bench_sl_yield.toml new file mode 100644 index 0000000000..3fbfe94117 --- /dev/null +++ b/composition_scripts/bench_sl_yield.toml @@ -0,0 +1,8 @@ +[system] +description = "Sl library context switch benchmarking." + +[[components]] +name = "bench_sl_yield" +img = "tests.bench_sl_yield" +deps = [{srv = "kernel", interface = "init", variant = "kernel"}] +constructor = "kernel" diff --git a/composition_scripts/bench_tmr.toml b/composition_scripts/bench_tmr.toml new file mode 100644 index 0000000000..24d32ec276 --- /dev/null +++ b/composition_scripts/bench_tmr.toml @@ -0,0 +1,44 @@ +[system] +description = "Crt timer benchmarking test." + +[[components]] +name = "booter" +img = "no_interface.llbooter" +implements = [{interface = "init"}, {interface = "addr"}] +deps = [{srv = "kernel", interface = "init", variant = "kernel"}] +constructor = "kernel" + +[[components]] +name = "capmgr" +img = "capmgr.simple" +deps = [{srv = "booter", interface = "init"}, {srv = "booter", interface = "addr"}] +implements = [{interface = "capmgr"}, {interface = "init"}, {interface = "memmgr"}, {interface = "capmgr_create"}] +constructor = "booter" + +[[components]] +name = "sched" +img = "sched.root_fprr" +deps = [{srv = "capmgr", interface = "init"}, {srv = "capmgr", interface = "capmgr"}, {srv = "capmgr", interface = "memmgr"}] +implements = [{interface = "sched"}, {interface = "init"}] +constructor = "booter" + +[[components]] +name = "evtmgr" +img = "evt.evtmgr" +deps = [{srv = "sched", interface = "init"}, {srv = "sched", interface = "sched"}, {srv = "capmgr", interface = "capmgr_create"}] +implements = [{interface = "evt"}] +constructor = "booter" + +[[components]] +name = "tmrmgr" +img = "tmrmgr.simple" +deps = [{srv = "sched", interface = "init"}, {srv = "sched", interface = "sched"}, {srv = "capmgr", interface = "capmgr_create"}, {srv = "evtmgr", interface = "evt"}] +implements = [{interface = "tmrmgr"}] +constructor = "booter" + +[[components]] +name = "bench_tmr" +img = "tests.bench_tmr" +deps = [{srv = "sched", interface = "sched"}, {srv = "sched", interface = "init"}, {srv = "capmgr", interface = "capmgr_create"}, {srv = "capmgr", interface = "memmgr"}, {srv = "evtmgr", interface = "evt"}, {srv = "tmrmgr", interface = "tmrmgr"}] +baseaddr = "0x1600000" +constructor = "booter" diff --git a/composition_scripts/chan_tests.toml b/composition_scripts/chan_tests.toml new file mode 100644 index 0000000000..1a1b74cde6 --- /dev/null +++ b/composition_scripts/chan_tests.toml @@ -0,0 +1,44 @@ +[system] +description = "Simple test of channels and events." + +[[components]] +name = "booter" +img = "no_interface.llbooter" +implements = [{interface = "init"}, {interface = "addr"}] +deps = [{srv = "kernel", interface = "init", variant = "kernel"}] +constructor = "kernel" + +[[components]] +name = "capmgr" +img = "capmgr.simple" +deps = [{srv = "booter", interface = "init"}, {srv = "booter", interface = "addr"}] +implements = [{interface = "capmgr"}, {interface = "init"}, {interface = "memmgr"}, {interface = "capmgr_create"}] +constructor = "booter" + +[[components]] +name = "sched" +img = "sched.root_fprr" +deps = [{srv = "capmgr", interface = "init"}, {srv = "capmgr", interface = "capmgr"}, {srv = "capmgr", interface = "memmgr"}] +implements = [{interface = "sched"}, {interface = "init"}] +constructor = "booter" + +[[components]] +name = "chanmgr" +img = "chanmgr.simple" +deps = [{srv = "sched", interface = "init"}, {srv = "sched", interface = "sched"}, {srv = "capmgr", interface = "capmgr_create"}, {srv = "capmgr", interface = "memmgr"}, {srv = "capmgr", interface = "capmgr"}] +implements = [{interface = "chanmgr"}, {interface = "chanmgr_evt"}] +constructor = "booter" + +[[components]] +name = "evtmgr" +img = "evt.evtmgr" +deps = [{srv = "sched", interface = "init"}, {srv = "sched", interface = "sched"}, {srv = "capmgr", interface = "capmgr_create"}] +implements = [{interface = "evt"}] +constructor = "booter" + +[[components]] +name = "chantest" +img = "tests.chan" +deps = [{srv = "sched", interface = "sched"}, {srv = "sched", interface = "init"}, {srv = "capmgr", interface = "capmgr_create"}, {srv = "capmgr", interface = "memmgr"}, {srv = "chanmgr", interface = "chanmgr"}, {srv = "chanmgr", interface = "chanmgr_evt"}, {srv = "evtmgr", interface = "evt"}] +baseaddr = "0x1600000" +constructor = "booter" diff --git a/composition_scripts/crt_test.toml b/composition_scripts/crt_tests.toml similarity index 100% rename from composition_scripts/crt_test.toml rename to composition_scripts/crt_tests.toml diff --git a/composition_scripts/multi_processor_simple.toml b/composition_scripts/multi_processor_simple.toml new file mode 100644 index 0000000000..b5596adaf6 --- /dev/null +++ b/composition_scripts/multi_processor_simple.toml @@ -0,0 +1,9 @@ +[system] +description = "Simple system: the multiprocessor, and initialization ordering" + +[[components]] +name = "multiprocessor_simple" +img = "tests.multi_processor_simple" +deps = [{srv = "kernel", interface = "init", variant = "kernel"}] +baseaddr = "0x1600000" +constructor = "kernel" diff --git a/composition_scripts/ping_pong_shared_vas.toml b/composition_scripts/ping_pong_shared_vas.toml new file mode 100644 index 0000000000..4004f17263 --- /dev/null +++ b/composition_scripts/ping_pong_shared_vas.toml @@ -0,0 +1,25 @@ +[system] +description = "Simple system: the ping pong test for IPC and shared VAS" + +[[components]] +name = "booter" +img = "no_interface.llbooter_shvas" +implements = [{interface = "init"}] +deps = [{srv = "kernel", interface = "init", variant = "kernel"}] +constructor = "kernel" + +[[components]] +name = "ping" +img = "tests.unit_pingshvas" +deps = [{srv = "pongshvas", interface = "pongshvas"}, + {srv = "booter", interface = "init"}] +baseaddr = "0x40000000" +constructor = "booter" + +[[components]] +name = "pongshvas" +img = "tests.unit_pongshvas" +deps = [{srv = "booter", interface = "init"}] +implements = [{interface = "pongshvas"}] +baseaddr = "0x10000000000" +constructor = "booter" \ No newline at end of file diff --git a/composition_scripts/ping_pong_shmem.toml b/composition_scripts/ping_pong_shmem.toml new file mode 100644 index 0000000000..d6a092e285 --- /dev/null +++ b/composition_scripts/ping_pong_shmem.toml @@ -0,0 +1,36 @@ +[system] +description = "Simplest system with both capability manager and scheduler to test shared memory implementation" + +[[components]] +name = "booter" +img = "no_interface.llbooter" +implements = [{interface = "init"}, {interface = "addr"}] +deps = [{srv = "kernel", interface = "init", variant = "kernel"}] +constructor = "kernel" + +[[components]] +name = "capmgr" +img = "capmgr.simple" +deps = [{srv = "booter", interface = "init"}, {srv = "booter", interface = "addr"}] +implements = [{interface = "capmgr"}, {interface = "init"}, {interface = "memmgr"}, {interface = "capmgr_create"}] +constructor = "booter" + +[[components]] +name = "sched" +img = "sched.root_fprr" +deps = [{srv = "capmgr", interface = "init"}, {srv = "capmgr", interface = "capmgr"}, {srv = "capmgr", interface = "memmgr"}] +implements = [{interface = "sched"}, {interface = "init"}] +constructor = "booter" + +[[components]] +name = "pingshmem" +img = "tests.unit_pingshmem" +deps = [{srv = "pongshmem", interface = "pongshmem"}, {srv = "sched", interface = "init"}, {srv = "capmgr", interface = "capmgr_create"}, {srv = "capmgr", interface = "memmgr"}] +constructor = "booter" + +[[components]] +name = "pongshmem" +img = "tests.unit_pongshmem" +deps = [{srv = "sched", interface = "init"}, {srv = "capmgr", interface = "capmgr_create"}, {srv = "capmgr", interface = "memmgr"}] +implements = [{interface = "pongshmem"}] +constructor = "booter" \ No newline at end of file diff --git a/composition_scripts/sched.toml b/composition_scripts/sched.toml index 2e6d05e6b2..75310f9566 100644 --- a/composition_scripts/sched.toml +++ b/composition_scripts/sched.toml @@ -17,7 +17,7 @@ constructor = "booter" [[components]] name = "sched" -img = "sched.root_fprr" +img = "sched.pfprr_quantum_static" deps = [{srv = "capmgr", interface = "init"}, {srv = "capmgr", interface = "capmgr"}, {srv = "capmgr", interface = "memmgr"}] implements = [{interface = "sched"}, {interface = "init"}] constructor = "booter" diff --git a/composition_scripts/sched_crt_tests.toml b/composition_scripts/sched_crt_tests.toml new file mode 100644 index 0000000000..d2296ecb41 --- /dev/null +++ b/composition_scripts/sched_crt_tests.toml @@ -0,0 +1,31 @@ +[system] +description = "Simplest system with crt tests." + +[[components]] +name = "booter" +img = "no_interface.llbooter" +implements = [{interface = "init"}, {interface = "addr"}] +deps = [{srv = "kernel", interface = "init", variant = "kernel"}] +constructor = "kernel" + +[[components]] +name = "capmgr" +img = "capmgr.simple" +deps = [{srv = "booter", interface = "init"}, {srv = "booter", interface = "addr"}] +implements = [{interface = "capmgr"}, {interface = "init"}, {interface = "memmgr"}, {interface = "capmgr_create"}] +constructor = "booter" + +[[components]] +name = "sched" +img = "sched.root_fprr" +deps = [{srv = "capmgr", interface = "init"}, {srv = "capmgr", interface = "capmgr"}, {srv = "capmgr", interface = "memmgr"}] +implements = [{interface = "sched"}, {interface = "init"}] +constructor = "booter" + +[[components]] +name = "tests" +img = "tests.crt_tests" +implements = [{interface = "init"}] +deps = [{srv = "sched", interface = "sched"}, {srv = "sched", interface = "init"}, {srv = "capmgr", interface = "capmgr_create"}, {srv = "capmgr", interface = "memmgr"}] +baseaddr = "0x1600000" +constructor = "booter" diff --git a/composition_scripts/slm_test.toml b/composition_scripts/slm_test.toml new file mode 100644 index 0000000000..bbcf3a6d69 --- /dev/null +++ b/composition_scripts/slm_test.toml @@ -0,0 +1,9 @@ +[system] +description = "Unit tests for the slm scheduling library." + +[[components]] +name = "slm" +img = "tests.slm" +implements = [{interface = "init"}] +deps = [{srv = "kernel", interface = "init", variant = "kernel"}] +constructor = "kernel" diff --git a/composition_scripts/unit_chan_evt.toml b/composition_scripts/unit_chan_evt.toml new file mode 100644 index 0000000000..b2b6e1189d --- /dev/null +++ b/composition_scripts/unit_chan_evt.toml @@ -0,0 +1,44 @@ +[system] +description = "Simple test of channels and events, both sender and receiver in the same component." + +[[components]] +name = "booter" +img = "no_interface.llbooter" +implements = [{interface = "init"}, {interface = "addr"}] +deps = [{srv = "kernel", interface = "init", variant = "kernel"}] +constructor = "kernel" + +[[components]] +name = "capmgr" +img = "capmgr.simple" +deps = [{srv = "booter", interface = "init"}, {srv = "booter", interface = "addr"}] +implements = [{interface = "capmgr"}, {interface = "init"}, {interface = "memmgr"}, {interface = "capmgr_create"}] +constructor = "booter" + +[[components]] +name = "sched" +img = "sched.root_fprr" +deps = [{srv = "capmgr", interface = "init"}, {srv = "capmgr", interface = "capmgr"}, {srv = "capmgr", interface = "memmgr"}] +implements = [{interface = "sched"}, {interface = "init"}] +constructor = "booter" + +[[components]] +name = "chanmgr" +img = "chanmgr.simple" +deps = [{srv = "sched", interface = "init"}, {srv = "sched", interface = "sched"}, {srv = "capmgr", interface = "capmgr_create"}, {srv = "capmgr", interface = "memmgr"}, {srv = "capmgr", interface = "capmgr"}] +implements = [{interface = "chanmgr"}, {interface = "chanmgr_evt"}] +constructor = "booter" + +[[components]] +name = "evtmgr" +img = "evt.evtmgr" +deps = [{srv = "sched", interface = "init"}, {srv = "sched", interface = "sched"}, {srv = "capmgr", interface = "capmgr_create"}] +implements = [{interface = "evt"}] +constructor = "booter" + +[[components]] +name = "chanevt" +img = "tests.chan_evt" +deps = [{srv = "sched", interface = "sched"}, {srv = "sched", interface = "init"}, {srv = "capmgr", interface = "capmgr_create"}, {srv = "capmgr", interface = "memmgr"}, {srv = "chanmgr", interface = "chanmgr"}, {srv = "chanmgr", interface = "chanmgr_evt"}, {srv = "evtmgr", interface = "evt"}] +baseaddr = "0x1600000" +constructor = "booter" diff --git a/composition_scripts/unit_memmgr.toml b/composition_scripts/unit_memmgr.toml new file mode 100644 index 0000000000..d62d529952 --- /dev/null +++ b/composition_scripts/unit_memmgr.toml @@ -0,0 +1,29 @@ +[system] +description = "Simplest system with both capability manager and scheduler to test shared memory implementation" + +[[components]] +name = "booter" +img = "no_interface.llbooter" +implements = [{interface = "init"}, {interface = "addr"}] +deps = [{srv = "kernel", interface = "init", variant = "kernel"}] +constructor = "kernel" + +[[components]] +name = "capmgr" +img = "capmgr.simple" +deps = [{srv = "booter", interface = "init"}, {srv = "booter", interface = "addr"}] +implements = [{interface = "capmgr"}, {interface = "init"}, {interface = "memmgr"}, {interface = "capmgr_create"}] +constructor = "booter" + +[[components]] +name = "sched" +img = "sched.root_fprr" +deps = [{srv = "capmgr", interface = "init"}, {srv = "capmgr", interface = "capmgr"}, {srv = "capmgr", interface = "memmgr"}] +implements = [{interface = "sched"}, {interface = "init"}] +constructor = "booter" + +[[components]] +name = "unit_memmgr" +img = "tests.unit_memmgr" +deps = [{srv = "sched", interface = "init"}, {srv = "capmgr", interface = "capmgr_create"}, {srv = "capmgr", interface = "memmgr"}] +constructor = "booter" \ No newline at end of file diff --git a/composition_scripts/unit_tmr.toml b/composition_scripts/unit_tmr.toml new file mode 100644 index 0000000000..83f1b5355a --- /dev/null +++ b/composition_scripts/unit_tmr.toml @@ -0,0 +1,44 @@ +[system] +description = "Simple test of timers only (with event manager of course)." + +[[components]] +name = "booter" +img = "no_interface.llbooter" +implements = [{interface = "init"}, {interface = "addr"}] +deps = [{srv = "kernel", interface = "init", variant = "kernel"}] +constructor = "kernel" + +[[components]] +name = "capmgr" +img = "capmgr.simple" +deps = [{srv = "booter", interface = "init"}, {srv = "booter", interface = "addr"}] +implements = [{interface = "capmgr"}, {interface = "init"}, {interface = "memmgr"}, {interface = "capmgr_create"}] +constructor = "booter" + +[[components]] +name = "sched" +img = "sched.root_fprr" +deps = [{srv = "capmgr", interface = "init"}, {srv = "capmgr", interface = "capmgr"}, {srv = "capmgr", interface = "memmgr"}] +implements = [{interface = "sched"}, {interface = "init"}] +constructor = "booter" + +[[components]] +name = "evtmgr" +img = "evt.evtmgr" +deps = [{srv = "sched", interface = "init"}, {srv = "sched", interface = "sched"}, {srv = "capmgr", interface = "capmgr_create"}] +implements = [{interface = "evt"}] +constructor = "booter" + +[[components]] +name = "tmrmgr" +img = "tmrmgr.simple" +deps = [{srv = "sched", interface = "init"}, {srv = "sched", interface = "sched"}, {srv = "capmgr", interface = "capmgr_create"}, {srv = "evtmgr", interface = "evt"}] +implements = [{interface = "tmrmgr"}] +constructor = "booter" + +[[components]] +name = "unit_tmr" +img = "tests.unit_tmr" +deps = [{srv = "sched", interface = "sched"}, {srv = "sched", interface = "init"}, {srv = "capmgr", interface = "capmgr_create"}, {srv = "capmgr", interface = "memmgr"}, {srv = "evtmgr", interface = "evt"}, {srv = "tmrmgr", interface = "tmrmgr"}] +baseaddr = "0x1600000" +constructor = "booter" diff --git a/composition_scripts/vas_tests.toml b/composition_scripts/vas_tests.toml new file mode 100644 index 0000000000..bf766f6ba9 --- /dev/null +++ b/composition_scripts/vas_tests.toml @@ -0,0 +1,57 @@ +[system] +description = "Simplest system with both capability manager and scheduler, from unit_schedcomp.sh" + +[[components]] +name = "booter" +img = "no_interface.llbooter" +implements = [{interface = "init"}, {interface = "addr"}] +deps = [{srv = "kernel", interface = "init", variant = "kernel"}] +constructor = "kernel" + +[[components]] +name = "capmgr" +img = "capmgr.simple" +deps = [{srv = "booter", interface = "init"}, {srv = "booter", interface = "addr"}] +implements = [{interface = "capmgr"}, {interface = "init"}, {interface = "memmgr"}, {interface = "capmgr_create"}] +constructor = "booter" + +[[components]] +name = "sched" +img = "sched.root_fprr" +deps = [{srv = "capmgr", interface = "init"}, {srv = "capmgr", interface = "capmgr"}, {srv = "capmgr", interface = "memmgr"}] +implements = [{interface = "sched"}, {interface = "init"}] +constructor = "booter" + +[[components]] +name = "schedtest" +img = "tests.unit_schedcomp" +deps = [{srv = "sched", interface = "init"}, {srv = "sched", interface = "sched"}, {srv = "capmgr", interface = "capmgr_create"}] +constructor = "booter" + +[[components]] +name = "ping" +img = "tests.unit_pingpong" +deps = [{srv = "pong", interface = "pong"}, {srv = "sched", interface = "init"}, {srv = "capmgr", interface = "capmgr_create"}] +baseaddr = "0x1600000" +constructor = "booter" + +[[components]] +name = "pong" +img = "pong.pingpong" +deps = [{srv = "sched", interface = "init"}, {srv = "capmgr", interface = "capmgr_create"}] +implements = [{interface = "pong"}] +constructor = "booter" + +[[address_spaces]] +name = "system" +components = ["capmgr", "sched"] + +[[address_spaces]] +name = "pong" +components = ["pong"] +parent = "system" + +[[address_spaces]] +name = "ping" +components = ["ping"] +parent = "pong" diff --git a/cos b/cos index a831a7b3b7..b9e5037af2 100755 --- a/cos +++ b/cos @@ -1,74 +1,181 @@ -#!/bin/sh +#!/bin/bash + +set -e script= name= binary= +arch= -build() +initialize() { - if ! [ -r "src/.PLATFORM_ID" ]; then - echo "Must \"cos init\" before \"cos build\"." - exit 2 - fi + case ${arch} in + x86_64 ) + ;; + i386 ) + ;; + armv7a ) + ;; + * ) + echo "Unsupported architecture" + exit 1 + esac + + echo "[cos setting arch] make -C src config-${arch}" + make -C src config-${arch} - echo "[cos executing] make -C src all" - make -C src all + echo "[cos executing] make -C src config init" + make -C src init } -clean() +build() { - echo "[cos executing] make -C clean" - make -C src clean + if ! [ -r "src/.PLATFORM_ID" ]; then + echo "Must \"cos init\" before \"cos build\"." + exit 1 + fi + + echo "[cos executing] make -C src all" + make -C src all } -initialize() +clean() { - echo "[cos executing] make -C src config init" - make -C src config init + echo "[cos executing] make -C src clean" + make -C src clean } -usage() +distclean() { - echo "Usage: " $0 " init|build|reset|compose