Changeset dcbc8be in mainline for arch/ia32/src/boot/boot.S
- Timestamp:
- 2005-06-02T23:56:26Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ac5d02b
- Parents:
- 7dcbc0a1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/src/boot/boot.S
r7dcbc0a1 rdcbc8be 40 40 # 41 41 kernel_image_start: 42 cli 42 43 call memmap_arch_init 43 cli44 44 xorw %ax,%ax 45 45 movw %ax,%ds … … 63 63 lidt idtr 64 64 65 # 66 # Here we setup mapping for both the unmapped and mapped sections of the kernel. 67 # For simplicity, we set only one 4M page for 0x00000000 and one for 0x80000000. 68 # 69 movl %cr4, %ecx 70 orl $(1<<4), %ecx 71 movl %ecx, %cr4 # turn PSE on 72 73 movl $((1<<7)|(1<<0)), %eax 74 movl %eax, page_directory # mapping 0x00000000 => 0x00000000 75 76 movl $(page_directory+(4096/2)), %edx 77 movl %eax, (%edx) # mapping 0x80000000 => 0x00000000 78 79 leal page_directory, %eax 80 movl %eax, %cr3 81 82 # turn on paging 83 movl %cr0, %ebx 84 orl $(1<<31), %ebx 85 movl %ebx, %cr0 86 87 movl $_hardcoded_ktext_size, hardcoded_ktext_size 88 movl $_hardcoded_kdata_size, hardcoded_kdata_size 89 movl $_hardcoded_load_address, hardcoded_load_address 90 65 91 call main_bsp # never returns 66 67 92 68 93 cli 69 94 hlt 95 96 .section K_DATA_START 97 98 .align 4096 99 page_directory: 100 .space 4096, 0
Note:
See TracChangeset
for help on using the changeset viewer.