[coreboot-gerrit] Patch set updated for coreboot: 6358791 x86: ensure SMM entry points are defined

Aaron Durbin (adurbin@google.com) gerrit at coreboot.org
Mon Mar 30 05:41:04 CEST 2015


Aaron Durbin (adurbin at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9160

-gerrit

commit 6358791b6cc3568933254982d41a970aba67d37e
Author: Aaron Durbin <adurbin at chromium.org>
Date:   Sun Mar 29 22:16:55 2015 -0500

    x86: ensure SMM entry points are defined
    
    With the garbage collect sections patches one needs to
    ensure there is a root symbol to root the garbage collection
    from. Without this patch many symbols and sections will be
    culled incorrectly.
    
    Change-Id: Ibb579d18d4819af666d6ec7dfc30776e8c404b71
    Signed-off-by: Aaron Durbin <adurbin at chromium.org>
---
 src/cpu/x86/smm/smm.ld            | 1 +
 src/cpu/x86/smm/smm_tseg.ld       | 6 ++++--
 src/cpu/x86/smm/smmhandler.S      | 1 +
 src/cpu/x86/smm/smmhandler_tseg.S | 1 +
 4 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/cpu/x86/smm/smm.ld b/src/cpu/x86/smm/smm.ld
index 5d316a8..6cbde09 100644
--- a/src/cpu/x86/smm/smm.ld
+++ b/src/cpu/x86/smm/smm.ld
@@ -1,6 +1,7 @@
 
 /* Maximum number of CPUs/cores */
 CPUS = 4;
+ENTRY(smm_handler_start);
 
 SECTIONS
 {
diff --git a/src/cpu/x86/smm/smm_tseg.ld b/src/cpu/x86/smm/smm_tseg.ld
index 99f2aa0..e8f067d 100644
--- a/src/cpu/x86/smm/smm_tseg.ld
+++ b/src/cpu/x86/smm/smm_tseg.ld
@@ -1,5 +1,6 @@
 /* Maximum number of CPUs/cores */
 CPUS = 16;
+ENTRY(smm_handler_start);
 
 SECTIONS
 {
@@ -52,11 +53,12 @@ SECTIONS
 		/* C read-write data of the SMM handler */
 		 . = ALIGN(4);
 		*(.data)
+		*(.data.*)
 
 		/* C uninitialized data of the SMM handler */
 		 . = ALIGN(4);
-		*(.bss)
-		*(.sbss)
+		*(.bss.*)
+		*(.sbss.*)
 		*(COMMON)
 		 . = ALIGN(4);
 
diff --git a/src/cpu/x86/smm/smmhandler.S b/src/cpu/x86/smm/smmhandler.S
index 5d3aae3..611c0f3 100644
--- a/src/cpu/x86/smm/smmhandler.S
+++ b/src/cpu/x86/smm/smmhandler.S
@@ -75,6 +75,7 @@
  *
  * All the bad magic is not all that bad after all.
  */
+.global smm_handler_start
 smm_handler_start:
 	movw    $(smm_gdtptr16 - smm_handler_start + SMM_HANDLER_OFFSET), %bx
 	data32  lgdt %cs:(%bx)
diff --git a/src/cpu/x86/smm/smmhandler_tseg.S b/src/cpu/x86/smm/smmhandler_tseg.S
index c9d78b9..ee8bd26 100644
--- a/src/cpu/x86/smm/smmhandler_tseg.S
+++ b/src/cpu/x86/smm/smmhandler_tseg.S
@@ -91,6 +91,7 @@
  *
  * All the bad magic is not all that bad after all.
  */
+.global smm_handler_start
 smm_handler_start:
 	movl	$(TSEG_BAR), %eax	/* Get TSEG base from PCIE */
 	addr32	movl (%eax), %edx	/* Save TSEG_BAR in %edx */



More information about the coreboot-gerrit mailing list