Changeset cf27a6cb in mainline for arch/ia32/src/boot/boot.S


Ignore:
Timestamp:
2005-09-21T22:34:54Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
23443b2
Parents:
74b2f5bf
Message:

Complete map_kernel() in boot.S to map the entire 4G space.

Change IA-32 frame_arch_init() to add zone with lower base addresses first.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/boot/boot.S

    r74b2f5bf rcf27a6cb  
    214214        #
    215215        # 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.
    217217        #
    218218        movl %cr4, %ecx
     
    220220        movl %ecx, %cr4                                                 # turn PSE on
    221221       
     222        movl $(page_directory+0), %esi
     223        movl $(page_directory+2048), %edi
     224        xorl %ecx, %ecx
     225        xorl %ebx, %ebx
     2260:
    222227        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
    230238       
    231239        # turn paging on
Note: See TracChangeset for help on using the changeset viewer.