Changeset eaf6cd6 in mainline
- Timestamp:
- 2007-04-08T19:11:48Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 328f324b
- Parents:
- ac88c93
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/boot/boot.S
rac88c93 reaf6cd6 67 67 pushl %eax 68 68 69 xorl %eax, %eax 70 cpuid 71 cmp $0x0, %eax # any function > 0? 72 jbe pse_unsupported 73 movl $0x1, %eax # Basic function code 80000001 74 cpuid 75 bt $3, %edx # Test if PSE is supported 76 jc pse_supported 77 78 pse_unsupported: 79 movl $pse_msg, %esi 80 jmp error_halt 81 82 pse_supported: 83 69 84 #ifdef CONFIG_FB 70 85 mov $vesa_init, %esi … … 210 225 211 226 #endif 212 227 213 228 call main_bsp # never returns 214 229 … … 223 238 # 224 239 movl %cr4, %ecx 225 orl $(1<<4), %ecx 226 movl %ecx, %cr4 # turn PSE on 227 228 movl $(page_directory+0), %esi 229 movl $(page_directory+2048), %edi 240 orl $(1 << 4), %ecx # turn PSE on 241 andl $(~(1 << 5)), %ecx # turn PAE off 242 movl %ecx, %cr4 243 244 movl $(page_directory + 0), %esi 245 movl $(page_directory + 2048), %edi 230 246 xorl %ecx, %ecx 231 247 xorl %ebx, %ebx 232 248 0: 233 movl $((1 <<7)|(1<<0)), %eax249 movl $((1 << 7) | (1 << 1) | (1 << 0)), %eax 234 250 orl %ebx, %eax 235 movl %eax, (%esi, %ecx,4) # mapping 0x00000000+%ecx*4M => 0x00000000+%ecx*4M236 movl %eax, (%edi, %ecx,4) # mapping 0x80000000+%ecx*4M => 0x00000000+%ecx*4M237 addl $(4 *1024*1024), %ebx251 movl %eax, (%esi, %ecx, 4) # mapping 0x00000000 + %ecx * 4M => 0x00000000 + %ecx * 4M 252 movl %eax, (%edi, %ecx, 4) # mapping 0x80000000 + %ecx * 4M => 0x00000000 + %ecx * 4M 253 addl $(4 * 1024 * 1024), %ebx 238 254 239 255 incl %ecx … … 243 259 movl %esi, %cr3 244 260 245 # turn paging on246 261 movl %cr0, %ebx 247 orl $(1 <<31), %ebx262 orl $(1 << 31), %ebx # turn paging on 248 263 movl %ebx, %cr0 249 264 ret 265 266 # Print string from %esi to EGA display (in red) and halt 267 error_halt: 268 movl $0xb8000, %edi # base of EGA text mode memory 269 xorl %eax, %eax 270 271 movw $0x3d4, %dx # read bits 8 - 15 of the cursor address 272 movb $0xe, %al 273 outb %al, %dx 274 275 movw $0x3d5, %dx 276 inb %dx, %al 277 shl $8, %ax 278 279 movw $0x3d4, %dx # read bits 0 - 7 of the cursor address 280 movb $0xf, %al 281 outb %al, %dx 282 283 movw $0x3d5, %dx 284 inb %dx, %al 285 286 cmp $1920, %ax 287 jbe cursor_ok 288 movw $1920, %ax # sanity check for the cursor on the last line 289 cursor_ok: 290 291 movw %ax, %bx 292 shl $1, %eax 293 addl %eax, %edi 294 295 movw $0x0c00, %ax # black background, light red foreground 296 cld 297 298 ploop: 299 lodsb 300 cmp $0, %al 301 je ploop_end 302 stosw 303 inc %bx 304 jmp ploop 305 ploop_end: 306 307 movw $0x3d4, %dx # write bits 8 - 15 of the cursor address 308 movb $0xe, %al 309 outb %al, %dx 310 311 movw $0x3d5, %dx 312 movb %bh, %al 313 outb %al, %dx 314 315 movw $0x3d4, %dx # write bits 0 - 7 of the cursor address 316 movb $0xf, %al 317 outb %al, %dx 318 319 movw $0x3d5, %dx 320 movb %bl, %al 321 outb %al, %dx 322 323 cli 324 hlt 250 325 251 326 #ifdef CONFIG_FB … … 427 502 page_directory: 428 503 .space 4096, 0 504 505 pse_msg: 506 .ascii "Page Size Extension not supported. System halted.\0"
Note:
See TracChangeset
for help on using the changeset viewer.