From 9b22a6965579ea1867aea291d910c96f386b518b Mon Sep 17 00:00:00 2001 From: Brett Weiland Date: Tue, 24 Aug 2021 14:09:29 -0500 Subject: major backup 8.24.21 --- src/link.ld | 48 ++++++++++++++++++++++-------------------------- 1 file changed, 22 insertions(+), 26 deletions(-) (limited to 'src/link.ld') diff --git a/src/link.ld b/src/link.ld index f45ddec..529d43f 100644 --- a/src/link.ld +++ b/src/link.ld @@ -1,38 +1,34 @@ SEARCH_DIR(objects) -INPUT( -bootloader.o -libc.o -serial.o -video.o -printf.o -page.o -acpi.o -kernel.o -panic.o -) - -_kernel_stack_loc = 0x200000 - 8; -_kernel_loc = 0x100000; -_meminfo_loc = 0x7000; +_kernel_s1_loc = 0xffffffff80000000; +_meminfo = 0x7000; _vbe_infoblock = 0x500; -_stage2_pagetable = 0x200000; -_stage1_pagetable = 0x4000; SECTIONS { - . = 0x0; - bootloader 0x7c00 : + bootloader 0x7c00 : AT(0) { - bootloader.o(.text) + bootloader.o(.text) } - kernel _kernel_loc : - AT (ADDR(bootloader) + SIZEOF(bootloader)) - /*ALIGN(4096)*/ + smp_bootloader 0x8000 : + AT(SIZEOF(bootloader)) { - EXCLUDE_FILE (*bootloader.o) *(.text .data .bss .rodata .comment .eh_frame) + smp_trampoline.o(.text) } + kernel _kernel_s1_loc : + AT (SIZEOF(bootloader)) + { + EXCLUDE_FILE (*bootloader.o) *(.text .data .bss .rodata .comment .eh_frame) + } } -_kernel_size = ((SIZEOF(kernel) / 512) + (SIZEOF(bootloader) / 512)); /* there's a bug here I think!*/ -_bootloader_stage1_size = (SIZEOF(bootloader) / 512); +_kernel_sector_size = ((SIZEOF(kernel) + SIZEOF(smp_bootloader) + 511) / 512); +_kernel_page_size = ((SIZEOF(kernel) + SIZEOF(smp_bootloader) + 0xfff) / 0x1000); +_bootloader_stage1_size = (SIZEOF(bootloader) + 511) / 512; + +__load_start_smp_bootloader = LOADADDR(smp_bootloader); +__load_stop_smp_bootloader = LOADADDR(smp_bootloader) + SIZEOF(smp_bootloader); + +_kernel_stack_loc = (0x100000 + (_kernel_page_size * 0x1000) + 0x2000) - 8; +_kernel_shared_zone_begin = 0x100000 + (_kernel_page_size * 0x1000) + 0x2000; + -- cgit v1.2.3