summaryrefslogtreecommitdiff
path: root/rtl/gfx/firmware/ctrl_map.h
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2024-05-25 12:36:24 -0600
committerAlejandro Soto <alejandro@34project.org>2024-05-25 12:44:45 -0600
commit85c7fe4c2c9310f45cda2f40425e86c6d1d03624 (patch)
tree49cba36196d555fc3fbcbcd0978a960e4ec7416e /rtl/gfx/firmware/ctrl_map.h
parent98dd53d47b03b8263b98ac2806c354f5b018acd2 (diff)
rtl/gfx/firmware: extract build date from gcc builtin defines
Diffstat (limited to '')
-rw-r--r--rtl/gfx/firmware/ctrl_map.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/rtl/gfx/firmware/ctrl_map.h b/rtl/gfx/firmware/ctrl_map.h
new file mode 100644
index 0000000..c035c37
--- /dev/null
+++ b/rtl/gfx/firmware/ctrl_map.h
@@ -0,0 +1,50 @@
+#ifndef CTRL_MAP_H
+#define CTRL_MAP_H
+
+#define CTRL_OFFSET_MAGIC 0x00
+#define CTRL_OFFSET_HW_ID 0x01
+#define CTRL_OFFSET_FW_ID 0x02
+#define CTRL_OFFSET_HOSTIF_ID 0x03
+
+union ctrl_rdata
+{
+ unsigned word;
+
+ struct
+ {
+ unsigned value;
+ } magic;
+
+ struct
+ {
+ unsigned patch : 8;
+ unsigned minor : 8;
+ unsigned major : 8;
+ unsigned rsvd24 : 8;
+ } hw_id;
+
+ struct
+ {
+ unsigned build : 10;
+ unsigned day : 5;
+ unsigned month : 4;
+ unsigned year : 12;
+ unsigned rsvd31 : 1;
+ } fw_id;
+
+ struct
+ {
+ enum
+ {
+ HOSTIF_REV_BOOT,
+ HOSTIF_REV_V1,
+ } rev;
+ } hostif_id;
+};
+
+union ctrl_wdata
+{
+ unsigned word;
+};
+
+#endif