Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Feb 2008 16:07:07 +0100
From:      Rafal Jaworowski <raj@semihalf.com>
To:        Marcel Moolenaar <xcllnt@mac.com>
Cc:        Marcel Moolenaar <marcel@freebsd.org>, Perforce Change Reviews <perforce@freebsd.org>
Subject:   Re: PERFORCE change 135517 for review
Message-ID:  <47B84D9B.4010903@semihalf.com>
In-Reply-To: <504560A3-EABB-4896-8B3E-C7FC89F31EFB@mac.com>
References:  <200802162141.m1GLfgkj048217@repoman.freebsd.org> <47B75EB3.2020001@semihalf.com> <504560A3-EABB-4896-8B3E-C7FC89F31EFB@mac.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Marcel Moolenaar wrote:
>>>     Save U-Boot's registers at startup and restore them when
>>>     performing a syscall. This way we don't have to compile
>>>     code specially to avoid using those registers. Otherwise
>>>     we have to encode knowledge of those registers in at least
>>>     4 makefiles and introduce a build knob to enable it all.
>>>     This does not allow us to build everything with a single
>>>     build world.
>>
>> Hi Marcel,
>>
>> I'm not quite sure this is sufficient... I already had a similar
>> save/restore
>> in place, but there is some general problem with U-Boot that leads to
>> hangs
>> (experienced):
> 
> Interesting, I didn't see any such problems with 1.3.2-rc1.
> 

After a bit of digging, I guess this is why it didn't bite you up front: very
recently (last minute inclusions during 1.3.2-rc1 preparation) Wolfgang
changed the dedicated regs layout... with r29 going -> r2 due to certain
problems with gcc 4.x producing bigger code when not all 'high' registers it
likes are available in the whole block etc. Anyway, the pointer to global_data
now became r2, which is system/reserved according to ABI, so r29 unsafety is
gone. However, there's r14, which is used for GOT access, and it needs to be
addressed still, as we're prone to the same kind of errors.

I think the easiest way to go would be following this recent change and switch
r14 -> r13. R13 is also non-volatile in ABI and serves small data area
pursposes, and we could use it for GOT ptr. This way no context save/restore
would be necessary at all. I'll follow up on this on u-boot-users ML.

Rafal



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47B84D9B.4010903>