From owner-svn-src-projects@FreeBSD.ORG Sun Nov 6 15:51:55 2011 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3832106566B; Sun, 6 Nov 2011 15:51:55 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D3A5C8FC1C; Sun, 6 Nov 2011 15:51:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pA6Fpt71028600; Sun, 6 Nov 2011 15:51:55 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pA6FptAG028598; Sun, 6 Nov 2011 15:51:55 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201111061551.pA6FptAG028598@svn.freebsd.org> From: Andreas Tobler Date: Sun, 6 Nov 2011 15:51:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r227218 - projects/pseries/powerpc/pseries X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Nov 2011 15:51:56 -0000 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