Changeset 57c2a87 in mainline for kernel/arch/ia32/src
- Timestamp:
- 2016-05-05T13:02:20Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a0d9abcd
- Parents:
- 811770c
- Location:
- kernel/arch/ia32/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/boot/multiboot.S
r811770c r57c2a87 35 35 #include <genarch/multiboot/multiboot.h> 36 36 #include <arch/cpuid.h> 37 #include <arch/cpu.h> 37 38 38 39 #define START_STACK (BOOT_OFFSET - BOOT_STACK_SIZE) … … 166 167 /* Paging features */ 167 168 movl %cr4, %ecx 168 orl $ (1 << 4), %ecx/* PSE on */169 andl $ (~(1 << 5)), %ecx/* PAE off */169 orl $CR4_PSE, %ecx /* PSE on */ 170 andl $~CR4_PAE, %ecx /* PAE off */ 170 171 movl %ecx, %cr4 171 172 … … 191 192 192 193 movl %cr0, %ebx 193 orl $ (1 << 31), %ebx/* paging on */194 orl $CR0_PG, %ebx /* paging on */ 194 195 movl %ebx, %cr0 195 196 ret … … 205 206 /* Paging features */ 206 207 movl %cr4, %ecx 207 andl $ (~(1 << 5)), %ecx /* PAE off */208 andl $~CR4_PAE, %ecx /* PAE off */ 208 209 movl %ecx, %cr4 209 210 … … 277 278 278 279 movl %cr0, %ebx 279 orl $ (1 << 31), %ebx /* paging on */280 orl $CR0_PG, %ebx /* paging on */ 280 281 movl %ebx, %cr0 281 282 -
kernel/arch/ia32/src/boot/vesa_real.inc
r811770c r57c2a87 49 49 vesa_init_real: 50 50 mov %cr0, %eax 51 and $~ 1, %eax51 and $~CR0_PE, %eax 52 52 mov %eax, %cr0 53 53 … … 352 352 353 353 mov %cr0, %ecx 354 or $ 1, %ecx354 or $CR0_PE, %ecx 355 355 mov %ecx, %cr0 356 356 -
kernel/arch/ia32/src/cpu/cpu.c
r811770c r57c2a87 72 72 void fpu_disable(void) 73 73 { 74 asm volatile ( 75 "mov %%cr0, %%eax\n" 76 "or $8, %%eax\n" 77 "mov %%eax, %%cr0\n" 78 ::: "%eax" 79 ); 74 write_cr0(read_cr0() & ~CR0_TS); 80 75 } 81 76 82 77 void fpu_enable(void) 83 78 { 84 asm volatile ( 85 "mov %%cr0, %%eax\n" 86 "and $0xffFFffF7, %%eax\n" 87 "mov %%eax,%%cr0\n" 88 ::: "%eax" 89 ); 79 write_cr0(read_cr0() | CR0_TS); 90 80 } 91 81 … … 115 105 "mov %[help], %%cr4\n" 116 106 : [help] "+r" (help) 117 : [mask] "i" (CR4_OSFXSR _MASK | CR4_OSXMMEXCPT_MASK)107 : [mask] "i" (CR4_OSFXSR | CR4_OSXMMEXCPT) 118 108 ); 119 109 } -
kernel/arch/ia32/src/smp/ap.S
r811770c r57c2a87 37 37 #include <arch/mm/page.h> 38 38 #include <arch/pm.h> 39 #include <arch/cpu.h> 39 40 40 41 .section K_TEXT_START, "ax" … … 63 64 /* switch to protected mode */ 64 65 movl %cr0, %eax 65 orl $ 1, %eax66 orl $CR0_PE, %eax 66 67 movl %eax, %cr0 67 68 jmpl $KTEXT, $jump_to_kernel - BOOT_OFFSET + AP_BOOT_OFFSET
Note:
See TracChangeset
for help on using the changeset viewer.