Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defferable server #478

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
33 changes: 33 additions & 0 deletions composition_scripts/sched_test_double_hit.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[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.deferrable_server"
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.threads"
deps = [{srv = "sched", interface = "init"}, {srv = "sched", interface = "sched"}, {srv = "capmgr", interface = "capmgr_create"}]
params = [{key = "1", value = "0,1,4000,1000,900,7000"}]
constructor = "booter"

# To create test threads
# params = [{key = "1", value = "type,priority,period_us,budget_us,execution_us,block_us"}...
33 changes: 33 additions & 0 deletions composition_scripts/sched_test_periodicity.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[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.deferrable_server"
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.threads"
deps = [{srv = "sched", interface = "init"}, {srv = "sched", interface = "sched"}, {srv = "capmgr", interface = "capmgr_create"}]
params = [{key = "1", value = "0,1,4000,1000,0,0"}]
constructor = "booter"

# To create test threads
# params = [{key = "1", value = "type,priority,period_us,budget_us,execution_us,block_us"}, ...
33 changes: 33 additions & 0 deletions composition_scripts/sched_test_priority.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[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.deferrable_server"
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.threads"
deps = [{srv = "sched", interface = "init"}, {srv = "sched", interface = "sched"}, {srv = "capmgr", interface = "capmgr_create"}]
params = [{key = "1", value = "0,1,4000,2000,0,0"}, {key = "2", value = "0,2,4000,1000,0,0"}]
constructor = "booter"

# To create test threads
# params = [{key = "1", value = "type,priority,period_us,budget_us,execution_us,block_us"}...
4 changes: 2 additions & 2 deletions doc/baremetal.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ Good news, we found some [Null-Modem RS232 Serial cables](https://www.amazon.com
If you've a UNIX-based machine, you could use `minicom` to see the serial output from Composite running on baremetal on your host machine.

To get minicom working with the RS232 Serial to USB cables, you'd need to change the serail port to: `/dev/ttyUSB0` ideally using `minicom -s`. (You should verify this device from the `dmesg` output to be sure you're using the right port).
Next, you'd need to set up the baudrate to match what composite uses (38400bps).
Next, you'd need to set up the baudrate to match what composite uses (115200bps).
To see the logs correctly, you'd need to set the linefeed, carriage return, and linewrap to "Yes".

The contents of my minicom config file `minirc.dfl`:
```
# Machine-generated file - use "minicom -s" to change parameters.
pu port /dev/ttyUSB0
pu baudrate 38400
pu baudrate 115200
pu histlines 5000
pu addlinefeed Yes
pu linewrap Yes
Expand Down
23 changes: 23 additions & 0 deletions src/components/implementation/sched/deferrable_server/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Required variables used to drive the compilation process. It is OK
# for many of these to be empty.
#
# The set of interfaces that this component exports for use by other
# components. This is a list of the interface names.
INTERFACE_EXPORTS = sched init syncipc
# The interfaces this component is dependent on for compilation (this
# is a list of directory names in interface/)
INTERFACE_DEPENDENCIES = init capmgr memmgr
# The library dependencies this component is reliant on for
# compilation/linking (this is a list of directory names in lib/)
LIBRARY_DEPENDENCIES = component slm ps util crt initargs ck
# Note: Both the interface and library dependencies should be
# *minimal*. That is to say that removing a dependency should cause
# the build to fail. The build system does not validate this
# minimality; that's on you!

CFILES+=../shared/init.c
CFILES+=../shared/thd_alloc.c

C_OBJS+=$(CFILES:%.c=%.o)

include Makefile.subsubdir
Loading