Rev 251 | Rev 275 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 251 | Rev 273 | ||
---|---|---|---|
Line 64... | Line 64... | ||
64 | cpuid |
64 | cpuid |
65 | bt $29, %edx # Test if long mode is supported. |
65 | bt $29, %edx # Test if long mode is supported. |
66 | jnc no_long_mode |
66 | jnc no_long_mode |
67 | 67 | ||
68 | # Load gdtr, idtr |
68 | # Load gdtr, idtr |
69 | lgdt gdtr_inst |
69 | lgdt bsp_bootstrap_gdtr |
70 | # Load idtr, but it contains mess - we should not get interrupt |
- | |
71 | # anyway |
- | |
72 | lidt idtr_inst |
- | |
73 | 70 | ||
74 | movl %cr0,%eax |
71 | movl %cr0,%eax |
75 | orl $0x1,%eax |
72 | orl $0x1,%eax |
76 | movl %eax,%cr0 # switch to protected mode |
73 | movl %eax,%cr0 # switch to protected mode |
77 | 74 | ||
Line 152... | Line 149... | ||
152 | .quad ptl_1 + (PTL_WRITABLE | PTL_PRESENT) |
149 | .quad ptl_1 + (PTL_WRITABLE | PTL_PRESENT) |
153 | .fill 510,8,0 |
150 | .fill 510,8,0 |
154 | .quad ptl_1 + (PTL_WRITABLE | PTL_PRESENT) |
151 | .quad ptl_1 + (PTL_WRITABLE | PTL_PRESENT) |
155 | 152 | ||
156 | .global gdtr_inst |
153 | .global gdtr_inst |
157 | gdtr_inst: |
154 | bsp_bootstrap_gdtr: |
158 | .word gdtselector(GDT_ITEMS) |
155 | .word gdtselector(GDT_ITEMS) |
159 | .long KA2PA(gdt) |
156 | .long KA2PA(gdt) |
160 | 157 | ||
161 | .global idtr_inst |
158 | .global ap_bootstrap_gdtr |
162 | idtr_inst: |
159 | ap_bootstrap_gdtr: |
163 | .word idtselector(IDT_ITEMS) |
160 | .word gdtselector(GDT_ITEMS) |
164 | .long KA2PA(idt) |
161 | .long KA2PA(gdt) |
165 | 162 |