Changes in / [4c3602c4:d078c9b9] in mainline
- Files:
-
- 80 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
HelenOS.config
r4c3602c4 rd078c9b9 137 137 ! [PLATFORM=mips32&(MACHINE=bmalta|MACHINE=lmalta)] PROCESSOR (choice) 138 138 139 % Kernel memory model140 @ "kernel" Kernel141 @ "large" Large142 ! [PLATFORM=amd64] MEMORY_MODEL (choice)143 144 139 % RAM disk format 145 140 @ "tmpfs" TMPFS image -
defaults/amd64/Makefile.config
r4c3602c4 rd078c9b9 1 1 # Platform 2 2 PLATFORM = amd64 3 4 # Kernel memory model5 MEMORY_MODEL = kernel6 3 7 4 # Ramdisk format -
kernel/arch/amd64/Makefile.inc
r4c3602c4 rd078c9b9 32 32 33 33 FPU_NO_CFLAGS = -mno-sse -mno-sse2 34 CMN1 = -m64 -mcmodel= $(MEMORY_MODEL)-mno-red-zone -fno-unwind-tables -fno-omit-frame-pointer34 CMN1 = -m64 -mcmodel=kernel -mno-red-zone -fno-unwind-tables -fno-omit-frame-pointer 35 35 GCC_CFLAGS += $(CMN1) 36 36 ICC_CFLAGS += $(CMN1) -
kernel/arch/amd64/include/arch/mm/km.h
r4c3602c4 rd078c9b9 38 38 #include <typedefs.h> 39 39 40 #ifdef MEMORY_MODEL_kernel 40 #define KM_AMD64_IDENTITY_START UINT64_C(0xffffffff80000000) 41 #define KM_AMD64_IDENTITY_SIZE UINT64_C(0x0000000080000000) 41 42 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) 59 45 60 46 extern void km_identity_arch_init(void); -
kernel/arch/amd64/include/arch/mm/page.h
r4c3602c4 rd078c9b9 42 42 #define PAGE_SIZE FRAME_SIZE 43 43 44 #ifdef MEMORY_MODEL_kernel45 46 44 #ifndef __ASM__ 47 45 … … 55 53 56 54 #endif /* __ASM__ */ 57 58 #endif /* MEMORY_MODEL_kernel */59 60 #ifdef MEMORY_MODEL_large61 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 */75 55 76 56 /* Number of entries in each level. */ -
kernel/arch/amd64/src/boot/multiboot.S
r4c3602c4 rd078c9b9 430 430 movl multiboot_eax, %edi 431 431 movl multiboot_ebx, %esi 432 433 #ifdef MEMORY_MODEL_large434 movabsq $amd64_pre_main, %rax435 callq *%rax436 #else437 432 callq amd64_pre_main 438 #endif 439 433 440 434 long_status $status_main 441 435 442 436 /* 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 449 438 450 439 /* Not reached */ … … 633 622 ptl2gen 512 7 634 623 635 #ifdef MEMORY_MODEL_kernel636 624 .align 4096 637 625 ptl_1: … … 650 638 .quad ptl_2_1g + (PTL_WRITABLE | PTL_PRESENT) 651 639 640 652 641 .align 4096 653 642 SYMBOL(ptl_0) … … 655 644 .fill 510, 8, 0 656 645 .quad ptl_1 + (PTL_WRITABLE | PTL_PRESENT) 657 #endif658 659 #ifdef MEMORY_MODEL_large660 .align 4096661 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, 0672 673 .align 4096674 SYMBOL(ptl_0)675 .quad ptl_1 + (PTL_WRITABLE | PTL_PRESENT)676 .fill 255, 8, 0677 .quad ptl_1 + (PTL_WRITABLE | PTL_PRESENT)678 .fill 255, 8, 0679 #endif680 646 681 647 .section K_DATA_START, "aw", @progbits -
kernel/arch/amd64/src/boot/multiboot2.S
r4c3602c4 rd078c9b9 253 253 movl multiboot_eax, %edi 254 254 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 262 256 263 257 /* 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 270 259 271 260 /* Not reached */ -
kernel/arch/amd64/src/context.S
r4c3602c4 rd078c9b9 50 50 movq %r14, CONTEXT_OFFSET_R14(%rdi) 51 51 movq %r15, CONTEXT_OFFSET_R15(%rdi) 52 53 #ifdef MEMORY_MODEL_large 54 movabsq $vreg_ptr, %rsi 55 movq (%rsi), %rsi 56 #else 52 57 53 movq vreg_ptr, %rsi 58 #endif59 54 movq %fs:VREG_TP(%rsi), %rsi 60 55 movq %rsi, CONTEXT_OFFSET_TP(%rdi) … … 84 79 movq %rdx, (%rsp) 85 80 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 91 82 movq vreg_ptr, %rsi 92 #endif93 83 movq %rcx, %fs:VREG_TP(%rsi) 94 84
Note:
See TracChangeset
for help on using the changeset viewer.