aboutsummaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu')
-rw-r--r--src/cpu/amd/smm/smm_init.c6
-rw-r--r--src/cpu/x86/smm/smm_module_loader.c3
2 files changed, 2 insertions, 7 deletions
diff --git a/src/cpu/amd/smm/smm_init.c b/src/cpu/amd/smm/smm_init.c
index c87b70109f..4d04cf7762 100644
--- a/src/cpu/amd/smm/smm_init.c
+++ b/src/cpu/amd/smm/smm_init.c
@@ -26,9 +26,6 @@
#include <cpu/x86/smm.h>
#include <string.h>
-extern unsigned char _binary_smm_start;
-extern unsigned char _binary_smm_size;
-
void smm_init(void)
{
msr_t msr, syscfg_orig, mtrr_aseg_orig;
@@ -63,7 +60,8 @@ void smm_init(void)
enable_cache();
/* copy the real SMM handler */
- memcpy((void *)SMM_BASE, &_binary_smm_start, (size_t)&_binary_smm_size);
+ memcpy((void *)SMM_BASE, _binary_smm_start,
+ _binary_smm_end - _binary_smm_start);
wbinvd();
disable_cache();
diff --git a/src/cpu/x86/smm/smm_module_loader.c b/src/cpu/x86/smm/smm_module_loader.c
index 139bce13ab..b8edf3969e 100644
--- a/src/cpu/x86/smm/smm_module_loader.c
+++ b/src/cpu/x86/smm/smm_module_loader.c
@@ -45,9 +45,6 @@ struct smm_stub_params {
*/
extern unsigned char _binary_smmstub_start[];
-/* This is the SMM handler that the stub calls. It is encoded as an rmodule. */
-extern unsigned char _binary_smm_start[];
-
/* Per CPU minimum stack size. */
#define SMM_MINIMUM_STACK_SIZE 32