summaryrefslogtreecommitdiff
path: root/emux64/src/include/cpu/cpu.h
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-10-12 22:03:32 -0400
committerIan Moffett <ian@osmora.org>2025-10-12 22:03:32 -0400
commit25c0a696a3a7fe547fd69ff505759cf0e222927d (patch)
treedc6e5f4e9e2286cfcffadc755715e9f6f802051c /emux64/src/include/cpu/cpu.h
parent3f439e5c66e8366fddccc225ee82a2cfe21d755b (diff)
emux64: cpu: Add initial CPU cycle loop w/ HLT
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'emux64/src/include/cpu/cpu.h')
-rw-r--r--emux64/src/include/cpu/cpu.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/emux64/src/include/cpu/cpu.h b/emux64/src/include/cpu/cpu.h
index 2d35c73..bffb6c0 100644
--- a/emux64/src/include/cpu/cpu.h
+++ b/emux64/src/include/cpu/cpu.h
@@ -62,12 +62,14 @@
* @fn: IEEE 754 single-precision registers
* @dn: IEEE 754 double-precision registers
* @pc: Program counter
+ * @run: Processor running
*/
struct osmx_core {
uint64_t xn[N_GPREG];
float fn[N_FLOATREG];
double dn[N_DUBREG];
uintptr_t pc;
+ uint8_t run : 1;
};
/*
@@ -97,4 +99,14 @@ int cpu_reset(struct osmx_core *core);
*/
void cpu_dump(struct osmx_core *core);
+/*
+ * Initialize the registers to use for the
+ * CPU
+ *
+ * @core: Core to use
+ *
+ * Returns zero on success
+ */
+int cpu_run(struct osmx_core *core);
+
#endif /* !CPU_CPU_H */