svn commit: r227218 - projects/pseries/powerpc/pseries

Andreas Tobler andreast at FreeBSD.org
Sun Nov 6 15:51:56 UTC 2011


Author: andreast
Date: Sun Nov  6 15:51:55 2011
New Revision: 227218
URL: http://svn.freebsd.org/changeset/base/227218

Log:
  Fix my previous commit and honor both, the HVTERM1 and the HVTERMPROT
  buffer size correctly when calling the phyp_hcall.

Modified:
  projects/pseries/powerpc/pseries/phyp_console.c

Modified: projects/pseries/powerpc/pseries/phyp_console.c
==============================================================================
--- projects/pseries/powerpc/pseries/phyp_console.c	Sun Nov  6 15:13:01 2011	(r227217)
+++ projects/pseries/powerpc/pseries/phyp_console.c	Sun Nov  6 15:51:55 2011	(r227218)
@@ -168,6 +168,7 @@ static void
 phyp_uart_putc(struct uart_bas *bas, int c)
 {
 	uint16_t seqno;
+	uint64_t len = 0;
 	union {
 		uint64_t u64;
 		char bytes[8];
@@ -176,6 +177,7 @@ phyp_uart_putc(struct uart_bas *bas, int
 	switch (bas->regshft) {
 	case HVTERM1:
 		cbuf.bytes[0] = c;
+		len = 1;
 		break;
 	case HVTERMPROT:
 		seqno = phyp_outseqno++;
@@ -184,9 +186,10 @@ phyp_uart_putc(struct uart_bas *bas, int
 		cbuf.bytes[2] = (seqno >> 8) & 0xff;
 		cbuf.bytes[3] = seqno & 0xff;
 		cbuf.bytes[4] = c;
+		len = 5;
 		break;
 	}
-	phyp_hcall(H_PUT_TERM_CHAR, (uint64_t)bas->bsh, 5UL, cbuf.u64, 0);
+	phyp_hcall(H_PUT_TERM_CHAR, (uint64_t)bas->bsh, len, cbuf.u64, 0);
 }
 
 static int


More information about the svn-src-projects mailing list