From owner-freebsd-ppc@FreeBSD.ORG Sun Nov 27 17:29:32 2005 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 25EBA16A41F for ; Sun, 27 Nov 2005 17:29:32 +0000 (GMT) (envelope-from arun@sharma-home.net) Received: from eagle.sharma-home.net (cpe-24-221-178-208.ca.sprintbbd.net [24.221.178.208]) by mx1.FreeBSD.org (Postfix) with ESMTP id CEF6343D67 for ; Sun, 27 Nov 2005 17:29:29 +0000 (GMT) (envelope-from arun@sharma-home.net) Received: from [192.168.1.234] (unknown [192.168.1.234]) by eagle.sharma-home.net (Postfix) with ESMTP id 2951F1FA73; Sun, 27 Nov 2005 09:29:17 -0800 (PST) Message-ID: <4389EB8A.9070200@sharma-home.net> Date: Sun, 27 Nov 2005 09:23:22 -0800 From: Arun Sharma User-Agent: Mozilla Thunderbird 1.0.6 (Macintosh/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-ppc@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: alex@rinet.ru Subject: strace for powerpc X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2005 17:29:32 -0000 I needed to apply this patch to ports/devel/strace (please review) http://www.sharma-home.net/people/arun/misc/strace-powerpc.patch and symlink freebsd/i386 to freebsd/powerpc (perhaps the directory should be renamed?) to build. -Arun From owner-freebsd-ppc@FreeBSD.ORG Tue Nov 29 15:40:58 2005 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1EE9B16A423 for ; Tue, 29 Nov 2005 15:40:58 +0000 (GMT) (envelope-from arun@sharma-home.net) Received: from eagle.sharma-home.net (cpe-24-221-178-208.ca.sprintbbd.net [24.221.178.208]) by mx1.FreeBSD.org (Postfix) with ESMTP id 270AE43D69 for ; Tue, 29 Nov 2005 15:40:44 +0000 (GMT) (envelope-from arun@sharma-home.net) Received: from [192.168.1.234] (unknown [192.168.1.234]) by eagle.sharma-home.net (Postfix) with ESMTP id CA40D1F8F3; Tue, 29 Nov 2005 07:40:25 -0800 (PST) Message-ID: <438C7502.8050401@sharma-home.net> Date: Tue, 29 Nov 2005 07:34:26 -0800 From: Arun Sharma User-Agent: Mozilla Thunderbird 1.0.6 (Macintosh/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-ppc@freebsd.org References: <4389EB8A.9070200@sharma-home.net> In-Reply-To: <4389EB8A.9070200@sharma-home.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: alex@rinet.ru Subject: Re: strace for powerpc X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2005 15:40:58 -0000 Arun Sharma wrote: > > I needed to apply this patch to ports/devel/strace (please review) > > http://www.sharma-home.net/people/arun/misc/strace-powerpc.patch > > and symlink freebsd/i386 to freebsd/powerpc (perhaps the directory > should be renamed?) to build. > > Couple of things that I noticed aren't working well: - when a system call fails, the return value and the error code are wrong. - I'm not sure if frame.lr is the equivalent of regs.r_eip on i386. From the powerpc manuals, it looks like SRR0 contains the address where the syscall would return to. -Arun From owner-freebsd-ppc@FreeBSD.ORG Wed Nov 30 05:47:24 2005 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4ED8A16A41F for ; Wed, 30 Nov 2005 05:47:24 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from hummer.onthenet.com.au (hummer.OntheNet.com.au [203.13.68.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id E9DF043D58 for ; Wed, 30 Nov 2005 05:47:20 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [203.144.18.182] (CPE-18-182.dsl.OntheNet.net [203.144.18.182]) by hummer.onthenet.com.au (Postfix) with ESMTP id AD38819FDD0; Wed, 30 Nov 2005 15:47:18 +1000 (EST) Message-ID: <438D3D37.60007@freebsd.org> Date: Wed, 30 Nov 2005 15:48:39 +1000 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20041016 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Arun Sharma References: <4389EB8A.9070200@sharma-home.net> <438C7502.8050401@sharma-home.net> In-Reply-To: <438C7502.8050401@sharma-home.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: alex@rinet.ru, freebsd-ppc@freebsd.org Subject: Re: strace for powerpc X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2005 05:47:24 -0000 Hi Arun, > Couple of things that I noticed aren't working well: > > - when a system call fails, the return value and the error code are wrong. You may want to test for the presence of the high bit in the CR rather than equality i.e. +#elif defined(POWERPC) + if ((regs.cr & 0x10000000) == 0x10000000) { + tcp->u_rval = -1; + u_error = regs.fixreg[FIRSTARG]; Also, the value should be OR'd to the CR instead of assigned: + if (error) { + regs.cr |= 0x10000000; + regs.fixreg[FIRSTARG] = error; > - I'm not sure if frame.lr is the equivalent of regs.r_eip on i386. From > the powerpc manuals, it looks like SRR0 contains the address where the > syscall would return to. Yep, that's correct for the syscall exception. later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Fri Dec 2 07:07:26 2005 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 226FC16A41F for ; Fri, 2 Dec 2005 07:07:26 +0000 (GMT) (envelope-from arun@sharma-home.net) Received: from eagle.sharma-home.net (cpe-24-221-178-208.ca.sprintbbd.net [24.221.178.208]) by mx1.FreeBSD.org (Postfix) with ESMTP id D413943D53 for ; Fri, 2 Dec 2005 07:07:25 +0000 (GMT) (envelope-from arun@sharma-home.net) Received: from [192.168.1.234] (unknown [192.168.1.234]) by eagle.sharma-home.net (Postfix) with ESMTP id 5A2258A8 for ; Thu, 1 Dec 2005 23:06:00 -0800 (PST) Message-ID: <438FF13C.7080308@sharma-home.net> Date: Thu, 01 Dec 2005 23:01:16 -0800 From: Arun Sharma User-Agent: Mozilla Thunderbird 1.0.6 (Macintosh/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-ppc@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: ddb and usb keyboards X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2005 07:07:26 -0000 I noticed that I was able to interact with DDB using my usb keyboard when the kernel panics due to a driver bug. However, if I try to manually enter DDB using ctrl+alt+esc on the console, DDB doesn't accept any input and I have to power cycle the machine. Is there a good explanation for this behavior? -Arun From owner-freebsd-ppc@FreeBSD.ORG Fri Dec 2 12:29:15 2005 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 91BB416A420 for ; Fri, 2 Dec 2005 12:29:15 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from cayenne.onthenet.com.au (cayenne.OntheNet.com.au [203.22.124.29]) by mx1.FreeBSD.org (Postfix) with ESMTP id 25E3143D4C for ; Fri, 2 Dec 2005 12:29:15 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [203.144.17.212] (CPE-203-144-17-212.dsl.OntheNet.net [203.144.17.212]) by cayenne.onthenet.com.au (Postfix) with ESMTP id 7C7B775901C; Fri, 2 Dec 2005 22:29:13 +1000 (EST) Message-ID: <43903E19.7030203@freebsd.org> Date: Fri, 02 Dec 2005 22:29:13 +1000 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20041016 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Arun Sharma References: <438FF13C.7080308@sharma-home.net> In-Reply-To: <438FF13C.7080308@sharma-home.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@freebsd.org Subject: Re: ddb and usb keyboards X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2005 12:29:15 -0000 Hi Arun, > I noticed that I was able to interact with DDB using my usb keyboard > when the kernel panics due to a driver bug. > > However, if I try to manually enter DDB using ctrl+alt+esc on the > console, DDB doesn't accept any input and I have to power cycle the > machine. I see the same behaviour :( > Is there a good explanation for this behavior? I can't think of one. I guess it's possible that the USB keyboard/OCHI code is being re-entered when this happens, since I guess the key event is an upcall into syscons. Do you know if this happens with a USB keyboard on x86 ? later, Peter.