aboutsummaryrefslogtreecommitdiffstats
path: root/roms/qboot/include/assembly.h
diff options
context:
space:
mode:
authorAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
committerAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
commitaf1a266670d040d2f4083ff309d732d648afba2a (patch)
tree2fc46203448ddcc6f81546d379abfaeb323575e9 /roms/qboot/include/assembly.h
parente02cda008591317b1625707ff8e115a4841aa889 (diff)
Add submodule dependency filesHEADmaster
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'roms/qboot/include/assembly.h')
-rw-r--r--roms/qboot/include/assembly.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/roms/qboot/include/assembly.h b/roms/qboot/include/assembly.h
new file mode 100644
index 000000000..dce958d7a
--- /dev/null
+++ b/roms/qboot/include/assembly.h
@@ -0,0 +1,26 @@
+#ifndef ASSEMBLY_H_
+#define ASSEMBLY_H_
+
+#define __ASSEMBLY__
+
+#define __ALIGN .p2align 4, 0x90
+#define ENTRY(name) \
+ __ALIGN; \
+ .globl name; \
+ name:
+
+#define GLOBAL(name) \
+ .globl name; \
+ name:
+
+#define ENTRY_END(name) GLOBAL(name##_end)
+#define END(name) GLOBAL(name##_end)
+
+/*
+ * gas produces size override prefix with which
+ * we are unhappy, lets make it hardcoded for
+ * 16 bit mode
+ */
+#define IRET .byte 0xcf
+
+#endif /* ASSEMBLY_H_ */