diff options
author | Stefan Reinauer <stepan@coresystems.de> | 2009-01-19 21:20:22 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2009-01-19 21:20:22 +0000 |
commit | 269563a423f9291e84b5a93859a3e17767cf27a0 (patch) | |
tree | d7bfed265b6ade33667641589e85db06b5e337ee /src/cpu/x86/smm/smm.ld | |
parent | 0fd183ce72c44f42859924de5739c73c249e7df0 (diff) | |
download | coreboot-269563a423f9291e84b5a93859a3e17767cf27a0.tar.xz |
First shot at factoring SMM code into generic parts and southbridge specific
parts.
This should help to reduce the code duplication for Rudolf's K8/VIA SMM
implementation...
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Joseph Smith <joe@settoplinux.org>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3870 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/cpu/x86/smm/smm.ld')
-rw-r--r-- | src/cpu/x86/smm/smm.ld | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/cpu/x86/smm/smm.ld b/src/cpu/x86/smm/smm.ld new file mode 100644 index 0000000000..1b25c2d2f8 --- /dev/null +++ b/src/cpu/x86/smm/smm.ld @@ -0,0 +1,53 @@ + +/* Maximum number of CPUs/cores */ +CPUS = 4; + +SECTIONS +{ + /* This is the actual SMM handler. + * + * We just put code, rodata, data and bss all in a row. + */ + . = 0xa0000; + .handler (.): { + /* Assembler stub */ + *(.handler) + + /* C code of the SMM handler */ + *(.text); + *(.text.*); + + /* C read-only data of the SMM handler */ + . = ALIGN(16); + *(.rodata) + *(.rodata.*) + + /* C read-write data of the SMM handler */ + . = ALIGN(4); + *(.data) + + /* C uninitialized data of the SMM handler */ + . = ALIGN(4); + *(.bss) + *(.sbss) + + /* What is this? */ + *(COMMON) + . = ALIGN(4); + } + + /* We are using the ASEG interleaved to stuff the SMM handlers + * for all CPU cores in there. The jump table redirects the execution + * to the actual SMM handler + */ + . = 0xa8000 - (( CPUS - 1) * 0x400); + .jumptable : { + *(.jumptable) + } + + /DISCARD/ : { + *(.comment) + *(.note) + *(.note.*) + } +} |