Rev 110 | Rev 113 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 110 | Rev 112 | ||
---|---|---|---|
Line 45... | Line 45... | ||
45 | movw %ax,%ds |
45 | movw %ax,%ds |
46 | lgdt gdtr |
46 | lgdt gdtr |
47 | movl %cr0,%eax |
47 | movl %cr0,%eax |
48 | orl $0x1,%eax |
48 | orl $0x1,%eax |
49 | movl %eax,%cr0 |
49 | movl %eax,%cr0 |
- | 50 | jmpl $8,$meeting_point |
|
- | 51 | meeting_point: |
|
50 | jmp 0f |
52 | .code32 |
51 | 0: |
53 | |
52 | movw $16,%ax |
54 | movw $16,%ax |
53 | movw %ax,%es |
55 | movw %ax,%es |
54 | movw %ax,%gs |
56 | movw %ax,%gs |
55 | movw %ax,%fs |
57 | movw %ax,%fs |
56 | movw %ax,%ds # kernel data + stack |
58 | movw %ax,%ds # kernel data + stack |
57 | movw %ax,%ss |
59 | movw %ax,%ss |
58 | movl $0x7c00,%esp |
60 | movl $0x7c00,%esp |
59 | jmpl $8,$meeting_point |
- | |
60 | meeting_point: |
- | |
61 | .code32 |
- | |
62 | 61 | ||
63 | lidt idtr |
62 | lidt idtr |
64 | 63 | ||
65 | call map_kernel |
64 | call map_kernel |
66 | 65 | ||
Line 94... | Line 93... | ||
94 | 93 | ||
95 | # turn on paging |
94 | # turn on paging |
96 | movl %cr0, %ebx |
95 | movl %cr0, %ebx |
97 | orl $(1<<31), %ebx |
96 | orl $(1<<31), %ebx |
98 | movl %ebx, %cr0 |
97 | movl %ebx, %cr0 |
- | 98 | jmp 0f |
|
- | 99 | 0: |
|
99 | ret |
100 | ret |
100 | 101 | ||
101 | 102 | ||
102 | .section K_DATA_START |
103 | .section K_DATA_START |
103 | 104 |