Rev 323 | Rev 371 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 323 | Rev 347 | ||
---|---|---|---|
Line 50... | Line 50... | ||
50 | # |
50 | # |
51 | kernel_image_start: |
51 | kernel_image_start: |
52 | cli |
52 | cli |
53 | xorw %ax, %ax |
53 | xorw %ax, %ax |
54 | movw %ax, %ds |
54 | movw %ax, %ds |
- | 55 | movw %ax, %es |
|
55 | movw %ax, %ss # initialize stack segment register |
56 | movw %ax, %ss # initialize stack segment register |
56 | movl $BOOTSTRAP_OFFSET - 0x400, %esp # initialize stack pointer |
57 | movl $BOOTSTRAP_OFFSET - 0x400, %esp # initialize stack pointer |
57 | 58 | ||
58 | call memmap_arch_init |
59 | call memmap_arch_init |
59 | 60 | ||
Line 83... | Line 84... | ||
83 | movw %ax, %gs |
84 | movw %ax, %gs |
84 | movw %ax, %fs |
85 | movw %ax, %fs |
85 | movw %ax, %ds # kernel data + stack |
86 | movw %ax, %ds # kernel data + stack |
86 | movw %ax, %ss |
87 | movw %ax, %ss |
87 | 88 | ||
88 | movb $0xd1, %al # enable A20 using the keyboard controller |
89 | movb $0xd1, %al # enable A20 using i8042 controller |
89 | outb %al, $0x64 |
90 | outb %al, $0x64 |
90 | movb $0xdf, %al |
91 | movb $0xdf, %al |
91 | outb %al, $0x60 |
92 | outb %al, $0x60 |
92 | 93 | ||
93 | movl $BOOTSTRAP_OFFSET, %esi |
94 | movl $BOOTSTRAP_OFFSET, %esi |