Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Nov 2011 15:51:55 +0000 (UTC)
From:      Andreas Tobler <andreast@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r227218 - projects/pseries/powerpc/pseries
Message-ID:  <201111061551.pA6FptAG028598@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111061551.pA6FptAG028598>