Rev 277 | Rev 288 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 277 | Rev 282 | ||
---|---|---|---|
Line 68... | Line 68... | ||
68 | cpuid |
68 | cpuid |
69 | bt $29, %edx # Test if long mode is supported. |
69 | bt $29, %edx # Test if long mode is supported. |
70 | jnc no_long_mode |
70 | jnc no_long_mode |
71 | 71 | ||
72 | # Load gdtr, idtr |
72 | # Load gdtr, idtr |
73 | lgdt bsp_bootstrap_gdtr |
73 | lgdt real_bootstrap_gdtr_boot |
74 | 74 | ||
75 | movl %cr0,%eax |
75 | movl %cr0,%eax |
76 | orl $0x1,%eax |
76 | orl $0x1,%eax |
77 | movl %eax,%cr0 # switch to protected mode |
77 | movl %eax,%cr0 # switch to protected mode |
78 | 78 | ||
Line 164... | Line 164... | ||
164 | ptl_0: |
164 | ptl_0: |
165 | .quad ptl_1 + (PTL_WRITABLE | PTL_PRESENT) |
165 | .quad ptl_1 + (PTL_WRITABLE | PTL_PRESENT) |
166 | .fill 510,8,0 |
166 | .fill 510,8,0 |
167 | .quad ptl_1 + (PTL_WRITABLE | PTL_PRESENT) |
167 | .quad ptl_1 + (PTL_WRITABLE | PTL_PRESENT) |
168 | 168 | ||
169 | .global gdtr_inst |
169 | .global real_bootstrap_gdtr_boot |
170 | bsp_bootstrap_gdtr: |
170 | real_bootstrap_gdtr_boot: |
171 | .word gdtselector(GDT_ITEMS) |
171 | .word gdtselector(GDT_ITEMS) |
172 | .long KA2PA(gdt)-BOOT_OFFSET |
172 | .long KA2PA(gdt)-BOOT_OFFSET |