seL4 / microkit

Microkit - A simple operating system framework for the seL4 microkernel
Other
68 stars 37 forks source link

API for dealing with cache-coherency on ARM #115

Open Ivan-Velickovic opened 3 months ago

Ivan-Velickovic commented 3 months ago

There is currently no API for doing cache operations on ARM platforms. This leads to code like this https://github.com/seL4/microkit/blob/71e014494367d12f8b12bad9d7d1655778ca2cc2/example/tqma8xqp1gb/ethernet/eth.c#L609

which should not be necessary.

We could add simple wrappers such as microkit_arm_cache_clean and microkit_arm_cache_invalidate and so on, these would simply abstract away the VSpace cap since it's fixed.

However, I believe the default seL4 configurations for AArch64 also allow users to do some of these operations from user-space. Should these microkit_arm_cache_* APIs only call the system call if caching operations from user-space are not enabled? Are there any issues with this indirection? Should we be simple and only supply the system call wrappers and leave it to users to decide what to do?

It certainly leads to better performance.

gernotheiser commented 3 months ago

We should definitely not force system calls for things that can be done in usermode.