Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 May 2015 12:02:10 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Ian Lepore <ian@freebsd.org>
Cc:        Keith White <kwhite@site.uottawa.ca>, freebsd-arm@freebsd.org
Subject:   Re: Translation Fault panic when trying to use an mfs_root on BBB [solved?] [patch]
Message-ID:  <566BFACF-E9B2-4E8A-A36C-AB4F12A84168@bsdimp.com>
In-Reply-To: <1431882444.91685.53.camel@freebsd.org>
References:  <alpine.BSF.2.20.1505131848310.98564@localhost.my.domain> <CAFHCsPXfj0Q9gYn-auK_7zQiA_HaijhzFddm1r2TJ1K7ftAebA@mail.gmail.com> <alpine.BSF.2.20.1505142004010.13692@localhost.my.domain> <CAFHCsPVF4dQryUb%2B3PmeZvpsQ8u2Xch2JirQ3uFcUhXn5fFkuQ@mail.gmail.com> <1431822588.91685.48.camel@freebsd.org> <F54C6DD3CE664644A5FA6CA32E989279@ad.peach.ne.jp> <alpine.BSF.2.20.1505162216230.46783@localhost.my.domain> <B4D05B26-E699-4BC5-8B13-2FDCF6BDF75B@bsdimp.com> <alpine.BSF.2.20.1505170953120.93686@localhost.my.domain> <1431882444.91685.53.camel@freebsd.org>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]

> On May 17, 2015, at 11:07 AM, Ian Lepore <ian@freebsd.org> wrote:
> 
> On Sun, 2015-05-17 at 09:59 -0400, Keith White wrote:
>> On Sat, 16 May 2015, Warner Losh wrote:
>> 
>>> 
>>>> On May 16, 2015, at 8:40 PM, Keith White <kwhite@site.uottawa.ca> wrote:
>>>> 
>>>> On Sun, 17 May 2015, Daisuke Aoyama wrote:
>>>> 
>>>>> --------------------------------------------------
>>>>> From: "Ian Lepore" <ian@freebsd.org>
>>>>> Sent: Sunday, May 17, 2015 9:29 AM
>>>>> To: "Svatopluk Kraus" <onwahe@gmail.com>
>>>>> Cc: "Keith White" <kwhite@site.uottawa.ca>; <freebsd-arm@freebsd.org>
>>>>> Subject: Re: Translation Fault panic when trying to use an mfs_root on BBB [solved?] [patch]
>>>>> [...]
>>>> 
>>>> Thanks Ian for looking at this!
>>>> 
>>>> Based upon the comments by Daisuke Aoyama, the patch above using
>>>> KERNBASE becomes this using preload_addr_relocate:
>>>> 
>>>> -----------------
>>>> --- sys/dev/md/md.c     (revision 282672)
>>>> +++ sys/dev/md/md.c     (working copy)
>>>> @@ -1590,7 +1590,11 @@
>>>>               len = preload_fetch_size(mod);
>>>>               if (ptr != NULL && len != 0) {
>>>>                       sx_xlock(&md_sx);
>>>> +#ifdef __arm__
>>>> +                       md_preloaded(ptr - preload_addr_relocate, len, name);
>>>> +#else
>>>>                       md_preloaded(ptr, len, name);
>>>> +#endif
>>>>                       sx_xunlock(&md_sx);
>>>>               }
>>>>       }
>>> 
>>> This is almost certainly the wrong place to fix this. The right place to fix it is in ubldr. It says that all the ptrs are AFU only on arm, and this one is likely the first of many.
>>> 
>>> Warner
>>> 
>>> 
>> 
>> You're too generous, no "almost" about it.
>> 
>> ubldr is well beyond my capabilities to fix.  Sticky tape for md
>> allows me to use an mfs_root in the meantime...
>> 
>> ...keith
> 
> After much code archeology and some testing I've determined that the
> actual problem is that we're setting preload_addr_relocate to a non-zero
> value at all.  That should only be done when ubldr passes physical
> addresses in metadata, but for arm it always passes virtual addresses.
> I think that changed (maybe by accident) a while back in ubldr and the
> kernel side didn't get fixed to match until now.
> 
> So, as of r283033 it should work right.

Thanks Ian! You rock!

Warner

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJVWNejAAoJEGwc0Sh9sBEAGTcQAOBDHtdP0TtOmpjeUIoVP9Fq
ESonKmNhLxWGDv9qouyLksqBzBdOJyZYOL2Q6lIjEUNSEjhkEZ+fAkgSvAVdoNhT
KQ4xFfQyPVzEyrXdmNHo9+W+s7Bp9qP6g9E0hJKvShZJDF445Dlq/Ijzd796Wz3y
9e3iw+lmNdfOWo4eQUsBgZ8zy+UOD4IQ6ncz62HxK15hsEAN/iY5R79fyCNjqXqv
5npTecxIhD/ueh98jCR4zIwJb86PLKCMhHZRRwTwFOVsb3pqbCeg+tyNr0ppehR8
pgQNhZGNI0ONOUDbUI0bLJV5tmHAQB2pdsym+sZLIYLiVzKXAEwSjV8JpJAyt0aH
BQXEyI8PvOO+45zbher0L7BRSShvhTELW1DyRYEv3nRi+k+wLyreru+M7pn9kxt7
1/fZAW4wFN74315Zrs80tMnhveXCuF/f8KVMaameQ0Jor6GqKhSsuEyBCVIdKQmt
fNcRKkYty6EFRoh2HC4l2HhByvcKtrxfNKBFujMvrrYyS2S36BBBz8iOmwmAXPe9
7Koxjf9WY08MyXedwjGg8N+5d3riiskvGAwi4Sjg116ZtTcpC8faOVecXu7aNCxJ
Dx9cUaoYdK36Oojl6MUxActpKSYr1LDLsubHgW6HYp1P/Qa/Hkbeg7g7nSI2YdEe
TQnwEbo6YeX8eClNb+IL
=TDbJ
-----END PGP SIGNATURE-----
help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?566BFACF-E9B2-4E8A-A36C-AB4F12A84168>