Changeset 4f1475d4 in mainline for arch/amd64


Ignore:
Timestamp:
2005-09-04T19:43:15Z (20 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.

Location:
arch/amd64
Files:
2 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
Note: See TracChangeset for help on using the changeset viewer.