qvm_dcache_operation()
Perform data cache management
Synopsis:
#include <qvm/utils.h>int qvm_dcache_operation(qvm_dcache_op_t op,
void *start,
size_t len)Arguments:
- op
- A bitfield of QDO_* flags indicating the cache operation to perform. Multiple flags can be OR'ed together.
- start
- The starting address of the data to perform the operation on.
- len
- The number of bytes to perform the operation on.
Description:
This function performs the specified operation on the specified data cache. It hides the architecture details but tells you whether a thread that will do architecture-specific tasks needs elevated privilege.
If you OR QDO_QUERY_PRIV with a particular cache operation, it will tell you what privilege is necessary to perform that operation. You can combine this flag with only one other flag, though. You can also combine flags that refer to operations themselves rather than the required privilege level. Thus, QDO_INVAL and QDO_FLUSH can be OR'ed together.
Returns:
EOK if a cache operation was requested and it succeeded. If QDO_QUERY_PRIV was used, the function returns the needed privilege level (_NTO_IO_LEVEL_*). Otherwise, an errno value is returned.
