Subject: Re: spontaneous reboot only once after power-up
To: None <port-dreamcast@netbsd.org, port-sh3@netbsd.org>
From: ITOH Yasufumi <itohy@netbsd.org>
List: port-dreamcast
Date: 11/03/2002 19:55:41
In article <200211031036.gA3Aa3e08202@mirage.ceres.dti.ne.jp>
tsutsui@ceres.dti.ne.jp writes:

> In article <200211031025.gA3APb316495@pl374.nas911.nara.nttpc.ne.jp>
> itohy@netbsd.org wrote:
> 
> > I'm going to commit this change to work around it.
>  :
> > +	_reg_write_4(SH4_ITLB_DA1, 0);
> > +	_reg_write_4(SH4_ITLB_DA1 | (1 << SH4_ITLB_E_SHIFT), 0);
> > +	_reg_write_4(SH4_ITLB_DA1 | (2 << SH4_ITLB_E_SHIFT), 0);
> > +	_reg_write_4(SH4_ITLB_DA1 | (3 << SH4_ITLB_E_SHIFT), 0);
> 
> It seems these four statements should be in __sh4_itlb_invalidate_all(),
> rather than sh4_tlb_invalidate_all().

I think that VPN / PPN addresses which are not aligned to SZ boundary
caused the problem.
Valid entries are aligned to page size, and this initialization is needed
only once during boot process.

> BTW, __sh4_itlb_invalidate_all() should be declared as static, not extern?

Agreed.

-- 
ITOH Yasufumi