svn commit: r262438 - in projects/arm64/sys/arm64: arm64 conf

Andrew Turner andrew at FreeBSD.org
Mon Feb 24 09:40:04 UTC 2014


Author: andrew
Date: Mon Feb 24 09:40:03 2014
New Revision: 262438
URL: http://svnweb.freebsd.org/changeset/base/262438

Log:
  Add EARLY_PRINTF support for the ARM foundation model.

Modified:
  projects/arm64/sys/arm64/arm64/machdep.c
  projects/arm64/sys/arm64/conf/GENERIC

Modified: projects/arm64/sys/arm64/arm64/machdep.c
==============================================================================
--- projects/arm64/sys/arm64/arm64/machdep.c	Mon Feb 24 09:30:50 2014	(r262437)
+++ projects/arm64/sys/arm64/arm64/machdep.c	Mon Feb 24 09:40:03 2014	(r262438)
@@ -255,6 +255,19 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, 
 
 void initarm(void);
 
+#ifdef EARLY_PRINTF
+static void 
+foundation_early_putc(int c)
+{
+	volatile uint32_t *uart = (uint32_t*)0x1c090000;
+
+	/* TODO: Wait for space in the fifo */
+	uart[0] = c;
+}
+
+early_putc_t *early_putc = foundation_early_putc;
+#endif
+
 void
 initarm(void)
 {
@@ -266,5 +279,7 @@ initarm(void)
 	for (i = 0; i < sizeof(str); i++) {
 		*uart = str[i];
 	}
+
+	printf("In initarm on arm64\n");
 }
 

Modified: projects/arm64/sys/arm64/conf/GENERIC
==============================================================================
--- projects/arm64/sys/arm64/conf/GENERIC	Mon Feb 24 09:30:50 2014	(r262437)
+++ projects/arm64/sys/arm64/conf/GENERIC	Mon Feb 24 09:40:03 2014	(r262438)
@@ -79,6 +79,7 @@ options 	INCLUDE_CONFIG_FILE     # Inclu
 #options 	WITNESS			# Enable checks to detect deadlocks and cycles
 #options 	WITNESS_SKIPSPIN	# Don't run witness on spinlocks for speed
 options 	MALLOC_DEBUG_MAXZONES=8	# Separate malloc(9) zones
+options 	EARLY_PRINTF
 
 # Serial (COM) ports
 #device		uart		# Generic UART driver


More information about the svn-src-projects mailing list