Subject: Re: 1.6.1: KASSERT in custom kernel triggered
To: Gunther Nikl <gni@gecko.de>
From: Aymeric Vincent <Aymeric.Vincent@labri.fr>
List: port-amiga
Date: 06/29/2003 20:47:54
        Hi,

Gunther Nikl <gni@gecko.de> writes:

>   I could nail the problem down. Apparently the arguments to pmap_bootstrap
>   (start_c_pstart and start_c_fphystart) were zero... I don't know why that
>   happend because eg. the boot_* flags were set properly. Moving the setup
>   of these two variables before the possible kernel copy and MMU enable
>   preparations solved it. A patch for this is included. I added another
>   small modification. start_c() has now another parameter - loadbase. Since
>   locore.s did already computed it, there is no need todo that in start_c()
>   again.

I feel very sorry not to have read this thread thoroughly
earlier. The bug you describe is actually one I introduced quite
recently.

Obviously, you are right: RELOC() must not be used after the MMU is
enabled because they will duplicate each others' work, leading to
accessing the wrong place in memory.

I have just checked in the fix you suggest in -current, and will be
requesting a pullup to the 1.6.x branch soon.

Please note that I didn't check in the change to the start_c()
prototype that you suggest. It looks fine and correct to me, but I
can't hack on the Amiga right now, so... "one thing at a time". ;-)

Apologies,
 Aymeric