Changeset 4f1475d4 in mainline for arch/amd64
- Timestamp:
- 2005-09-04T19:43:15Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f9e5422
- Parents:
- ee7e6ace
- Location:
- arch/amd64
- Files:
-
- 2 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
arch/amd64/Makefile.inc
ree7e6ace r4f1475d4 23 23 CPPFLAGS=$(DEFS) -nostdinc -I../include 24 24 CFLAGS=$(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 25 LFLAGS=-M 26 27 ../arch/amd64/_link.ld: ../arch/amd64/_link.ld.in 28 $(CC) $(CFLAGS) -E -x c $< | grep -v "^\#" > $@ 26 29 27 30 arch_sources = arch/dummy.s \ -
arch/amd64/_link.ld.in
ree7e6ace r4f1475d4 9 9 */ 10 10 11 #define __ASM__ 12 #include <arch/boot/boot.h> 13 #include <arch/mm/page.h> 14 11 15 OUTPUT_FORMAT(binary) 12 16 ENTRY(kernel_image_start) 13 17 14 18 SECTIONS { 15 .unmapped 0x8000: AT (0x8000) {19 .unmapped BOOTSTRAP_OFFSET: AT (BOOTSTRAP_OFFSET) { 16 20 unmapped_ktext_start = .; 17 21 *(K_TEXT_START); … … 24 28 } 25 29 26 .mapped ( 0xffffffff80100000+0x8000+SIZEOF(.unmapped)) : AT (0x8000+SIZEOF(.unmapped)) {30 .mapped (PA2KA(BOOT_OFFSET+BOOTSTRAP_OFFSET)+SIZEOF(.unmapped)) : AT (BOOTSTRAP_OFFSET+SIZEOF(.unmapped)) { 27 31 ktext_start = .; 28 32 *(BOOT_DATA); … … 63 67 64 68 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); 68 72 } -
arch/amd64/include/mm/page.h
ree7e6ace r4f1475d4 39 39 40 40 #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) 43 43 #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) 46 46 #endif 47 47
Note:
See TracChangeset
for help on using the changeset viewer.