summaryrefslogtreecommitdiff
path: root/head.S
diff options
context:
space:
mode:
authorAlek Du <alek.du@intel.com>2008-05-14 13:29:27 +0800
committerPatrick Tjin <pattjin@google.com>2014-07-21 20:22:36 -0700
commitfff91f519f4a88db5f8fa22b262644c58a9240bb (patch)
tree93add72f396280fcc19ba5da2421c076d6500be2 /head.S
parentfe0e8edbee4406cfd0c348bb98ee452ecc7ac4d3 (diff)
downloadbootstub-fff91f519f4a88db5f8fa22b262644c58a9240bb.tar.gz
* fix some bugs
Diffstat (limited to 'head.S')
-rw-r--r--head.S14
1 files changed, 7 insertions, 7 deletions
diff --git a/head.S b/head.S
index 1f6d730..a66768c 100644
--- a/head.S
+++ b/head.S
@@ -39,19 +39,19 @@
_start:
cld
cli
- /* DS=ES=FS=GS=10 */
- movl 0x2, %eax
- movl %eax, %ds
- movl %eax, %es
- movl %eax, %fs
- movl %eax, %gs
- movl %eax, %ss
/* setup stack, because we are heading off to "C" */
movl $STACK_OFFSET, %esp
/* after call main, GDT was set (0x10 and 0x18) IDT was clear
* eax will store 32bit entry of bzImage
*/
calll main
+ /* DS=ES=FS=GS=10 */
+ movl $__BOOT_DS, %ebx
+ movl %ebx, %ds
+ movl %ebx, %es
+ movl %ebx, %fs
+ movl %ebx, %gs
+ movl %ebx, %ss
ljmp $__BOOT_CS,$1f
1:
/* tell kernel where is boot_param */