Rev 282 | Rev 301 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 282 | Rev 289 | ||
---|---|---|---|
Line 6... | Line 6... | ||
6 | * mapped section: |
6 | * mapped section: |
7 | * kernel text |
7 | * kernel text |
8 | * kernel data |
8 | * kernel data |
9 | */ |
9 | */ |
10 | 10 | ||
- | 11 | #define __ASM__ |
|
- | 12 | #include <arch/boot/boot.h> |
|
- | 13 | #include <arch/mm/page.h> |
|
- | 14 | ||
11 | OUTPUT_FORMAT(binary) |
15 | OUTPUT_FORMAT(binary) |
12 | ENTRY(kernel_image_start) |
16 | ENTRY(kernel_image_start) |
13 | 17 | ||
14 | SECTIONS { |
18 | SECTIONS { |
15 | .unmapped 0x8000: AT (0x8000) { |
19 | .unmapped BOOTSTRAP_OFFSET: AT (BOOTSTRAP_OFFSET) { |
16 | unmapped_ktext_start = .; |
20 | unmapped_ktext_start = .; |
17 | *(K_TEXT_START); |
21 | *(K_TEXT_START); |
18 | *(K_TEXT_START_2); |
22 | *(K_TEXT_START_2); |
19 | unmapped_ktext_end = .; |
23 | unmapped_ktext_end = .; |
20 | 24 | ||
21 | unmapped_kdata_start = .; |
25 | unmapped_kdata_start = .; |
22 | *(K_DATA_START); |
26 | *(K_DATA_START); |
23 | unmapped_kdata_end = .; |
27 | unmapped_kdata_end = .; |
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 | ktext_start = .; |
31 | ktext_start = .; |
28 | *(BOOT_DATA); |
32 | *(BOOT_DATA); |
29 | *(.text); |
33 | *(.text); |
30 | ktext_end = .; |
34 | ktext_end = .; |
31 | 35 | ||
Line 60... | Line 64... | ||
60 | _boot_offset = 0x100000; |
64 | _boot_offset = 0x100000; |
61 | _ka2pa_offset = 0xffffffff80000000; |
65 | _ka2pa_offset = 0xffffffff80000000; |
62 | _map_address = _ka2pa_offset + _boot_offset; |
66 | _map_address = _ka2pa_offset + _boot_offset; |
63 | 67 | ||
64 | 68 | ||
65 | e820table_boot = e820table - _map_address; |
69 | e820table_boot = KA2PA(e820table) - BOOT_OFFSET; |
66 | e820counter_boot = e820counter - _map_address; |
70 | e820counter_boot = KA2PA(e820counter) - BOOT_OFFSET; |
67 | real_bootstrap_gdtr = real_bootstrap_gdtr_boot + _ka2pa_offset; |
71 | real_bootstrap_gdtr = PA2KA(real_bootstrap_gdtr_boot); |
68 | } |
72 | } |