Improve arch-specific separation in API code.
diff --git a/inc/api.h b/inc/api.h
new file mode 100644
index 0000000..edc9797
--- /dev/null
+++ b/inc/api.h
@@ -0,0 +1,17 @@
+#ifndef _API_H
+#define _API_H
+
+#include "cpu.h"
+#include "vm.h"
+
+/* TODO: Can we hide these? */
+extern struct vm secondary_vm[MAX_VMS];
+extern uint32_t secondary_vm_count;
+extern struct vm primary_vm;
+
+int32_t api_vm_get_count(void);
+int32_t api_vcpu_get_count(uint32_t vm_idx);
+int32_t api_vcpu_run(uint32_t vm_idx, uint32_t vcpu_idx, struct vcpu **next);
+struct vcpu *api_wait_for_interrupt(void);
+
+#endif /* _API_H */
diff --git a/inc/cpu.h b/inc/cpu.h
index 2eae33b..43bd356 100644
--- a/inc/cpu.h
+++ b/inc/cpu.h
@@ -37,7 +37,10 @@
void *stack_bottom;
};
+void cpu_module_init(void);
+
void cpu_init(struct cpu *c);
+size_t cpu_index(struct cpu *c);
void cpu_irq_enable(struct cpu *c);
void cpu_irq_disable(struct cpu *c);
bool cpu_on(struct cpu *c);