Subject: Re: Bug in grf_cv.c localized!
To: Frank Wille" , "amiga <amiga@NetBSD.ORG>
From: Michael L. Hitch <osymh@gemini.oscs.montana.edu>
List: amiga
Date: 12/03/1995 20:44:23
On Dec  3,  1:11am, "Frank Wille" wrote:

> The bus error is caused in cvattach(), while determining the size
> of the RAM on the CV64. I have a 2MB CV64, so that cv_has_4mb()
> writes some test patterns to non existent memory - Bus Error!
> Maybe Michael Teske and the other Cybervision testers have a CV64
> with 4 MB Ram, so they never had problems.
> 
> After commenting out the cv_has_4mb() call and hardcoding a 2 MB
> RAM size, the configuration of grfcv0 works!

  There are a couple of routines available in machdep.c that can be used
to probe for non-existant memory access without crashing.  They are
badaddr() and badbaddr().  They take a memory address as a single
argument and do a word or byte read of that location.  They will
return 0 if the memory read was ok, or a 1 if the access caused a
fault.

Michael

-- 
Michael L. Hitch			INTERNET:  osymh@montana.edu
Computer Consultant
Information Technology Center
Montana State University	Bozeman, MT	USA