From owner-freebsd-ppc@FreeBSD.ORG Sun Apr 20 14:42:58 2003 Return-Path: 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 AA81D37B401 for ; Sun, 20 Apr 2003 14:42:58 -0700 (PDT) Received: from sources.redhat.com (sources.redhat.com [66.187.233.205]) by mx1.FreeBSD.org (Postfix) with SMTP id 1A1BB43FB1 for ; Sun, 20 Apr 2003 14:42:58 -0700 (PDT) (envelope-from anonymous@sources.redhat.com) Received: (qmail 21992 invoked by uid 48); 20 Apr 2003 21:42:57 -0000 Date: 20 Apr 2003 21:42:57 -0000 Message-ID: <20030420214257.21991.qmail@sources.redhat.com> To: gdb-gnats@sources.redhat.com From: obrien@freebsd.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) X-GNATS-Notify: freebsd-ppc@freebsd.org cc: freebsd-ppc@freebsd.org Subject: bug in the allocation of Open Firmware's htab for PowerPC X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: obrien@freebsd.org List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Apr 2003 21:42:58 -0000 >Category: sim >Synopsis: bug in the allocation of Open Firmware's htab for PowerPC >Confidential: no >Severity: non-critical >Priority: medium >Class: patch >Submitter-Id: net >Originator: Joshua LeVasseur >Release: unknown-1.0 >Environment: GDB 5.3 >Description: 1. The allocation of Open Firmware's htab. The bug exposes itself when you simulate with lots of memory, causing psim to complain that the htab location is incompatible with the htabmask. The code calculates an incorrect htabmask. 2. The client Open Firmware interface function "nextprop" never returns the first property. >How-To-Repeat: >Fix: See attached "original-fbsd-report.txt" file. >Unformatted: ----gnatsweb-attachment---- Content-Type: text/plain; name="original-fbsd-report.txt" Content-Disposition: inline; filename="original-fbsd-report.txt" From: Joshua LeVasseur Subject: some psim bugs Date: Fri, 11 Apr 2003 17:18:22 +0200 To: freebsd-ppc@freebsd.org X-Image-Url: jtl@bothan.net X-Mailer: Apple Mail (2.552) X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.1 Errors-To: owner-freebsd-ppc@freebsd.org In case any of you still use psim, I uncovered two more bugs (sorry if these are repeats) ... The first concerns the allocation of Open Firmware's htab. The bug exposes itself when you simulate with lots of memory, causing psim to complain that the htab location is incompatible with the htabmask. The code calculates an incorrect htabmask. In file gdb/sim/ppc/hw_htab.c, function htab_decode_hash_table(), look for: if ((htab_ra & INSERTED32(*htabmask, 7, 15)) != 0) { device_error(parent, "htaborg 0x%lx not aligned to htabmask 0x%lx", (unsigned long)*htaborg, (unsigned long)*htabmask); } And change to: if ((htab_ra & (htab_nr_bytes-1)) != 0) { device_error(parent, "htaborg 0x%lx not aligned to htabmask 0x%lx", (unsigned long)*htaborg, (unsigned long)*htabmask); } After fixing this problem, it is no longer necessary to manually configure OpenFirmware's layout in memory. The second bug also concerns the emulated Open Firmware. The client interface function "nextprop" never returns the first property. In the file gdb/sim/ppc/emul_chirp.c, in chirp_emul_nextprop(), look for the statement: next_prop = device_next_property(prev_prop); And change to: if( *previous == '\0' ) next_prop = prev_prop; /* Return the first property! */ else next_prop = device_next_property(prev_prop); -Josh _______________________________________________ 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" From owner-freebsd-ppc@FreeBSD.ORG Sun Apr 20 14:48:25 2003 Return-Path: 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 F213937B401 for ; Sun, 20 Apr 2003 14:48:24 -0700 (PDT) Received: from sources.redhat.com (sources.redhat.com [66.187.233.205]) by mx1.FreeBSD.org (Postfix) with SMTP id 1EE2143FDF for ; Sun, 20 Apr 2003 14:48:24 -0700 (PDT) (envelope-from anonymous@sources.redhat.com) Received: (qmail 23230 invoked by uid 71); 20 Apr 2003 21:48:01 -0000 Resent-Date: 20 Apr 2003 21:48:01 -0000 Resent-Message-ID: <20030420214801.23229.qmail@sources.redhat.com> Resent-From: gdb-gnats@sources.redhat.com (GNATS Filer) Resent-To: nobody@sources.redhat.com Resent-Cc: gdb-prs@sources.redhat.com, freebsd-ppc@freebsd.org Resent-Reply-To: gdb-gnats@sources.redhat.com, obrien@freebsd.org Received: (qmail 21992 invoked by uid 48); 20 Apr 2003 21:42:57 -0000 Message-Id: <20030420214257.21991.qmail@sources.redhat.com> Date: 20 Apr 2003 21:42:57 -0000 From: obrien@freebsd.org To: gdb-gnats@sources.redhat.com X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) X-GNATS-Notify: freebsd-ppc@freebsd.org cc: freebsd-ppc@freebsd.org Subject: sim/1183: bug in the allocation of Open Firmware's htab for PowerPC X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: obrien@freebsd.org List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Apr 2003 21:48:25 -0000 >Number: 1183 >Category: sim >Synopsis: bug in the allocation of Open Firmware's htab for PowerPC >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: patch >Submitter-Id: net >Arrival-Date: Sun Apr 20 21:48:01 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Joshua LeVasseur >Release: unknown-1.0 >Organization: >Environment: GDB 5.3 >Description: 1. The allocation of Open Firmware's htab. The bug exposes itself when you simulate with lots of memory, causing psim to complain that the htab location is incompatible with the htabmask. The code calculates an incorrect htabmask. 2. The client Open Firmware interface function "nextprop" never returns the first property. >How-To-Repeat: >Fix: See attached "original-fbsd-report.txt" file. >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: text/plain; name="original-fbsd-report.txt" Content-Disposition: inline; filename="original-fbsd-report.txt" From: Joshua LeVasseur Subject: some psim bugs Date: Fri, 11 Apr 2003 17:18:22 +0200 To: freebsd-ppc@freebsd.org X-Image-Url: jtl@bothan.net X-Mailer: Apple Mail (2.552) X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.1 Errors-To: owner-freebsd-ppc@freebsd.org In case any of you still use psim, I uncovered two more bugs (sorry if these are repeats) ... The first concerns the allocation of Open Firmware's htab. The bug exposes itself when you simulate with lots of memory, causing psim to complain that the htab location is incompatible with the htabmask. The code calculates an incorrect htabmask. In file gdb/sim/ppc/hw_htab.c, function htab_decode_hash_table(), look for: if ((htab_ra & INSERTED32(*htabmask, 7, 15)) != 0) { device_error(parent, "htaborg 0x%lx not aligned to htabmask 0x%lx", (unsigned long)*htaborg, (unsigned long)*htabmask); } And change to: if ((htab_ra & (htab_nr_bytes-1)) != 0) { device_error(parent, "htaborg 0x%lx not aligned to htabmask 0x%lx", (unsigned long)*htaborg, (unsigned long)*htabmask); } After fixing this problem, it is no longer necessary to manually configure OpenFirmware's layout in memory. The second bug also concerns the emulated Open Firmware. The client interface function "nextprop" never returns the first property. In the file gdb/sim/ppc/emul_chirp.c, in chirp_emul_nextprop(), look for the statement: next_prop = device_next_property(prev_prop); And change to: if( *previous == '\0' ) next_prop = prev_prop; /* Return the first property! */ else next_prop = device_next_property(prev_prop); -Josh _______________________________________________ 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" From owner-freebsd-ppc@FreeBSD.ORG Wed Apr 23 19:04:59 2003 Return-Path: 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 A7C0B37B415 for ; Wed, 23 Apr 2003 19:04:59 -0700 (PDT) Received: from web10903.mail.yahoo.com (web10903.mail.yahoo.com [216.136.131.39]) by mx1.FreeBSD.org (Postfix) with SMTP id EB60C43F3F for ; Wed, 23 Apr 2003 19:04:58 -0700 (PDT) (envelope-from dreamaaster@yahoo.com) Message-ID: <20030424020458.26670.qmail@web10903.mail.yahoo.com> Received: from [198.188.96.2] by web10903.mail.yahoo.com via HTTP; Wed, 23 Apr 2003 19:04:58 PDT Date: Wed, 23 Apr 2003 19:04:58 -0700 (PDT) From: "L. S." To: freebsd-questions-unsubscribe@freebsd.org, freebsd-users@freebsd.org, freebsd-ppc@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.1 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 Apr 2003 02:05:00 -0000 ===== L. S. Don't let the smooth face fool ya. :-| :-) ;-) :-) * __________________________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo http://search.yahoo.com