summaryrefslogtreecommitdiff
path: root/memdisk/start32.S
diff options
context:
space:
mode:
authorchandramouli narayanan <mouli@linux.intel.com>2012-06-25 12:47:24 -0700
committerchandramouli narayanan <mouli@linux.intel.com>2012-06-25 12:47:24 -0700
commit6dcc24c818de73fcf54e1cae57f560cb5f01f125 (patch)
tree70c52c82d3a343151067e341a7d353f1399403d5 /memdisk/start32.S
parent38e58635d3868c23537fc5dce87b152a52df34ad (diff)
downloadsyslinux-6dcc24c818de73fcf54e1cae57f560cb5f01f125.tar.gz
This patch implements architecture-dependent code in memdisk to support for i386 and x86_64.
The memcpy, memset and memmove routines originated from klibc. Remanants of the unused old i386-only files, if any, need to be pruned.
Diffstat (limited to 'memdisk/start32.S')
-rw-r--r--memdisk/start32.S6
1 files changed, 6 insertions, 0 deletions
diff --git a/memdisk/start32.S b/memdisk/start32.S
index 4fb05374..ecebe684 100644
--- a/memdisk/start32.S
+++ b/memdisk/start32.S
@@ -62,7 +62,13 @@ _start:
addl $8, %edi
loop 1b
+#if __SIZEOF_POINTER__ == 4
lidtl idt_ptr
+#elif __SIZEOF_POINTER__ == 8
+ lidt idt_ptr
+#else
+#error "unsupported architecture"
+#endif
/* Save arguments, switch stacks */
movl %esp, %eax /* Pointer to arguments */