Stefan Reinauer | debb11f | 2008-10-29 04:46:52 +0000 | [diff] [blame] | 1 | |
| 2 | /* Maximum number of CPUs/cores */ |
| 3 | CPUS = 4; |
| 4 | |
| 5 | SECTIONS |
| 6 | { |
Stefan Reinauer | 14e2277 | 2010-04-27 06:56:47 +0000 | [diff] [blame] | 7 | /* This is the actual SMM handler. |
Stefan Reinauer | debb11f | 2008-10-29 04:46:52 +0000 | [diff] [blame] | 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) |
Stefan Reinauer | 14e2277 | 2010-04-27 06:56:47 +0000 | [diff] [blame] | 46 | } |
Stefan Reinauer | debb11f | 2008-10-29 04:46:52 +0000 | [diff] [blame] | 47 | |
| 48 | /DISCARD/ : { |
| 49 | *(.comment) |
| 50 | *(.note) |
| 51 | *(.note.*) |
Patrick Georgi | 9c41063 | 2014-06-25 17:54:54 +0200 | [diff] [blame^] | 52 | *(.eh_frame) |
| 53 | *(.debug_*) |
Stefan Reinauer | debb11f | 2008-10-29 04:46:52 +0000 | [diff] [blame] | 54 | } |
| 55 | } |