Ignore:
Timestamp:
2014-06-16T11:32:05Z (10 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2cb32f9
Parents:
334bf28
Message:

Switch the amd64 kernel (back) from 'large' to 'kernel' memory model.

  • This makes the amd64 kernel 6% smaller and more comfortable to debug.
  • Unlike in the original 'kernel' memory model implementation, KA2PA(PA2KA(x)) == x; for x from kernel identity.
  • Memory outside of the kernel identity region continues to be available by the standard means.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/src/boot/multiboot.S

    r334bf28 r17af882  
    428428       
    429429        /* Call arch_pre_main(multiboot_eax, multiboot_ebx) */
    430         xorq %rdi, %rdi
    431430        movl multiboot_eax, %edi
    432         xorq %rsi, %rsi
    433431        movl multiboot_ebx, %esi
    434        
    435         movabsq $arch_pre_main, %rax
    436         callq *%rax
    437        
     432        callq arch_pre_main
     433
    438434        long_status $status_main
    439435       
    440436        /* Call main_bsp() */
    441         movabsq $main_bsp, %rax
    442         call *%rax
     437        callq main_bsp
    443438       
    444439        /* Not reached */
     
    638633        .quad ptl_2_6g + (PTL_WRITABLE | PTL_PRESENT)
    639634        .quad ptl_2_7g + (PTL_WRITABLE | PTL_PRESENT)
    640         .fill 504, 8, 0
     635        .fill 502, 8, 0
     636        /* Mapping of [0; 2G) at -2G */
     637        .quad ptl_2_0g + (PTL_WRITABLE | PTL_PRESENT)
     638        .quad ptl_2_1g + (PTL_WRITABLE | PTL_PRESENT)
     639
    641640
    642641.align 4096
     
    644643ptl_0:
    645644        .quad ptl_1 + (PTL_WRITABLE | PTL_PRESENT)
    646         .fill 255, 8, 0
     645        .fill 510, 8, 0
    647646        .quad ptl_1 + (PTL_WRITABLE | PTL_PRESENT)
    648         .fill 255, 8, 0
    649647
    650648.section K_DATA_START, "aw", @progbits
Note: See TracChangeset for help on using the changeset viewer.