NetBSD Problem Report #35022

From www@NetBSD.org  Thu Nov  9 05:37:43 2006
Return-Path: <www@NetBSD.org>
Received: by narn.NetBSD.org (Postfix, from userid 31301)
	id 8290963B8CA; Thu,  9 Nov 2006 05:37:43 +0000 (UTC)
Message-Id: <20061109053743.8290963B8CA@narn.NetBSD.org>
Date: Thu,  9 Nov 2006 05:37:43 +0000 (UTC)
From: anders@gavare.se
Reply-To: anders@gavare.se
To: gnats-bugs@NetBSD.org
Subject: Too much memory is cleared in the initialization code in dreamcast/dev/g2/aica.c
X-Send-Pr-Version: www-1.0

>Number:         35022
>Category:       port-dreamcast
>Synopsis:       Too much memory is cleared in the initialization code in dreamcast/dev/g2/aica.c
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-dreamcast-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 09 05:40:00 +0000 2006
>Closed-Date:    Thu Apr 10 02:18:22 +0000 2008
>Last-Modified:  Thu Apr 10 02:18:22 +0000 2008
>Originator:     Anders Gavare
>Release:        bug present in all releases until today (?)
>Organization:
>Environment:
Dreamcast
>Description:
The initialization code in dreamcast/dev/g2/aica.c fills the sound RAM area with zeroes.

         /* load microcode, and clear memory */
         bus_space_set_region_4(sc->sc_memt, sc->sc_aica_memh,
             0, 0, AICA_RAM_SIZE);

However, the count should not be AICA_RAM_SIZE, but rather AICA_RAM_SIZE/4. The current code overwrites memory beyond the sound RAM area.

>How-To-Repeat:
Boot a NetBSD/dreamcast in e.g. an emulator/simulator or debugger, which shows warning messages for memory accesses to addresses where there is no memory mapped device. NetBSD clears the sound RAM area, and 6 more MBs after that.

>Fix:
Add a "/4" to the count parameter.

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->feedback
State-Changed-By: marcus@netbsd.org
State-Changed-When: Mon, 16 Jul 2007 14:22:28 +0000
State-Changed-Why:
Fix committed to CVS.


State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Thu, 10 Apr 2008 02:18:22 +0000
State-Changed-Why:
Feedback timeout, and fixed.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.