diff options
Diffstat (limited to 'emux64/src/include/cpu')
-rw-r--r-- | emux64/src/include/cpu/cpu.h | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/emux64/src/include/cpu/cpu.h b/emux64/src/include/cpu/cpu.h index 04b2a9f..9b045c9 100644 --- a/emux64/src/include/cpu/cpu.h +++ b/emux64/src/include/cpu/cpu.h @@ -38,6 +38,14 @@ #include <stdint.h> #include <stddef.h> +/* Bring up area physical base */ +#define CPU_BUA_PBASE 0xFFF00000 + +/* Register type counts */ +#define N_GPREG 16 +#define N_FLOATREG 7 +#define N_DUBREG 7 + /* * Represents a single unit of execution * @@ -47,9 +55,9 @@ * @pc: Program counter */ struct osmx_core { - uint64_t xn[16]; - float fn[7]; - double dn[7]; + uint64_t xn[N_GPREG]; + float fn[N_FLOATREG]; + double dn[N_DUBREG]; uintptr_t pc; }; @@ -60,7 +68,24 @@ struct osmx_core { * TODO: Dynamically allocate cores */ struct osmx_cpu { - struct osmx_core[1]; + struct osmx_core cores[1]; }; +/* + * Bring the CPU to an initial reset state + * + * @core: Core to bring to reset state + * + * Returns zero on success + */ +int cpu_reset(struct osmx_core *core); + +/* + * Dump the registers to the console for debugging + * purposes + * + * @core: Core to dump + */ +void cpu_dump(struct osmx_core *core); + #endif /* !CPU_CPU_H */ |