1 #include <nyan/kconfig.h>
3 #include <arch/ptbls_types.h>
7 OUTPUT_ARCH(i386:x86-64);
12 */arch/x64/kernel/head.cpp.s.o(.head_text_va_jmp_code)
15 */arch/x64/kernel/head.cpp.s.o(.head_text)
16 INCLUDE arch/x64/kernel/init/vmnyan.ld.script.part;
18 . = ALIGN(1 << 21); // 2MiB
20 INCLUDE arch/x64/kernel/vmnyan.ld.script.part;
22 . = ALIGN(1 << 21); // 2MiB
24 ld_img_bytes_n = . - ld_img_start;
25 ld_img_p2mibs_n = (ld_img_end - ld_img_start) / (1 << 21);
26 ld_img_p2mibs_n_sz = ld_img_p2mibs_n * (1 << PTS_ENTRY_BYTES_N_LOG2); // byte count of 2MiB entries
27 /* some absolute kernel virtual addresses for initialization, the kernel start virtual
28 address is computed from its page table entries */
29 ld_free_pages_list_va = ABSOLUTE((CANONICAL_HI_VA_MSK \
30 | (CONFIG_KERNEL_PT256TIB_512GIBENT_HI_IDX * (1 << 39) \
31 + CONFIG_KERNEL_PT512GIB_1GIBENT_IDX * (1 << 30))) \
32 + free_pages_list - startup);
34 ASSERT(SIZEOF(.init_va_jmp_code) <= (1 << 21), "ERROR: the code for the jump into our kernel virtual address space does not fit into the first 2MiB page of the kernel image");