Rev 275 | Rev 282 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 275 | Rev 277 | ||
---|---|---|---|
Line 80... | Line 80... | ||
80 | 80 | ||
81 | no_long_mode: |
81 | no_long_mode: |
82 | 1: |
82 | 1: |
83 | jmp 1b |
83 | jmp 1b |
84 | 84 | ||
85 | # Protected 16-bit. We want to reuse the code-seg descriptor, |
85 | # Protected 32-bit. We want to reuse the code-seg descriptor, |
86 | # the Default operand size must not be 1 when entering long mode |
86 | # the Default operand size must not be 1 when entering long mode |
- | 87 | .code32 |
|
87 | now_in_prot: |
88 | now_in_prot: |
88 | # Set up stack & data descriptors |
89 | # Set up stack & data descriptors |
89 | movw $gdtselector(KDATA_DES), %ax |
90 | movw $gdtselector(KDATA_DES), %ax |
90 | movw %ax, %ds |
91 | movw %ax, %ds |
91 | movw %ax, %fs |
- | |
92 | movw %ax, %gs |
- | |
93 | movw %ax, %ss |
92 | movw %ax, %ss |
94 | 93 | ||
95 | movb $0xd1, %al # enable A20 using the keyboard controller |
94 | movb $0xd1, %al # enable A20 using the keyboard controller |
96 | outb %al, $0x64 |
95 | outb %al, $0x64 |
97 | movb $0xdf, %al |
96 | movb $0xdf, %al |
Line 169... | Line 168... | ||
169 | 168 | ||
170 | .global gdtr_inst |
169 | .global gdtr_inst |
171 | bsp_bootstrap_gdtr: |
170 | bsp_bootstrap_gdtr: |
172 | .word gdtselector(GDT_ITEMS) |
171 | .word gdtselector(GDT_ITEMS) |
173 | .long KA2PA(gdt)-BOOT_OFFSET |
172 | .long KA2PA(gdt)-BOOT_OFFSET |
174 | - | ||
175 | .global ap_bootstrap_gdtr |
- | |
176 | ap_bootstrap_gdtr: |
- | |
177 | .word gdtselector(GDT_ITEMS) |
- | |
178 | .long KA2PA(gdt)-BOOT_OFFSET |
- |