Changeset cf27a6cb in mainline
- Timestamp:
- 2005-09-21T22:34:54Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 23443b2
- Parents:
- 74b2f5bf
- Location:
- arch/ia32/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/src/boot/boot.S
r74b2f5bf rcf27a6cb 214 214 # 215 215 # Here we setup mapping for both the unmapped and mapped sections of the kernel. 216 # For simplicity, we set only one 4M page for 0x00000000 and one for 0x80000000.216 # For simplicity, we map the entire 4G space. 217 217 # 218 218 movl %cr4, %ecx … … 220 220 movl %ecx, %cr4 # turn PSE on 221 221 222 movl $(page_directory+0), %esi 223 movl $(page_directory+2048), %edi 224 xorl %ecx, %ecx 225 xorl %ebx, %ebx 226 0: 222 227 movl $((1<<7)|(1<<0)), %eax 223 movl %eax, page_directory # mapping 0x00000000 => 0x00000000 224 225 movl $(page_directory+2048), %edx 226 movl %eax, (%edx) # mapping 0x80000000 => 0x00000000 227 228 leal page_directory, %eax 229 movl %eax, %cr3 228 orl %ebx, %eax 229 movl %eax, (%esi,%ecx,4) # mapping 0x00000000+%ecx*4M => 0x00000000+%ecx*4M 230 movl %eax, (%edi,%ecx,4) # mapping 0x80000000+%ecx*4M => 0x00000000+%ecx*4M 231 addl $(4*1024*1024), %ebx 232 233 incl %ecx 234 cmpl $512, %ecx 235 jl 0b 236 237 movl %esi, %cr3 230 238 231 239 # turn paging on -
arch/ia32/src/mm/frame.c
r74b2f5bf rcf27a6cb 44 44 45 45 if (config.cpu_active == 1) { 46 for (i= e820counter;i>0;i--) {47 if (e820table[i -1].type==MEMMAP_MEMORY_AVAILABLE) {48 z = zone_create(e820table[i -1].base_address, e820table[i-1].size & ~(FRAME_SIZE-1), 0);46 for (i=0;i<e820counter;i++) { 47 if (e820table[i].type==MEMMAP_MEMORY_AVAILABLE) { 48 z = zone_create(e820table[i].base_address, e820table[i].size & ~(FRAME_SIZE-1), 0); 49 49 if (!z) { 50 panic("Cannot allocate zone (%dB).\n", e820table[i -1].size & ~(FRAME_SIZE-1));50 panic("Cannot allocate zone (%dB).\n", e820table[i].size & ~(FRAME_SIZE-1)); 51 51 } 52 52 zone_attach(z);
Note:
See TracChangeset
for help on using the changeset viewer.