[coreboot] r3215 - trunk/coreboot-v2/src/cpu/x86/car

svn at coreboot.org svn at coreboot.org
Fri Apr 4 17:02:45 CEST 2008


Author: hailfinger
Date: 2008-04-04 17:02:45 +0200 (Fri, 04 Apr 2008)
New Revision: 3215

Modified:
   trunk/coreboot-v2/src/cpu/x86/car/cache_as_ram.inc
Log:
Add a workaround for a bug in some binutils version which strictly
interpret whitespace as macro argument delimiter. Since the code is
preprocessed by gcc and the tokenizer may insert whitespace, that can
fail. http://sourceware.org/bugzilla/show_bug.cgi?id=669

The same change was committed in r3044 to the AMD CAR code.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
Acked-by: Jordan Crouse <jordan.crouse at amd.com>


Modified: trunk/coreboot-v2/src/cpu/x86/car/cache_as_ram.inc
===================================================================
--- trunk/coreboot-v2/src/cpu/x86/car/cache_as_ram.inc	2008-04-04 13:28:10 UTC (rev 3214)
+++ trunk/coreboot-v2/src/cpu/x86/car/cache_as_ram.inc	2008-04-04 15:02:45 UTC (rev 3215)
@@ -158,8 +158,15 @@
  * windowoffset is the 32k-aligned window into CAR size
  */
 .macro simplemask carsize, windowoffset
+	.set gas_bug_workaround,(((\carsize - \windowoffset) / 0x1000) - 4)
+	extractmask gas_bug_workaround, %eax
+	.set gas_bug_workaround,(((\carsize - \windowoffset) / 0x1000))
+	extractmask gas_bug_workaround, %edx
+/* Without the gas bug workaround, the entire macro would consist only of the
+ * two lines below.
 	extractmask (((\carsize - \windowoffset) / 0x1000) - 4), %eax
 	extractmask (((\carsize - \windowoffset) / 0x1000)), %edx
+ */
 .endm
 
 #if CacheSize > 0x10000





More information about the coreboot mailing list