svn commit: r237883 - in head/sys/arm: at91 conf

Marcel Moolenaar marcel at xcllnt.net
Mon Jul 2 16:47:31 UTC 2012


On Jul 1, 2012, at 2:41 PM, Warner Losh wrote:
> 
>> I can port that to FreeBSD. Shall I make some patches for people
>> to look at?
> 
> Sure.  I'd love to see it.  I'd be happy to preview any partial work if you want early feedbac.

See attached. It's fully functional and in production @Juniper. I hope the
last sync with FreeBSD didn't break anything.

The change to sys/arm/include/cpufunc.h is needed to avoid a name class
in cxgdb(4). That driver defines a structure field called intr_disable,
which under ARM is renamed due to intr_disable being a macro. Turning
it into an inline-function resulted in undefined symbols for I32_bit and
F32_bit. Since those names are pretty bad to begin with, I added
ARM_CPSR_I32 and ARM_CPSR_F32.

BTW: we may be able to fix the duplicate symbol problem by using weak symbols.
For example, we have 10 definitions of "initarm". We can make them unique,
by renaming the functions and add a weak alias called "initarm". E.g, in
sys/arm/mv/mv_machdep.c, rename initarm to mv_initarm() and add a weak
alias for mv_initarm called initarm.

When building for Marvell SoCs, initarm will resolve to mv_initarm. When
building LINT, we only have to provide a non-weak dummy definition for
initarm (and all the others that follow the same model) and we're good to
go.

Maybe the dummy function could be used as a trampoline even that resolves
at runtime which of the SoC-specific initarm functions is to be called
based on the SoC Id?

-- 
Marcel Moolenaar
marcel at xcllnt.net

-------------- next part --------------
A non-text attachment was scrubbed...
Name: arm.diff
Type: application/octet-stream
Size: 5114 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20120702/9acff9e7/arm.obj


More information about the freebsd-arm mailing list