Changes in / [4c3602c4:d078c9b9] in mainline


Ignore:
Files:
80 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • HelenOS.config

    r4c3602c4 rd078c9b9  
    137137! [PLATFORM=mips32&(MACHINE=bmalta|MACHINE=lmalta)] PROCESSOR (choice)
    138138
    139 % Kernel memory model
    140 @ "kernel" Kernel
    141 @ "large" Large
    142 ! [PLATFORM=amd64] MEMORY_MODEL (choice)
    143 
    144139% RAM disk format
    145140@ "tmpfs" TMPFS image
  • defaults/amd64/Makefile.config

    r4c3602c4 rd078c9b9  
    11# Platform
    22PLATFORM = amd64
    3 
    4 # Kernel memory model
    5 MEMORY_MODEL = kernel
    63
    74# Ramdisk format
  • kernel/arch/amd64/Makefile.inc

    r4c3602c4 rd078c9b9  
    3232
    3333FPU_NO_CFLAGS = -mno-sse -mno-sse2
    34 CMN1 = -m64 -mcmodel=$(MEMORY_MODEL) -mno-red-zone -fno-unwind-tables -fno-omit-frame-pointer
     34CMN1 = -m64 -mcmodel=kernel -mno-red-zone -fno-unwind-tables -fno-omit-frame-pointer
    3535GCC_CFLAGS += $(CMN1)
    3636ICC_CFLAGS += $(CMN1)
  • kernel/arch/amd64/include/arch/mm/km.h

    r4c3602c4 rd078c9b9  
    3838#include <typedefs.h>
    3939
    40 #ifdef MEMORY_MODEL_kernel
     40#define KM_AMD64_IDENTITY_START         UINT64_C(0xffffffff80000000)
     41#define KM_AMD64_IDENTITY_SIZE          UINT64_C(0x0000000080000000)
    4142
    42 #define KM_AMD64_IDENTITY_START      UINT64_C(0xffffffff80000000)
    43 #define KM_AMD64_IDENTITY_SIZE       UINT64_C(0x0000000080000000)
    44 
    45 #define KM_AMD64_NON_IDENTITY_START  UINT64_C(0xffff800000000000)
    46 #define KM_AMD64_NON_IDENTITY_SIZE   UINT64_C(0x00007fff80000000)
    47 
    48 #endif /* MEMORY_MODEL_kernel */
    49 
    50 #ifdef MEMORY_MODEL_large
    51 
    52 #define KM_AMD64_IDENTITY_START      UINT64_C(0xffff800000000000)
    53 #define KM_AMD64_IDENTITY_SIZE       UINT64_C(0x0000400000000000)
    54 
    55 #define KM_AMD64_NON_IDENTITY_START  UINT64_C(0xffffc00000000000)
    56 #define KM_AMD64_NON_IDENTITY_SIZE   UINT64_C(0x0000400000000000)
    57 
    58 #endif /* MEMORY_MODEL_large */
     43#define KM_AMD64_NON_IDENTITY_START     UINT64_C(0xffff800000000000)
     44#define KM_AMD64_NON_IDENTITY_SIZE      UINT64_C(0x00007fff80000000)
    5945
    6046extern void km_identity_arch_init(void);
  • kernel/arch/amd64/include/arch/mm/page.h

    r4c3602c4 rd078c9b9  
    4242#define PAGE_SIZE   FRAME_SIZE
    4343
    44 #ifdef MEMORY_MODEL_kernel
    45 
    4644#ifndef __ASM__
    4745
     
    5553
    5654#endif /* __ASM__ */
    57 
    58 #endif /* MEMORY_MODEL_kernel */
    59 
    60 #ifdef MEMORY_MODEL_large
    61 
    62 #ifndef __ASM__
    63 
    64 #define KA2PA(x)  (((uintptr_t) (x)) - UINT64_C(0xffff800000000000))
    65 #define PA2KA(x)  (((uintptr_t) (x)) + UINT64_C(0xffff800000000000))
    66 
    67 #else /* __ASM__ */
    68 
    69 #define KA2PA(x)  ((x) - 0xffff800000000000)
    70 #define PA2KA(x)  ((x) + 0xffff800000000000)
    71 
    72 #endif /* __ASM__ */
    73 
    74 #endif /* MEMORY_MODEL_large */
    7555
    7656/* Number of entries in each level. */
  • kernel/arch/amd64/src/boot/multiboot.S

    r4c3602c4 rd078c9b9  
    430430        movl multiboot_eax, %edi
    431431        movl multiboot_ebx, %esi
    432        
    433 #ifdef MEMORY_MODEL_large
    434         movabsq $amd64_pre_main, %rax
    435         callq *%rax
    436 #else
    437432        callq amd64_pre_main
    438 #endif
    439        
     433
    440434        long_status $status_main
    441435       
    442436        /* Call main_bsp() */
    443 #ifdef MEMORY_MODEL_large
    444         movabsq $main_bsp, %rax
    445         callq *%rax
    446 #else
    447         callq main_bsp
    448 #endif
     437        callq main_bsp
    449438       
    450439        /* Not reached */
     
    633622        ptl2gen 512 7
    634623
    635 #ifdef MEMORY_MODEL_kernel
    636624.align 4096
    637625ptl_1:
     
    650638        .quad ptl_2_1g + (PTL_WRITABLE | PTL_PRESENT)
    651639
     640
    652641.align 4096
    653642SYMBOL(ptl_0)
     
    655644        .fill 510, 8, 0
    656645        .quad ptl_1 + (PTL_WRITABLE | PTL_PRESENT)
    657 #endif
    658 
    659 #ifdef MEMORY_MODEL_large
    660 .align 4096
    661 ptl_1:
    662         /* Identity mapping for [0; 8G) */
    663         .quad ptl_2_0g + (PTL_WRITABLE | PTL_PRESENT)
    664         .quad ptl_2_1g + (PTL_WRITABLE | PTL_PRESENT)
    665         .quad ptl_2_2g + (PTL_WRITABLE | PTL_PRESENT)
    666         .quad ptl_2_3g + (PTL_WRITABLE | PTL_PRESENT)
    667         .quad ptl_2_4g + (PTL_WRITABLE | PTL_PRESENT)
    668         .quad ptl_2_5g + (PTL_WRITABLE | PTL_PRESENT)
    669         .quad ptl_2_6g + (PTL_WRITABLE | PTL_PRESENT)
    670         .quad ptl_2_7g + (PTL_WRITABLE | PTL_PRESENT)
    671         .fill 504, 8, 0
    672 
    673 .align 4096
    674 SYMBOL(ptl_0)
    675         .quad ptl_1 + (PTL_WRITABLE | PTL_PRESENT)
    676         .fill 255, 8, 0
    677         .quad ptl_1 + (PTL_WRITABLE | PTL_PRESENT)
    678         .fill 255, 8, 0
    679 #endif
    680646
    681647.section K_DATA_START, "aw", @progbits
  • kernel/arch/amd64/src/boot/multiboot2.S

    r4c3602c4 rd078c9b9  
    253253        movl multiboot_eax, %edi
    254254        movl multiboot_ebx, %esi
    255        
    256 #ifdef MEMORY_MODEL_large
    257         movabsq $amd64_pre_main, %rax
    258         callq *%rax
    259 #else
    260         callq amd64_pre_main
    261 #endif
     255        callq amd64_pre_main
    262256       
    263257        /* Call main_bsp() */
    264 #ifdef MEMORY_MODEL_large
    265         movabsq $main_bsp, %rax
    266         callq *%rax
    267 #else
    268         callq main_bsp
    269 #endif
     258        callq main_bsp
    270259       
    271260        /* Not reached */
  • kernel/arch/amd64/src/context.S

    r4c3602c4 rd078c9b9  
    5050        movq %r14, CONTEXT_OFFSET_R14(%rdi)
    5151        movq %r15, CONTEXT_OFFSET_R15(%rdi)
    52        
    53 #ifdef MEMORY_MODEL_large
    54         movabsq $vreg_ptr, %rsi
    55         movq (%rsi), %rsi
    56 #else
     52
    5753        movq vreg_ptr, %rsi
    58 #endif
    5954        movq %fs:VREG_TP(%rsi), %rsi
    6055        movq %rsi, CONTEXT_OFFSET_TP(%rdi)
     
    8479        movq %rdx, (%rsp)
    8580       
    86         movq CONTEXT_OFFSET_TP(%rdi), %rcx
    87 #ifdef MEMORY_MODEL_large
    88         movabsq $vreg_ptr, %rsi
    89         movq (%rsi), %rsi
    90 #else
     81        movq CONTEXT_OFFSET_TP(%rdi), %rcx
    9182        movq vreg_ptr, %rsi
    92 #endif
    9383        movq %rcx, %fs:VREG_TP(%rsi)
    9484       
Note: See TracChangeset for help on using the changeset viewer.