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