2009-06-08 23:23:23

by Mike Frysinger

[permalink] [raw]
Subject: scripts/kallsyms: extending region checking for Blackfin memory regions

intro: the current Blackfin memory architecture is (1) no virtualized
memory and (2) distinctly harvard. that means we cannot create a
linear map of start/end text sections. we end up with distinct
regions like so:
00001000 T __stext
000dc4c0 T __etext
feb00000 A __etext_l2
feb00010 A __stext_l2
ffa00000 T __stext_l1
ffa0160c T __etext_l1
this is because external memory starts at address 0 while on-chip
regions have different discontiguous hardcoded addresses (L1
instruction in this case starts at 0xffa00000 while L2 starts at
0xfeb00000).

the current kallsyms is written to search for the special stext/etext
symbols only which means the resulting kallsyms output knows nothing
of the Blackfin symbols living in these on-chip regions. we've
written two patches to fix this: the first one is straight forward and
simply copies & pastes the existing hardcoded regions. the second
creates an array of text regions which makes it much easier to extend
in the future for other people (and can be squashed into the first
one).

doesnt matter to me which method is picked :)

(yes, another change is needed to kernel/kallsysms.c, but one thing at a time)
-mike


Attachments:
0001-kallsyms-support-kernel-symbols-in-Blackfin-on-chip-.patch (2.15 kB)
0005-kallsyms-generalize-text-region-handling.patch (4.50 kB)
Download all attachments

2009-06-14 20:42:27

by Sam Ravnborg

[permalink] [raw]
Subject: Re: scripts/kallsyms: extending region checking for Blackfin memory regions

On Mon, Jun 08, 2009 at 07:23:16PM -0400, Mike Frysinger wrote:
> intro: the current Blackfin memory architecture is (1) no virtualized
> memory and (2) distinctly harvard. that means we cannot create a
> linear map of start/end text sections. we end up with distinct
> regions like so:
> 00001000 T __stext
> 000dc4c0 T __etext
> feb00000 A __etext_l2
> feb00010 A __stext_l2
> ffa00000 T __stext_l1
> ffa0160c T __etext_l1
> this is because external memory starts at address 0 while on-chip
> regions have different discontiguous hardcoded addresses (L1
> instruction in this case starts at 0xffa00000 while L2 starts at
> 0xfeb00000).
>
> the current kallsyms is written to search for the special stext/etext
> symbols only which means the resulting kallsyms output knows nothing
> of the Blackfin symbols living in these on-chip regions. we've
> written two patches to fix this: the first one is straight forward and
> simply copies & pastes the existing hardcoded regions. the second
> creates an array of text regions which makes it much easier to extend
> in the future for other people (and can be squashed into the first
> one).
>
> doesnt matter to me which method is picked :)

I added both as I liked the generalization.
I had to rearrange the "Signed-off-by" in the first patch
as this patch came in vai you and not Robin.

Sam

2009-06-15 01:56:46

by Robin Getz

[permalink] [raw]
Subject: Re: scripts/kallsyms: extending region checking for Blackfin memory regions

On Sun 14 Jun 2009 16:44, Sam Ravnborg pondered:
> On Mon, Jun 08, 2009 at 07:23:16PM -0400, Mike Frysinger wrote:
> > intro: the current Blackfin memory architecture is (1) no virtualized
> > memory and (2) distinctly harvard. that means we cannot create a
> > linear map of start/end text sections. we end up with distinct
> > regions like so:
> > 00001000 T __stext
> > 000dc4c0 T __etext
> > feb00000 A __etext_l2
> > feb00010 A __stext_l2
> > ffa00000 T __stext_l1
> > ffa0160c T __etext_l1
> > this is because external memory starts at address 0 while on-chip
> > regions have different discontiguous hardcoded addresses (L1
> > instruction in this case starts at 0xffa00000 while L2 starts at
> > 0xfeb00000).
> >
> > the current kallsyms is written to search for the special stext/etext
> > symbols only which means the resulting kallsyms output knows nothing
> > of the Blackfin symbols living in these on-chip regions. we've
> > written two patches to fix this: the first one is straight forward and
> > simply copies & pastes the existing hardcoded regions. the second
> > creates an array of text regions which makes it much easier to extend
> > in the future for other people (and can be squashed into the first
> > one).
> >
> > doesnt matter to me which method is picked :)
>
> I added both as I liked the generalization.
> I had to rearrange the "Signed-off-by" in the first patch
> as this patch came in vai you and not Robin.

