* bootstub version 0.01
diff --git a/bootstub.h b/bootstub.h
new file mode 100644
index 0000000..5978379
--- /dev/null
+++ b/bootstub.h
@@ -0,0 +1,28 @@
+/* define bootstub constrains here, like memory map etc. 
+ */
+
+#ifndef _BOOT_STUB_HEAD
+#define _BOOT_STUB_HEAD
+
+#define CMDLINE_OFFSET 0x100000
+#define BZIMAGE_OFFSET 0x102000
+#define STACK_OFFSET 0x101000
+#define SETUP_HEADER_OFFSET (BZIMAGE_OFFSET + 0x1F1)
+#define SETUP_HEADER_SIZE (0x0202 + *(unsigned char*)(0x0201+BZIMAGE_OFFSET))
+#define BOOT_PARAMS_OFFSET 0x8000
+#define SETUP_SIGNATURE 0x5a5aaa55
+
+#define GDT_ENTRY_BOOT_CS       2
+#define __BOOT_CS               (GDT_ENTRY_BOOT_CS * 8)
+
+#define GDT_ENTRY_BOOT_DS       (GDT_ENTRY_BOOT_CS + 1)
+#define __BOOT_DS               (GDT_ENTRY_BOOT_DS * 8)
+
+#define GDT_ENTRY(flags, base, limit)           \
+        (((u64)(base & 0xff000000) << 32) |     \
+         ((u64)flags << 40) |                   \
+         ((u64)(limit & 0x00ff0000) << 32) |    \
+         ((u64)(base & 0x00ffffff) << 16) |     \
+         ((u64)(limit & 0x0000ffff)))
+
+#endif