summaryrefslogtreecommitdiff
path: root/src/cpu/x86/smm/smmrelocate.S
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2010-08-01 15:41:14 +0000
committerStefan Reinauer <stepan@openbios.org>2010-08-01 15:41:14 +0000
commitbc0f7a68df9c07518eb34ef4549a2f704ededcdd (patch)
tree586e2cc67607b67de202f905fc28c667a05212a3 /src/cpu/x86/smm/smmrelocate.S
parent2d33dc40965c6f7f3dae585a330c2cd06b816c85 (diff)
- fix SMM code relocation race
- make SMM relocation debugging Kconfig accessible Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Patrick Georgi <patrick.georgi@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5676 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/cpu/x86/smm/smmrelocate.S')
-rw-r--r--src/cpu/x86/smm/smmrelocate.S20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/cpu/x86/smm/smmrelocate.S b/src/cpu/x86/smm/smmrelocate.S
index 50a8f28c3f..e795359783 100644
--- a/src/cpu/x86/smm/smmrelocate.S
+++ b/src/cpu/x86/smm/smmrelocate.S
@@ -1,7 +1,7 @@
/*
* This file is part of the coreboot project.
*
- * Copyright (C) 2008 coresystems GmbH
+ * Copyright (C) 2008-2010 coresystems GmbH
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -24,12 +24,15 @@
// FIXME: Is this piece of code southbridge specific, or
// can it be cleaned up so this include is not required?
-// It's needed right now because we get our PM_BASE from
+// It's needed right now because we get our DEFAULT_PMBASE from
// here.
+#if defined(CONFIG_SOUTHBRIDGE_INTEL_I82801GX)
#include "../../../southbridge/intel/i82801gx/i82801gx.h"
-
-#undef DEBUG_SMM_RELOCATION
-//#define DEBUG_SMM_RELOCATION
+#elif defined(CONFIG_SOUTHBRIDGE_INTEL_I82801DX)
+#include "../../../southbridge/intel/i82801dx/i82801dx.h"
+#else
+#error "Southbridge needs SMM handler support."
+#endif
#define LAPIC_ID 0xfee00020
@@ -125,7 +128,7 @@ smm_relocate:
addr32 movl %eax, (%ebx)
- /* The next section of code is hardware specific */
+ /* The next section of code is potentially southbridge specific */
/* Clear SMI status */
movw $(DEFAULT_PMBASE + 0x34), %dx
@@ -143,8 +146,9 @@ smm_relocate:
orl $(1 << 1), %eax
outl %eax, %dx
- /* End of hardware specific section. */
-#ifdef DEBUG_SMM_RELOCATION
+ /* End of southbridge specific section. */
+
+#if defined(CONFIG_DEBUG_SMM_RELOCATION) && CONFIG_DEBUG_SMM_RELOCATION
/* print [SMM-x] so we can determine if CPUx went to SMM */
movw $CONFIG_TTYS0_BASE, %dx
mov $'[', %al