I think Mike pulled this from some work I did awhile ago, (and sent to you)
that obviously never got added (since I didn't send it in the proper patch
format).

http://lkml.indiana.edu/hypermail/linux/kernel/0607.1/0558.html

2009-06-15 02:05:52

by Mike Frysinger

[permalink] [raw]
Subject: Re: scripts/kallsyms: extending region checking for Blackfin memory regions

On Sun, Jun 14, 2009 at 21:59, Robin Getz wrote:
> On Sun 14 Jun 2009 16:44, Sam Ravnborg pondered:
>> On Mon, Jun 08, 2009 at 07:23:16PM -0400, Mike Frysinger wrote:
>> > intro: the current Blackfin memory architecture is (1) no virtualized
>> > memory and (2) distinctly harvard.  that means we cannot create a
>> > linear map of start/end text sections.  we end up with distinct
>> > regions like so:
>> > 00001000 T __stext
>> > 000dc4c0 T __etext
>> > feb00000 A __etext_l2
>> > feb00010 A __stext_l2
>> > ffa00000 T __stext_l1
>> > ffa0160c T __etext_l1
>> > this is because external memory starts at address 0 while on-chip
>> > regions have different discontiguous hardcoded addresses (L1
>> > instruction in this case starts at 0xffa00000 while L2 starts at
>> > 0xfeb00000).
>> >
>> > the current kallsyms is written to search for the special stext/etext
>> > symbols only which means the resulting kallsyms output knows nothing
>> > of the Blackfin symbols living in these on-chip regions.  we've
>> > written two patches to fix this: the first one is straight forward and
>> > simply copies & pastes the existing hardcoded regions.  the second
>> > creates an array of text regions which makes it much easier to extend
>> > in the future for other people (and can be squashed into the first
>> > one).
>> >
>> > doesnt matter to me which method is picked :)
>>
>> I added both as I liked the generalization.
>> I had to rearrange the "Signed-off-by" in the first patch
>> as this patch came in vai you and not Robin.
>
> I think Mike pulled this from some work I did awhile ago, (and sent to you)
> that obviously never got added (since I didn't send it in the proper patch
> format).
>
> http://lkml.indiana.edu/hypermail/linux/kernel/0607.1/0558.html

yeah, the first patch was by Robin ... the "From:" line in the patch
should have shown that (and git-am would have respected) ...
-mike

2009-06-15 04:35:09

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [kbuild-devel] scripts/kallsyms: extending region checking for Blackfin memory regions

On Sun, Jun 14, 2009 at 10:05:26PM -0400, Mike Frysinger wrote:
> On Sun, Jun 14, 2009 at 21:59, Robin Getz wrote:
> > On Sun 14 Jun 2009 16:44, Sam Ravnborg pondered:
> >> On Mon, Jun 08, 2009 at 07:23:16PM -0400, Mike Frysinger wrote:
> >> > intro: the current Blackfin memory architecture is (1) no virtualized
> >> > memory and (2) distinctly harvard. ?that means we cannot create a
> >> > linear map of start/end text sections. ?we end up with distinct
> >> > regions like so:
> >> > 00001000 T __stext
> >> > 000dc4c0 T __etext
> >> > feb00000 A __etext_l2
> >> > feb00010 A __stext_l2
> >> > ffa00000 T __stext_l1
> >> > ffa0160c T __etext_l1
> >> > this is because external memory starts at address 0 while on-chip
> >> > regions have different discontiguous hardcoded addresses (L1
> >> > instruction in this case starts at 0xffa00000 while L2 starts at
> >> > 0xfeb00000).
> >> >
> >> > the current kallsyms is written to search for the special stext/etext
> >> > symbols only which means the resulting kallsyms output knows nothing
> >> > of the Blackfin symbols living in these on-chip regions. ?we've
> >> > written two patches to fix this: the first one is straight forward and
> >> > simply copies & pastes the existing hardcoded regions. ?the second
> >> > creates an array of text regions which makes it much easier to extend
> >> > in the future for other people (and can be squashed into the first
> >> > one).
> >> >
> >> > doesnt matter to me which method is picked :)
> >>
> >> I added both as I liked the generalization.
> >> I had to rearrange the "Signed-off-by" in the first patch
> >> as this patch came in vai you and not Robin.
> >
> > I think Mike pulled this from some work I did awhile ago, (and sent to you)
> > that obviously never got added (since I didn't send it in the proper patch
> > format).
> >
> > http://lkml.indiana.edu/hypermail/linux/kernel/0607.1/0558.html
>
> yeah, the first patch was by Robin ... the "From:" line in the patch
> should have shown that (and git-am would have respected) ...

