blob: 3fde36e978e0595248296a653a9808c98ddc0bed [file] [log] [blame]
Stefan Reinauerdebb11f2008-10-29 04:46:52 +00001
2/* Maximum number of CPUs/cores */
3CPUS = 4;
Aaron Durbine73dae42015-03-29 22:16:55 -05004ENTRY(smm_handler_start);
Stefan Reinauerdebb11f2008-10-29 04:46:52 +00005
6SECTIONS
7{
Stefan Reinauer14e22772010-04-27 06:56:47 +00008 /* This is the actual SMM handler.
Stefan Reinauerdebb11f2008-10-29 04:46:52 +00009 *
10 * We just put code, rodata, data and bss all in a row.
11 */
12 . = 0xa0000;
13 .handler (.): {
Julius Wernerec5e5e02014-08-20 15:29:56 -070014 _program = .;
Stefan Reinauerdebb11f2008-10-29 04:46:52 +000015 /* Assembler stub */
16 *(.handler)
17
18 /* C code of the SMM handler */
19 *(.text);
20 *(.text.*);
21
22 /* C read-only data of the SMM handler */
23 . = ALIGN(16);
24 *(.rodata)
25 *(.rodata.*)
26
27 /* C read-write data of the SMM handler */
28 . = ALIGN(4);
29 *(.data)
Aaron Durbine73dae42015-03-29 22:16:55 -050030 *(.data.*)
Stefan Reinauerdebb11f2008-10-29 04:46:52 +000031
32 /* C uninitialized data of the SMM handler */
33 . = ALIGN(4);
34 *(.bss)
Aaron Durbine73dae42015-03-29 22:16:55 -050035 *(.bss.*)
Stefan Reinauerdebb11f2008-10-29 04:46:52 +000036 *(.sbss)
Aaron Durbine73dae42015-03-29 22:16:55 -050037 *(.sbss.*)
Stefan Reinauerdebb11f2008-10-29 04:46:52 +000038
Julius Wernerec5e5e02014-08-20 15:29:56 -070039 /* What is this? (Something we don't need with -fno-common.) */
Stefan Reinauerdebb11f2008-10-29 04:46:52 +000040 *(COMMON)
41 . = ALIGN(4);
Julius Wernerec5e5e02014-08-20 15:29:56 -070042 _eprogram = .;
Stefan Reinauerdebb11f2008-10-29 04:46:52 +000043 }
44
45 /* We are using the ASEG interleaved to stuff the SMM handlers
46 * for all CPU cores in there. The jump table redirects the execution
47 * to the actual SMM handler
48 */
49 . = 0xa8000 - (( CPUS - 1) * 0x400);
50 .jumptable : {
Aaron Durbin58d5e212015-05-15 15:23:39 -050051 KEEP(*(.jumptable));
Stefan Reinauer14e22772010-04-27 06:56:47 +000052 }
Stefan Reinauerdebb11f2008-10-29 04:46:52 +000053
54 /DISCARD/ : {
55 *(.comment)
56 *(.note)
57 *(.note.*)
Patrick Georgi9c410632014-06-25 17:54:54 +020058 *(.eh_frame)
59 *(.debug_*)
Stefan Reinauerdebb11f2008-10-29 04:46:52 +000060 }
61}