locore.S and debugging initial stages of kernel

Ian Lepore ian at FreeBSD.org
Fri Jun 20 23:57:13 UTC 2014


On Sat, 2014-06-21 at 01:18 +0300, Aleksandr Rybalko wrote:
> On 20 червня 2014 р. 08:23:01 GMT+03:00, Rui Paulo <rpaulo at FreeBSD.org> wrote:
> >On Jun 19, 2014, at 19:19, Ian Lepore <ian at FreeBSD.org> wrote:
> >
> >> I usually emit single chars by writing directly the console uart
> >> register.
> >
> >I use exactly the same method, but your code looks much better. :-)
> >
> >--
> >Rui Paulo
> >
> >
> >
> >_______________________________________________
> >freebsd-arm at freebsd.org mailing list
> >http://lists.freebsd.org/mailman/listinfo/freebsd-arm
> >To unsubscribe, send any mail to "freebsd-arm-unsubscribe at freebsd.org"
> 
> Is not it would be better to just load txd address, instead of ORing 2-4 times? :-D
> WBW
> ------
> Aleksandr Rybalko <ray at ddteam.net>
> 
> 

You mean store the value in memory somewhere, and then at runtime load a
pointer to where it's stored using only pc-relative instructions and
then loading the actual value using the pointer?  Harder to write, the
code added for "quick debugging" would be more scattered, and it's
actually slower (not that performance really matters here).  It could be
done as a 1-liner using "=VALUE" syntax, but chances are that turns into
mov,orr,orr. :)

-- Ian




More information about the freebsd-arm mailing list