So does the patch.
What I had to change was that the Signed-off-by: lines indicated
that this patch came in like this:

Robin -> Mike -> Bryan Wu -> Sam
So I rearranged the signed-off-by: lines so it indicated
the following order:

Robin -> Bryan Wu -> Mike -> Sam


I trust that Bryan really did add his sob, and it
was only a mistake that Mike added his sob before
that of Bryans.

Sam

2009-06-15 04:39:50

by Mike Frysinger

[permalink] [raw]
Subject: Re: [kbuild-devel] scripts/kallsyms: extending region checking for Blackfin memory regions

On Mon, Jun 15, 2009 at 00:37, Sam Ravnborg wrote:
> On Sun, Jun 14, 2009 at 10:05:26PM -0400, Mike Frysinger wrote:
>> On Sun, Jun 14, 2009 at 21:59, Robin Getz wrote:
>> > On Sun 14 Jun 2009 16:44, Sam Ravnborg pondered:
>> >> On Mon, Jun 08, 2009 at 07:23:16PM -0400, Mike Frysinger wrote:
>> >> > intro: the current Blackfin memory architecture is (1) no virtualized
>> >> > memory and (2) distinctly harvard.  that means we cannot create a
>> >> > linear map of start/end text sections.  we end up with distinct
>> >> > regions like so:
>> >> > 00001000 T __stext
>> >> > 000dc4c0 T __etext
>> >> > feb00000 A __etext_l2
>> >> > feb00010 A __stext_l2
>> >> > ffa00000 T __stext_l1
>> >> > ffa0160c T __etext_l1
>> >> > this is because external memory starts at address 0 while on-chip
>> >> > regions have different discontiguous hardcoded addresses (L1
>> >> > instruction in this case starts at 0xffa00000 while L2 starts at
>> >> > 0xfeb00000).
>> >> >
>> >> > the current kallsyms is written to search for the special stext/etext
>> >> > symbols only which means the resulting kallsyms output knows nothing
>> >> > of the Blackfin symbols living in these on-chip regions.  we've
>> >> > written two patches to fix this: the first one is straight forward and
>> >> > simply copies & pastes the existing hardcoded regions.  the second
>> >> > creates an array of text regions which makes it much easier to extend
>> >> > in the future for other people (and can be squashed into the first
>> >> > one).
>> >> >
>> >> > doesnt matter to me which method is picked :)
>> >>
>> >> I added both as I liked the generalization.
>> >> I had to rearrange the "Signed-off-by" in the first patch
>> >> as this patch came in vai you and not Robin.
>> >
>> > I think Mike pulled this from some work I did awhile ago, (and sent to you)
>> > that obviously never got added (since I didn't send it in the proper patch
>> > format).
>> >
>> > http://lkml.indiana.edu/hypermail/linux/kernel/0607.1/0558.html
>>
>> yeah, the first patch was by Robin ... the "From:" line in the patch
>> should have shown that (and git-am would have respected) ...
>
> So does the patch.
> What I had to change was that the Signed-off-by: lines indicated
> that this patch came in like this:
>
> Robin -> Mike -> Bryan Wu -> Sam
> So I rearranged the signed-off-by: lines so it indicated
> the following order:
>
> Robin -> Bryan Wu -> Mike -> Sam
>
>
> I trust that Bryan really did add his sob, and it
> was only a mistake that Mike added his sob before
> that of Bryans.

yes, i took a bunch of patches from Bryan like this one
-mike