From owner-freebsd-ppc@FreeBSD.ORG Mon Aug 21 19:56:34 2006 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 5EFDB16A516 for ; Mon, 21 Aug 2006 19:56:34 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A4B0643E1F for ; Mon, 21 Aug 2006 19:56:05 +0000 (GMT) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k7LJtWFf062593 for ; Mon, 21 Aug 2006 19:55:32 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k7LJtVS6062589 for freebsd-ppc@FreeBSD.org; Mon, 21 Aug 2006 19:55:31 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 21 Aug 2006 19:55:31 GMT Message-Id: <200608211955.k7LJtVS6062589@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: linimon set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-ppc@FreeBSD.org Cc: Subject: Current problem reports assigned to you 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: Mon, 21 Aug 2006 19:56:34 -0000 Current FreeBSD problem reports Critical problems Serious problems S Tracker Resp. Description -------------------------------------------------------------------------------- o power/93203 ppc FreeBSD PPC Can't Write to Partitions. 1 problem total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- o power/95367 ppc docs for ppc release. 1 problem total. From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 24 02:58:34 2006 Return-Path: X-Original-To: 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 65B3816A4E0 for ; Thu, 24 Aug 2006 02:58:34 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id A138A43D5A for ; Thu, 24 Aug 2006 02:58:33 +0000 (GMT) (envelope-from marcel@xcllnt.net) Received: from [192.168.4.150] (pptp0.pn.xcllnt.net [192.168.4.150]) by ns1.xcllnt.net (8.13.6/8.13.6) with ESMTP id k7O2wX9P037083 for ; Wed, 23 Aug 2006 19:58:33 -0700 (PDT) (envelope-from marcel@xcllnt.net) Mime-Version: 1.0 (Apple Message framework v752.2) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; format=flowed To: ppc@FreeBSD.org From: Marcel Moolenaar Date: Wed, 23 Aug 2006 19:58:04 -0700 X-Mailer: Apple Mail (2.752.2) Cc: Subject: gdb(1) in the tree 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: Thu, 24 Aug 2006 02:58:34 -0000 All, I just committed PowerPC support to gdb in the tree. Credit for the work goes mostly to others, BTW. There are various problems with gdb. One of the most annoying is that if you set a breakpoint, it's not always being hit. I suspect this is a kernel problem and not a gdb problem, because the breakpoint is sometimes hit. The next step forward is to test gdb and fix what's broken or what can be improved. You can all help with this... FYI, -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 24 03:59:54 2006 Return-Path: X-Original-To: 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 DBB0E16A4E5 for ; Thu, 24 Aug 2006 03:59:54 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 425D243D58 for ; Thu, 24 Aug 2006 03:59:49 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id CBF25023 (AUTH peterg@ptree32.com.au); Thu, 24 Aug 2006 13:59:42 +1000 (EST) Message-ID: <44ED2448.7030503@freebsd.org> Date: Wed, 23 Aug 2006 21:00:08 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: Marcel Moolenaar References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: ppc@FreeBSD.org Subject: Re: gdb(1) in the tree 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: Thu, 24 Aug 2006 03:59:54 -0000 > I just committed PowerPC support to gdb in the tree. Thankyou for that Marcel ! > There are various problems with gdb. One of the most annoying is that > if you set a breakpoint, it's not always being hit. I suspect this > is a kernel problem and not a gdb problem, because the breakpoint is > sometimes hit. PowerPC has separate non-coherent I and D caches - writing to instruction memory requires a a flush of the D cache and an invalidate of the I cache for that particular memory address. This sounds like that type of problem. I'm assuming that gdb uses a ptrace write to do the breakpoint. There probably needs to be an MD callout after a PT_WRITE_I. I'll see if I can work out what NetBSD does. later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 24 04:11:15 2006 Return-Path: X-Original-To: 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 EA43E16A4DE; Thu, 24 Aug 2006 04:11:15 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 42C6543D5D; Thu, 24 Aug 2006 04:11:15 +0000 (GMT) (envelope-from marcel@xcllnt.net) Received: from [192.168.4.150] (pptp0.pn.xcllnt.net [192.168.4.150]) by ns1.xcllnt.net (8.13.6/8.13.6) with ESMTP id k7O4BEUh037383; Wed, 23 Aug 2006 21:11:14 -0700 (PDT) (envelope-from marcel@xcllnt.net) In-Reply-To: <44ED2448.7030503@freebsd.org> References: <44ED2448.7030503@freebsd.org> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <46D747A2-7126-450A-83E4-DA7367706F18@xcllnt.net> Content-Transfer-Encoding: 7bit From: Marcel Moolenaar Date: Wed, 23 Aug 2006 21:10:45 -0700 To: Peter Grehan X-Mailer: Apple Mail (2.752.2) Cc: ppc@freebsd.org Subject: Re: gdb(1) in the tree 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: Thu, 24 Aug 2006 04:11:16 -0000 On Aug 23, 2006, at 9:00 PM, Peter Grehan wrote: > PowerPC has separate non-coherent I and D caches - writing to > instruction memory requires a a flush of the D cache and an > invalidate of the I cache for that particular memory address. > > This sounds like that type of problem. I'm assuming that gdb uses > a ptrace write to do the breakpoint. There probably needs to be an > MD callout after a PT_WRITE_I. Yes, I was thinking along those lines as well, though I didn't had the details. > I'll see if I can work out what NetBSD does. Ok. In the mean time I'll work on kgdb... -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 24 04:17:06 2006 Return-Path: X-Original-To: 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 503DB16A4DA for ; Thu, 24 Aug 2006 04:17:06 +0000 (UTC) (envelope-from arr@watson.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id 73DDF43D49 for ; Thu, 24 Aug 2006 04:17:04 +0000 (GMT) (envelope-from arr@watson.org) Received: from fledge.watson.org (localhost.watson.org [127.0.0.1]) by fledge.watson.org (8.13.6/8.13.6) with ESMTP id k7O4H3bw013469; Thu, 24 Aug 2006 00:17:03 -0400 (EDT) (envelope-from arr@watson.org) Received: from localhost (arr@localhost) by fledge.watson.org (8.13.6/8.13.6/Submit) with ESMTP id k7O4H30C013466; Thu, 24 Aug 2006 00:17:03 -0400 (EDT) (envelope-from arr@watson.org) X-Authentication-Warning: fledge.watson.org: arr owned process doing -bs Date: Thu, 24 Aug 2006 00:17:03 -0400 (EDT) From: "Andrew R. Reiter" To: Marcel Moolenaar In-Reply-To: Message-ID: <20060824001645.N12837@fledge.watson.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: ppc@freebsd.org Subject: Re: gdb(1) in the tree 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: Thu, 24 Aug 2006 04:17:06 -0000 On Wed, 23 Aug 2006, Marcel Moolenaar wrote: :All, : :I just committed PowerPC support to gdb in the tree. Credit for the :work goes mostly to others, BTW. Thanks! : :There are various problems with gdb. One of the most annoying is that :if you set a breakpoint, it's not always being hit. I suspect this :is a kernel problem and not a gdb problem, because the breakpoint is :sometimes hit. : :The next step forward is to test gdb and fix what's broken or what :can be improved. You can all help with this... : :FYI, : :-- : Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net : : :_______________________________________________ :freebsd-ppc@freebsd.org mailing list :http://lists.freebsd.org/mailman/listinfo/freebsd-ppc :To unsubscribe, send any mail to "freebsd-ppc-unsubscribe@freebsd.org" : : -- arr@watson.org From owner-freebsd-ppc@FreeBSD.ORG Fri Aug 25 00:35:37 2006 Return-Path: X-Original-To: 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 9F4DC16A4E0 for ; Fri, 25 Aug 2006 00:35:37 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 00AA443D45 for ; Fri, 25 Aug 2006 00:35:36 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id CBG93056 (AUTH peterg@ptree32.com.au); Fri, 25 Aug 2006 10:35:30 +1000 (EST) Message-ID: <44EE45EC.3040403@freebsd.org> Date: Thu, 24 Aug 2006 17:35:56 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: Marcel Moolenaar References: <44ED2448.7030503@freebsd.org> <46D747A2-7126-450A-83E4-DA7367706F18@xcllnt.net> In-Reply-To: <46D747A2-7126-450A-83E4-DA7367706F18@xcllnt.net> Content-Type: multipart/mixed; boundary="------------040909010108020405070102" Cc: ppc@freebsd.org Subject: Re: gdb(1) in the tree 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, 25 Aug 2006 00:35:37 -0000 This is a multi-part message in MIME format. --------------040909010108020405070102 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi Marcel, >> I'll see if I can work out what NetBSD does. Would you be able to give the attached patch a try ? later, Peter. --------------040909010108020405070102 Content-Type: text/plain; name="mmu_oea.c.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mmu_oea.c.patch" Index: mmu_oea.c =================================================================== RCS file: /home/ncvs/src/sys/powerpc/powerpc/mmu_oea.c,v retrieving revision 1.111 diff -u -r1.111 mmu_oea.c --- mmu_oea.c 1 Aug 2006 19:06:05 -0000 1.111 +++ mmu_oea.c 25 Aug 2006 00:32:17 -0000 @@ -2012,6 +2012,22 @@ pg = PHYS_TO_VM_PAGE(pvo->pvo_pte.pte_lo & PTE_RPGN); if (pg != NULL) { + /* + * From NetBSD pmap.c r1.37 + * If the page was changed and it is mapped exec, + * invalidate it + */ + if ((ptelo & PTE_CHG) && + (moea_attr_fetch(pg) & PTE_EXEC)) { + struct pvo_head *pvoh = vm_page_to_pvoh(pg); + if (LIST_EMPTY(pvoh)) { + moea_attr_clear(pg, PTE_EXEC); + } else { + moea_syncicache(VM_PAGE_TO_PHYS(pg), + PAGE_SIZE); + } + } + moea_attr_save(pg, pvo->pvo_pte.pte_lo & (PTE_REF | PTE_CHG)); } --------------040909010108020405070102-- From owner-freebsd-ppc@FreeBSD.ORG Fri Aug 25 00:51:54 2006 Return-Path: X-Original-To: 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 3D15416A4DE for ; Fri, 25 Aug 2006 00:51:54 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id C3DBA43D68 for ; Fri, 25 Aug 2006 00:51:50 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id CBG95174 (AUTH peterg@ptree32.com.au); Fri, 25 Aug 2006 10:51:19 +1000 (EST) Message-ID: <44EE49A2.1050809@freebsd.org> Date: Thu, 24 Aug 2006 17:51:46 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: Marcel Moolenaar References: <44ED2448.7030503@freebsd.org> <46D747A2-7126-450A-83E4-DA7367706F18@xcllnt.net> <44EE45EC.3040403@freebsd.org> In-Reply-To: <44EE45EC.3040403@freebsd.org> Content-Type: multipart/mixed; boundary="------------010204090503000209030707" Cc: ppc@freebsd.org Subject: Re: gdb(1) in the tree 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, 25 Aug 2006 00:51:54 -0000 This is a multi-part message in MIME format. --------------010204090503000209030707 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Oops, previous one was wrong non-compilable version :( later, Peter. --------------010204090503000209030707 Content-Type: text/plain; name="mmu_oea.c.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mmu_oea.c.patch" Index: mmu_oea.c =================================================================== RCS file: /home/ncvs/src/sys/powerpc/powerpc/mmu_oea.c,v retrieving revision 1.111 diff -u -r1.111 mmu_oea.c --- mmu_oea.c 1 Aug 2006 19:06:05 -0000 1.111 +++ mmu_oea.c 25 Aug 2006 00:49:34 -0000 @@ -2012,6 +2012,22 @@ pg = PHYS_TO_VM_PAGE(pvo->pvo_pte.pte_lo & PTE_RPGN); if (pg != NULL) { + /* + * From NetBSD pmap.c r1.37 + * If the page was changed and it is mapped exec, + * invalidate it + */ + if ((pvo->pvo_pte.pte_lo & PTE_CHG) && + (moea_attr_fetch(pg) & PTE_EXEC)) { + struct pvo_head *pvoh = vm_page_to_pvoh(pg); + if (LIST_EMPTY(pvoh)) { + moea_attr_clear(pg, PTE_EXEC); + } else { + moea_syncicache(VM_PAGE_TO_PHYS(pg), + PAGE_SIZE); + } + } + moea_attr_save(pg, pvo->pvo_pte.pte_lo & (PTE_REF | PTE_CHG)); } --------------010204090503000209030707-- From owner-freebsd-ppc@FreeBSD.ORG Fri Aug 25 02:10:37 2006 Return-Path: X-Original-To: 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 078C116A4DF; Fri, 25 Aug 2006 02:10:37 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id B07C043D46; Fri, 25 Aug 2006 02:10:36 +0000 (GMT) (envelope-from marcel@xcllnt.net) Received: from [192.168.4.150] (pptp0.pn.xcllnt.net [192.168.4.150]) by ns1.xcllnt.net (8.13.6/8.13.6) with ESMTP id k7P2Aavd081411; Thu, 24 Aug 2006 19:10:36 -0700 (PDT) (envelope-from marcel@xcllnt.net) In-Reply-To: <44EE49A2.1050809@freebsd.org> References: <44ED2448.7030503@freebsd.org> <46D747A2-7126-450A-83E4-DA7367706F18@xcllnt.net> <44EE45EC.3040403@freebsd.org> <44EE49A2.1050809@freebsd.org> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <356BD079-D1A6-41E9-ADAB-371A096EB82E@xcllnt.net> Content-Transfer-Encoding: 7bit From: Marcel Moolenaar Date: Thu, 24 Aug 2006 19:10:03 -0700 To: Peter Grehan X-Mailer: Apple Mail (2.752.2) Cc: ppc@freebsd.org Subject: Re: gdb(1) in the tree 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, 25 Aug 2006 02:10:37 -0000 On Aug 24, 2006, at 5:51 PM, Peter Grehan wrote: > Oops, previous one was wrong non-compilable version :( Alas, no fix: imac% gdb sig GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "powerpc-marcel-freebsd"... (gdb) b main Breakpoint 1 at 0x18015bc: file sig.c, line 20. (gdb) run Starting program: /nfs/home/marcel/sig Program exited normally. (gdb) Adding a second breakpoint does the trick: (gdb) b breakpoint Breakpoint 2 at 0x180155c: file sig.c, line 6. (gdb) run Starting program: /nfs/home/marcel/sig Breakpoint 1, main () at sig.c:20 20 sa.sa_sigaction = handler; (gdb) However, the second breakpoint is not hit then: (gdb) c Continuing. Program exited normally. (gdb) FYI, -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net