runtime: allow #[cfg(not(has_kernel_cpu))] builds.

This commit is contained in:
whitequark 2017-11-03 16:04:17 +00:00
parent ad8fcb8b86
commit 4835431ac3

View File

@ -5,6 +5,7 @@ use rpc_queue;
use kernel_proto::{KERNELCPU_EXEC_ADDRESS, KERNELCPU_LAST_ADDRESS, KSUPPORT_HEADER_SIZE};
#[cfg(has_kernel_cpu)]
pub unsafe fn start() {
if csr::kernel_cpu::reset_read() == 0 {
panic!("attempted to start kernel CPU when it is already running")
@ -27,7 +28,13 @@ pub unsafe fn start() {
rpc_queue::init();
}
#[cfg(not(has_kernel_cpu))]
pub unsafe fn start() {
unimplemented!("not(has_kernel_cpu)")
}
pub unsafe fn stop() {
#[cfg(has_kernel_cpu)]
csr::kernel_cpu::reset_write(1);
mailbox::acknowledge();