Add support to run SMM handler in TSEG instead of ASEG
[coreboot.git] / src / cpu / x86 / smm / smm_tseg.ld
1 /* Maximum number of CPUs/cores */
2 CPUS = 16;
3
4 SECTIONS
5 {
6         /* This is the actual SMM handler.
7          *
8          * We just put code, rodata, data and bss all in a row.
9          */
10         .handler (.): {
11                 /* Assembler stub */
12                 *(.handler)
13
14                 /* C code of the SMM handler */
15                 *(.text);
16                 *(.text.*);
17
18                 /* C read-only data of the SMM handler */
19                 . = ALIGN(16);
20                 *(.rodata)
21                 *(.rodata.*)
22                 *(.data.rel.ro.*)
23
24                 /* C read-write data of the SMM handler */
25                  . = ALIGN(4);
26                 *(.data)
27
28                 /* C uninitialized data of the SMM handler */
29                  . = ALIGN(4);
30                 *(.bss)
31                 *(.sbss)
32
33                 /* What is this? */
34                 *(COMMON)
35                  . = ALIGN(4);
36         }
37
38         /* We are using the TSEG interleaved to stuff the SMM handlers
39          * for all CPU cores in there. The jump table redirects the execution
40          * to the actual SMM handler
41          */
42         . = 0x8000 - (( CPUS - 1) * 0x400);
43         .jumptable : {
44                 *(.jumptable)
45         }
46
47         /* Data used in early SMM TSEG handler. */
48         . = 0x8400;
49         .earlydata : {
50                 *(.earlydata)
51         }
52
53         /DISCARD/ : {
54                 *(.comment)
55                 *(.note)
56                 *(.note.*)
57         }
58 }