Changeset 4f1475d4 in mainline


Ignore:
Timestamp:
2005-09-04T19:43:15Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f9e5422
Parents:
ee7e6ace
Message:

Added preprocessed linker script to AMD architecture, so that
the constants are all only in the header files.

Files:
8 edited
1 moved

Legend:

Unmodified
Added
Removed
  • arch/amd64/Makefile.inc

    ree7e6ace r4f1475d4  
    2323CPPFLAGS=$(DEFS) -nostdinc -I../include
    2424CFLAGS=$(CPPFLAGS) -nostdlib -fno-builtin -fno-unwind-tables -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -march=opteron -m64 -mcmodel=kernel -mno-red-zone
    25 LFLAGS=-M -T ../arch/amd64/_link.ld
     25LFLAGS=-M
     26
     27../arch/amd64/_link.ld: ../arch/amd64/_link.ld.in
     28        $(CC) $(CFLAGS) -E -x c $< | grep -v "^\#" > $@
    2629
    2730arch_sources = arch/dummy.s \
  • arch/amd64/_link.ld.in

    ree7e6ace r4f1475d4  
    99 */
    1010
     11#define __ASM__
     12#include <arch/boot/boot.h>
     13#include <arch/mm/page.h>
     14
    1115OUTPUT_FORMAT(binary)
    1216ENTRY(kernel_image_start)
    1317
    1418SECTIONS {
    15         .unmapped 0x8000: AT (0x8000) {
     19        .unmapped BOOTSTRAP_OFFSET: AT (BOOTSTRAP_OFFSET) {
    1620                unmapped_ktext_start = .;
    1721                *(K_TEXT_START);
     
    2428        }
    2529
    26         .mapped (0xffffffff80100000+0x8000+SIZEOF(.unmapped)) : AT (0x8000+SIZEOF(.unmapped)) {
     30        .mapped (PA2KA(BOOT_OFFSET+BOOTSTRAP_OFFSET)+SIZEOF(.unmapped)) : AT (BOOTSTRAP_OFFSET+SIZEOF(.unmapped)) {
    2731                ktext_start = .;
    2832                *(BOOT_DATA);
     
    6367
    6468
    65         e820table_boot = e820table - _map_address;
    66         e820counter_boot = e820counter - _map_address;
    67         real_bootstrap_gdtr = real_bootstrap_gdtr_boot + _ka2pa_offset;
     69        e820table_boot = KA2PA(e820table) - BOOT_OFFSET;
     70        e820counter_boot = KA2PA(e820counter) - BOOT_OFFSET;
     71        real_bootstrap_gdtr = PA2KA(real_bootstrap_gdtr_boot);
    6872}
  • arch/amd64/include/mm/page.h

    ree7e6ace r4f1475d4  
    3939
    4040#ifndef __ASM__
    41 # define KA2PA(x)      (((__address) (x)) + 0x80000000)
    42 # define PA2KA(x)      (((__address) (x)) - 0x80000000)
     41# define KA2PA(x)      (((__address) (x)) - 0xffffffff80000000)
     42# define PA2KA(x)      (((__address) (x)) + 0xffffffff80000000)
    4343#else
    44 # define KA2PA(x)      ((x) + 0x80000000)
    45 # define PA2KA(x)      ((x) - 0x80000000)
     44# define KA2PA(x)      ((x) - 0xffffffff80000000)
     45# define PA2KA(x)      ((x) + 0xffffffff80000000)
    4646#endif
    4747
  • arch/ia32/Makefile.inc

    ree7e6ace r4f1475d4  
    1919CPPFLAGS=$(DEFS) -nostdinc -I../include
    2020CFLAGS=$(CPPFLAGS) -nostdlib -fno-builtin -fomit-frame-pointer -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3
    21 LFLAGS=-M -no-check-sections -T ../arch/ia32/_link.ld
     21LFLAGS=-M -no-check-sections
    2222
    2323arch_sources= \
  • arch/ia64/Makefile.inc

    ree7e6ace r4f1475d4  
    1717CPPFLAGS=$(DEFS) -nostdinc -I../include
    1818CFLAGS=$(CPPFLAGS) -mconstant-gp -nostdlib -fno-builtin -fno-unwind-tables -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3
    19 LFLAGS=-EL -M -T ../arch/ia64/_link.ld
     19LFLAGS=-EL -M
    2020
    2121
  • arch/mips/Makefile.inc

    ree7e6ace r4f1475d4  
    1616CPPFLAGS=$(DEFS) -mno-abicalls -nostdinc -I../include
    1717CFLAGS=$(CPPFLAGS) -mips2 -G 0 -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O2 -msoft-float
    18 LFLAGS=-mips2 -M -no-check-sections -T ../arch/mips/_link.ld
     18LFLAGS=-mips2 -M -no-check-sections
    1919
    2020arch_sources= \
  • arch/ppc/Makefile.inc

    ree7e6ace r4f1475d4  
    1616CPPFLAGS=$(DEFS) -nostdinc -I../include
    1717CFLAGS=$(CPPFLAGS) -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O2
    18 LFLAGS=-M -no-check-sections -N -T ../arch/ppc/_link.ld
     18LFLAGS=-M -no-check-sections -N
    1919
    2020arch_sources= \
  • src/Makefile

    ree7e6ace r4f1475d4  
    7474        -$(MAKE) clean
    7575
    76 kernel.bin: $(arch_objects) $(objects) $(test_objects)
     76kernel.bin: $(arch_objects) $(objects) $(test_objects) ../arch/$(ARCH)/_link.ld
    7777        $(OBJCOPY) -I binary -O $(BFD_NAME) -B $(BFD_ARCH) --prefix-sections=symtab Makefile debug/empty_map.o
    78         $(LD) $(LFLAGS) $(arch_objects) $(objects) $(test_objects) debug/empty_map.o -o $@ -Map kernel.map.pre
     78        $(LD) -T ../arch/$(ARCH)/_link.ld $(LFLAGS) $(arch_objects) $(objects) $(test_objects) debug/empty_map.o -o $@ -Map kernel.map.pre
    7979        ../tools/genmap.py kernel.map.pre debug/real_map.bin
    8080        $(OBJCOPY) -I binary -O $(BFD_NAME) -B $(BFD_ARCH) --prefix-sections=symtab debug/real_map.bin debug/real_map.o
    81         $(LD) $(LFLAGS) $(arch_objects) $(objects) $(test_objects) debug/real_map.o -o $@ -Map kernel.map       
     81        $(LD) -T ../arch/$(ARCH)/_link.ld $(LFLAGS) $(arch_objects) $(objects) $(test_objects) debug/real_map.o -o $@ -Map kernel.map
    8282
    8383%.s: %.S
  • src/clean.amd64

    ree7e6ace r4f1475d4  
    66find ../arch/amd64 -type l | xargs rm
    77rm ../arch/amd64/src/context_offset.h
     8rm ../arch/amd64/_link.ld
    89rm ../tools/amd64/gencontext
Note: See TracChangeset for help on using the changeset viewer.