kata: MLCoordinator and VectorCoreDriver

Add a VectorCoreDriver component that handles setting vector core CSRs.

Rewrite MLCoordinator to conform to other Kata components. The old code
wasn't useful.

Add `test_mlexecute` command for running ML. Add plumbing from shell to
coordinator.

Change-Id: I3d563f1a343361c95d3ad5b78231fbe9df32b851
GitOrigin-RevId: f3c38839f708743de596339d1b8173315283b772
This commit is contained in:
Adam Jesionowski
2021-08-03 13:41:04 -07:00
committed by Sam Leffler
parent b9e209b008
commit b9cc80a929
16 changed files with 139 additions and 204 deletions

View File

@@ -1,6 +1,7 @@
import <LoggerInterface.camkes>;
import <ProcessControlInterface.camkes>;
import <PackageManagementInterface.camkes>;
import <MlCoordinatorInterface.camkes>;
import <SeL4DebugInterface.camkes>;
component DebugConsole {
@@ -13,4 +14,5 @@ component DebugConsole {
uses ProcessControlInterface proc_ctrl;
uses PackageManagementInterface pkg_mgmt;
uses SeL4DebugInterface sel4debug;
uses MlCoordinatorInterface mlcoord;
}

View File

@@ -88,6 +88,7 @@ fn dispatch_command(cmdline: &str, output: &mut dyn io::Write) {
"test_alloc" => test_alloc_command(output),
"test_alloc_error" => test_alloc_error_command(output),
"test_panic" => test_panic_command(),
"test_mlexecute" => test_mlexecute_command(),
_ => Err(CommandError::UnknownCommand),
};
@@ -327,3 +328,14 @@ fn test_alloc_error_command(output: &mut dyn io::Write) -> Result<(), CommandErr
fn test_panic_command() -> Result<(), CommandError> {
panic!("testing");
}
/// Implements a command that runs an ML execution.
fn test_mlexecute_command() -> Result<(), CommandError> {
extern "C" {
fn mlcoord_execute();
}
unsafe {
mlcoord_execute();
}
Ok(())
}