Subversion Repositories HelenOS-historic

Rev

Rev 602 | Rev 696 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 602 Rev 694
Line 10... Line 10...
10
 
10
 
11
#define __ASM__
11
#define __ASM__
12
#include <arch/boot/boot.h>
12
#include <arch/boot/boot.h>
13
#include <arch/mm/page.h>
13
#include <arch/mm/page.h>
14
 
14
 
15
ENTRY(kernel_image_start)
-
 
16
 
-
 
17
SECTIONS {
15
SECTIONS {
18
	.unmapped BOOTSTRAP_OFFSET: AT (BOOTSTRAP_OFFSET) {
16
	.unmapped BOOT_OFFSET: AT (0) {
19
		unmapped_ktext_start = .;
17
		unmapped_ktext_start = .;
20
		*(K_TEXT_START);
18
		*(K_TEXT_START);
21
		*(K_TEXT_START_2);
-
 
22
		unmapped_ktext_end = .;
19
		unmapped_ktext_end = .;
23
 
20
 
24
		unmapped_kdata_start = .;
21
		unmapped_kdata_start = .;
25
		*(K_DATA_START);
22
		*(K_DATA_START);
26
		unmapped_kdata_end = .;
23
		unmapped_kdata_end = .;
27
	}
24
	}
28
 
25
 
29
	.mapped (PA2KA(BOOT_OFFSET+BOOTSTRAP_OFFSET)+SIZEOF(.unmapped)) : AT (BOOTSTRAP_OFFSET+SIZEOF(.unmapped)) {
26
	.mapped (PA2KA(BOOT_OFFSET)+SIZEOF(.unmapped)) : AT (SIZEOF(.unmapped)) {
30
		ktext_start = .;
27
		ktext_start = .;
31
		*(BOOT_DATA);
-
 
32
		*(.text);
28
		*(.text);
33
		ktext_end = .;
29
		ktext_end = .;
34
 
30
 
35
		kdata_start = .;
31
		kdata_start = .;
36
		*(.data);		/* initialized data */
32
		*(.data);		/* initialized data */
37
		*(.rodata*);		/* string literals */
33
		*(.rodata*);		/* string literals */
38
		hardcoded_load_address = .;
34
		hardcoded_load_address = .;
39
		QUAD(PA2KA(BOOT_OFFSET+BOOTSTRAP_OFFSET));
35
		QUAD(PA2KA(BOOT_OFFSET));
40
		hardcoded_ktext_size = .;
36
		hardcoded_ktext_size = .;
41
		QUAD(ktext_end - ktext_start + (unmapped_ktext_end - unmapped_ktext_start));
37
		QUAD(ktext_end - ktext_start + (unmapped_ktext_end - unmapped_ktext_start));
42
		hardcoded_kdata_size = .;
38
		hardcoded_kdata_size = .;
43
		QUAD(kdata_end - kdata_start + (unmapped_kdata_end - unmapped_kdata_start));
39
		QUAD(kdata_end - kdata_start + (unmapped_kdata_end - unmapped_kdata_start));
44
		hardcoded_unmapped_ktext_size = .;
40
		hardcoded_unmapped_ktext_size = .;
Line 54... Line 50...
54
 
50
 
55
		*(.bss);		/* uninitialized static variables */
51
		*(.bss);		/* uninitialized static variables */
56
 
52
 
57
		kdata_end = .;
53
		kdata_end = .;
58
	}
54
	}
59
 
-
 
60
	_hardcoded_kernel_size = (ktext_end - ktext_start) + (unmapped_ktext_end - unmapped_ktext_start) + (kdata_end - kdata_start) + (unmapped_kdata_end - unmapped_kdata_start);
-
 
61
 
-
 
62
	/* Symbols that need to be accessed both from real mode & long mode */
-
 
63
	/* e820*_boot is real mode (pre-above-1MB-move), e820* is */
-
 
64
	/* kernel mapped above-1MB-physical copied symbol */
-
 
65
	e820table_boot = KA2PA(e820table) - BOOT_OFFSET;
-
 
66
	e820counter_boot = KA2PA(e820counter) - BOOT_OFFSET;
-
 
67
 
-
 
68
	/* real_bootstrap_gdtr is mapped real_bootstrap_gdtr_boot */
-
 
69
	/* It is physically outside of kernel area, we have to access */
-
 
70
	/* it after modification from long mode for booting */
-
 
71
	/* SMP slave processors */
-
 
72
	real_bootstrap_gdtr = PA2KA(real_bootstrap_gdtr_boot);
-
 
73
}
55
}