tile: provide traceability for hypervisor calls
[pandora-kernel.git] / arch / tile / kernel / vmlinux.lds.S
1 #include <asm-generic/vmlinux.lds.h>
2 #include <asm/page.h>
3 #include <asm/cache.h>
4 #include <asm/thread_info.h>
5 #include <hv/hypervisor.h>
6
7 /* Text loads starting from the supervisor interrupt vector address. */
8 #define TEXT_OFFSET MEM_SV_INTRPT
9
10 OUTPUT_ARCH(tile)
11 ENTRY(_start)
12 jiffies = jiffies_64;
13
14 PHDRS
15 {
16   intrpt1 PT_LOAD ;
17   text PT_LOAD ;
18   data PT_LOAD ;
19 }
20 SECTIONS
21 {
22   /* Text is loaded with a different VA than data; start with text. */
23   #undef LOAD_OFFSET
24   #define LOAD_OFFSET TEXT_OFFSET
25
26   /* Interrupt vectors */
27   .intrpt1 (LOAD_OFFSET) : AT ( 0 )   /* put at the start of physical memory */
28   {
29     _text = .;
30     *(.intrpt1)
31   } :intrpt1 =0
32
33   /* Hypervisor call vectors */
34   . = ALIGN(0x10000);
35   .hvglue : AT (ADDR(.hvglue) - LOAD_OFFSET) {
36     *(.hvglue)
37   } :NONE
38
39   /* Now the real code */
40   . = ALIGN(0x20000);
41   _stext = .;
42   .text : AT (ADDR(.text) - LOAD_OFFSET) {
43     HEAD_TEXT
44     SCHED_TEXT
45     LOCK_TEXT
46     __fix_text_end = .;   /* tile-cpack won't rearrange before this */
47     TEXT_TEXT
48     *(.text.*)
49     *(.coldtext*)
50     *(.fixup)
51     *(.gnu.warning)
52   } :text =0
53   _etext = .;
54
55   /* "Init" is divided into two areas with very different virtual addresses. */
56   INIT_TEXT_SECTION(PAGE_SIZE)
57
58   /* Now we skip back to PAGE_OFFSET for the data. */
59   . = (. - TEXT_OFFSET + PAGE_OFFSET);
60   #undef LOAD_OFFSET
61   #define LOAD_OFFSET PAGE_OFFSET
62
63   . = ALIGN(PAGE_SIZE);
64   __init_begin = .;
65   VMLINUX_SYMBOL(_sinitdata) = .;
66   INIT_DATA_SECTION(16) :data =0
67   PERCPU_SECTION(L2_CACHE_BYTES)
68   . = ALIGN(PAGE_SIZE);
69   VMLINUX_SYMBOL(_einitdata) = .;
70   __init_end = .;
71
72   _sdata = .;                   /* Start of data section */
73
74   RO_DATA_SECTION(PAGE_SIZE)
75
76   /* initially writeable, then read-only */
77   . = ALIGN(PAGE_SIZE);
78   __w1data_begin = .;
79   .w1data : AT(ADDR(.w1data) - LOAD_OFFSET) {
80     VMLINUX_SYMBOL(__w1data_begin) = .;
81     *(.w1data)
82     VMLINUX_SYMBOL(__w1data_end) = .;
83   }
84
85   RW_DATA_SECTION(L2_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
86
87   _edata = .;
88
89   EXCEPTION_TABLE(L2_CACHE_BYTES)
90   NOTES
91
92
93   BSS_SECTION(8, PAGE_SIZE, 1)
94   _end = . ;
95
96   STABS_DEBUG
97   DWARF_DEBUG
98
99   DISCARDS
100 }