summaryrefslogtreecommitdiff
path: root/rsp/rspboot.h
diff options
context:
space:
mode:
authorTharo <tharo10600@gmail.com>2026-08-02 15:27:33 +0100
committerGitHub <noreply@github.com>2026-08-02 16:27:33 +0200
commitda4a1f661cc87c8a31b65310f8940a5c5f0927d6 (patch)
tree3ec5f051015b043c943f47736c37aaf1476fc522 /rsp/rspboot.h
parent32b88f90a86a024dae0af0dc28a2c5e023fd193a (diff)
[rsp] Introduce microcode build process, disassemble and build both rspboot versions (#2764)HEADmain
* [rsp] Introduce microcode build process, disassemble and build both rspboot versions * Suggested changes * Check-in tool for generating armips.cpp from upstream sources, regen armips.cpp against a newer commit * License armips_gen.py, add notice that armips.cpp is automatically generated * Qualify comment with X105 * Clarify the assumed purpose of rspboot releasing SP_SEMAPHORE
Diffstat (limited to 'rsp/rspboot.h')
-rw-r--r--rsp/rspboot.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/rsp/rspboot.h b/rsp/rspboot.h
new file mode 100644
index 000000000..16213ad68
--- /dev/null
+++ b/rsp/rspboot.h
@@ -0,0 +1,29 @@
+#ifndef RSPBOOT_H
+#define RSPBOOT_H
+
+/* Memory addressing */
+#define DMEM_START (0x0000)
+#define DMEM_SIZE (0x1000)
+#define DMEM_END (DMEM_START + DMEM_SIZE)
+#define IMEM_START (DMEM_END)
+#define IMEM_SIZE (0x1000)
+#define IMEM_END (IMEM_START + IMEM_SIZE)
+
+#define DMEM_START_VA (0x04000000 | DMEM_START)
+#define IMEM_START_VA (0x04000000 | IMEM_START)
+#define DMEM_END_VA (0x04000000 | DMEM_END)
+#define IMEM_END_VA (0x04000000 | IMEM_END)
+
+/* The first bytes of IMEM are reserved so that rspboot has space for
+ * code that will load the new IMEM contents for the target ucode.
+ */
+#define RSPBOOT_RESERVED_IMEM 0x80
+
+/* Entrypoint for ucodes loaded with rspboot */
+#define RSPBOOT_ENTRYPOINT (IMEM_START + RSPBOOT_RESERVED_IMEM)
+#define RSPBOOT_ENTRYPOINT_VA (0x04000000 | RSPBOOT_ENTRYPOINT)
+
+/* OSTask structure */
+#define OSTASK_ADDR (DMEM_END - OS_TASK_SIZE)
+
+#endif