]> git.sur5r.net Git - u-boot/blobdiff - lib/tiny-printf.c
mx6slevk: Avoid hardcoded RAM size
[u-boot] / lib / tiny-printf.c
index 451f4f7a673d74e8ae93cee83f0c7c5a690a193e..b334f053cc0ee2645aa3669701f0ec22419bb572 100644 (file)
 #include <stdarg.h>
 #include <serial.h>
 
-static char *bf;
-static char zs;
+/*
+ * This code in here may execute before the DRAM is initialised, so
+ * we should make sure that it doesn't touch BSS, which some boards
+ * put in DRAM.
+ */
+static char *bf __attribute__ ((section(".data")));
+static char zs __attribute__ ((section(".data")));
 
 /* Current position in sprintf() output string */
-static char *outstr;
+static char *outstr __attribute__ ((section(".data")));
 
 static void out(char c)
 {