public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] 83xx: Put the version (and magic) after the HRCW.
@ 2006-12-07  2:23 Jerry Van Baren
  2006-12-07  2:55 ` Jerry Van Baren
  0 siblings, 1 reply; 12+ messages in thread
From: Jerry Van Baren @ 2006-12-07  2:23 UTC (permalink / raw)
  To: u-boot

Put the version (and magic) after the HRCW.  This puts it in a fixed
location in flash, not at the start of flash but as close as we can get.

Signed-off-by: Jerry Van Baren <vanbaren@cideas.com>

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-Put-the-version-and-magic-after-the-HRCW.-This-puts-it-in-a-fixed.txt
Url: http://lists.denx.de/pipermail/u-boot/attachments/20061206/25324ee5/attachment.txt 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot-Users] [PATCH] 83xx: Put the version (and magic) after the HRCW.
  2006-12-07  2:23 Jerry Van Baren
@ 2006-12-07  2:55 ` Jerry Van Baren
  0 siblings, 0 replies; 12+ messages in thread
From: Jerry Van Baren @ 2006-12-07  2:55 UTC (permalink / raw)
  To: u-boot

Jerry Van Baren wrote:
> Put the version (and magic) after the HRCW.  This puts it in a fixed
> location in flash, not at the start of flash but as close as we can get.
> 
> Signed-off-by: Jerry Van Baren <vanbaren@cideas.com>

The git repository with my patches is at:
   <http://www.cideas.us/cgi-bin/gitweb.cgi>
Actual repository:
<http://www.cideas.us/cgi-bin/gitweb.cgi?p=u-boot/u-boot-mpc83xx;a=summary>

Branches:
* version-in-text - Put the version (and magic) after the HRCW.
* lowboot - Add high/lowboot configuration to the Makefile, etc.

gvb

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot-Users] [PATCH] 83xx: Put the version (and magic) after the HRCW.
  2006-12-07  3:16 [U-Boot-Users] Re: " Sam Song
@ 2006-12-07  3:45 ` Jerry Van Baren
  2006-12-08  2:49   ` Jerry Van Baren
  0 siblings, 1 reply; 12+ messages in thread
From: Jerry Van Baren @ 2006-12-07  3:45 UTC (permalink / raw)
  To: u-boot

Sam Song wrote:
> Jerry Van Baren <gerald.vanbaren@comcast.net> wrote:
>> Put the version (and magic) after the HRCW.  This
>> puts it in a fixed location in flash, not at the
> start 
>> of flash but as close as we can get.
> 
> Nice effort. Space saving and better version check.
> 
> I guess the same change could apply for MPC8260/47/8.
> 
> Thanks,
> 
> Sam

Yes.  Most boards have the version in the first bytes of flash, but this
was not possible on the 82xx because of the HRCW, so it was put in
.data.  This set up was copied for the 83xx (which also has a HRCW).  My
change moves it back to .text just after the HRCW.  I put also the
u-boot magic number back in in honor of Wolfgang. ;-)

If you change the file names in the patch, it probably would apply.  :-)
 I intend to do this (perhaps literally), but ran out of ambition tonight.

Best regards,
gvb

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot-Users] [PATCH] 83xx: Put the version (and magic) after the HRCW.
@ 2006-12-07  8:32 Joakim Tjernlund
  2006-12-07 13:22 ` Jerry Van Baren
  0 siblings, 1 reply; 12+ messages in thread
From: Joakim Tjernlund @ 2006-12-07  8:32 UTC (permalink / raw)
  To: u-boot

> 
> Sam Song wrote:
> > Jerry Van Baren <gerald.vanbaren@comcast.net> wrote:
> >> Put the version (and magic) after the HRCW.  This
> >> puts it in a fixed location in flash, not at the
> > start 
> >> of flash but as close as we can get.
> > 
> > Nice effort. Space saving and better version check.
> > 
> > I guess the same change could apply for MPC8260/47/8.
> > 
> > Thanks,
> > 
> > Sam
> 
> Yes.  Most boards have the version in the first bytes of 
> flash, but this
> was not possible on the 82xx because of the HRCW, so it was put in
> .data.  This set up was copied for the 83xx (which also has a 
> HRCW).  My
> change moves it back to .text just after the HRCW.  I put also the
> u-boot magic number back in in honor of Wolfgang. ;-)
> 
> If you change the file names in the patch, it probably would 
> apply.  :-)
>  I intend to do this (perhaps literally), but ran out of 
> ambition tonight.
> 

Looks almost the same as the patch I sent the other day. I am good
with either version.

 Jocke

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot-Users] [PATCH] 83xx: Put the version (and magic) after the HRCW.
  2006-12-07  8:32 [U-Boot-Users] [PATCH] 83xx: Put the version (and magic) after the HRCW Joakim Tjernlund
@ 2006-12-07 13:22 ` Jerry Van Baren
  0 siblings, 0 replies; 12+ messages in thread
From: Jerry Van Baren @ 2006-12-07 13:22 UTC (permalink / raw)
  To: u-boot

Joakim Tjernlund wrote:
>> Sam Song wrote:
>>> Jerry Van Baren <gerald.vanbaren@comcast.net> wrote:
>>>> Put the version (and magic) after the HRCW.  This
>>>> puts it in a fixed location in flash, not at the
>>> start 
>>>> of flash but as close as we can get.
>>> Nice effort. Space saving and better version check.
>>>
>>> I guess the same change could apply for MPC8260/47/8.
>>>
>>> Thanks,
>>>
>>> Sam
>> Yes.  Most boards have the version in the first bytes of 
>> flash, but this
>> was not possible on the 82xx because of the HRCW, so it was put in
>> .data.  This set up was copied for the 83xx (which also has a 
>> HRCW).  My
>> change moves it back to .text just after the HRCW.  I put also the
>> u-boot magic number back in in honor of Wolfgang. ;-)
>>
>> If you change the file names in the patch, it probably would 
>> apply.  :-)
>>  I intend to do this (perhaps literally), but ran out of 
>> ambition tonight.
>>
> 
> Looks almost the same as the patch I sent the other day. I am good
> with either version.
> 
>  Jocke

Hi Jocke,

Yes, your patch, and my objection to its removal of the HRCW, was the 
genesis of this one.  The two differences are (a) I kept the HRCW and 
(b) I put the "u-boot magic number" in (no known reason to do this, but 
it Just Seemed Right[tm]).  The result of (b) is that the version starts 
at flash offset 0x44 rather than 0x40.  Should be NBD.

Thanks,
gvb

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot-Users] [PATCH] 83xx: Put the version (and magic) after the HRCW.
@ 2006-12-07 17:05 Joakim Tjernlund
  0 siblings, 0 replies; 12+ messages in thread
From: Joakim Tjernlund @ 2006-12-07 17:05 UTC (permalink / raw)
  To: u-boot

> -----Original Message-----
> From: u-boot-users-bounces at lists.sourceforge.net 
> [mailto:u-boot-users-bounces at lists.sourceforge.net] On Behalf 
> Of Jerry Van Baren
> Sent: 07 December 2006 14:23
> To: Joakim Tjernlund
> Cc: u-boot-users at lists.sourceforge.net
> Subject: Re: [U-Boot-Users] [PATCH] 83xx: Put the version 
> (and magic) after the HRCW.
> 
> Joakim Tjernlund wrote:
> >> Sam Song wrote:
> >>> Jerry Van Baren <gerald.vanbaren@comcast.net> wrote:
> >>>> Put the version (and magic) after the HRCW.  This
> >>>> puts it in a fixed location in flash, not at the
> >>> start 
> >>>> of flash but as close as we can get.
> >>> Nice effort. Space saving and better version check.
> >>>
> >>> I guess the same change could apply for MPC8260/47/8.
> >>>
> >>> Thanks,
> >>>
> >>> Sam
> >> Yes.  Most boards have the version in the first bytes of 
> >> flash, but this
> >> was not possible on the 82xx because of the HRCW, so it was put in
> >> .data.  This set up was copied for the 83xx (which also has a 
> >> HRCW).  My
> >> change moves it back to .text just after the HRCW.  I put also the
> >> u-boot magic number back in in honor of Wolfgang. ;-)
> >>
> >> If you change the file names in the patch, it probably would 
> >> apply.  :-)
> >>  I intend to do this (perhaps literally), but ran out of 
> >> ambition tonight.
> >>
> > 
> > Looks almost the same as the patch I sent the other day. I am good
> > with either version.
> > 
> >  Jocke
> 
> Hi Jocke,
> 
> Yes, your patch, and my objection to its removal of the HRCW, was the 
> genesis of this one.  The two differences are (a) I kept the HRCW and 
> (b) I put the "u-boot magic number" in (no known reason to do 
> this, but 
> it Just Seemed Right[tm]).  The result of (b) is that the 
> version starts 
> at flash offset 0x44 rather than 0x40.  Should be NBD.

(a) yeah, I don't really need this either, I just added that to give
others
    a choice.

(b) uh, I want the "u-boot magic number". If I didn't have it in my
patch then it
    was a typo.

 Thanks
        Jocke

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot-Users] [PATCH] 83xx: Put the version (and magic) after the HRCW.
  2006-12-07  3:45 ` [U-Boot-Users] " Jerry Van Baren
@ 2006-12-08  2:49   ` Jerry Van Baren
  2006-12-08 16:33     ` Timur Tabi
  0 siblings, 1 reply; 12+ messages in thread
From: Jerry Van Baren @ 2006-12-08  2:49 UTC (permalink / raw)
  To: u-boot

Jerry Van Baren wrote:
> Sam Song wrote:
>> Jerry Van Baren <gerald.vanbaren@comcast.net> wrote:
>>> Put the version (and magic) after the HRCW.  This
>>> puts it in a fixed location in flash, not at the
>> start 
>>> of flash but as close as we can get.
>> Nice effort. Space saving and better version check.
>>
>> I guess the same change could apply for MPC8260/47/8.
>>
>> Thanks,
>>
>> Sam
> 
> Yes.  Most boards have the version in the first bytes of flash, but this
> was not possible on the 82xx because of the HRCW, so it was put in
> .data.  This set up was copied for the 83xx (which also has a HRCW).  My
> change moves it back to .text just after the HRCW.  I put also the
> u-boot magic number back in in honor of Wolfgang. ;-)
> 
> If you change the file names in the patch, it probably would apply.  :-)
>  I intend to do this (perhaps literally), but ran out of ambition tonight.
> 
> Best regards,
> gvb

Arrgh, I forgot about the 8260 master + 7 slaves mode, which fills the 
first 256 bytes with HRCWs.  As a result, we cannot put the magic number 
and version at offset 0x40 like I did with the 8360 (well, we could do 
it, but only if the system doesn't have slaves).  We could, however, put 
the magic number and version in a different vector area that has room 
(e.g. offset 0x240).

What we have works and has worked for several years.  I don't have 
enough ambition and interest at this point to change this for the mpc8260.

Best regards,
gvb

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot-Users] [PATCH] 83xx: Put the version (and magic) after the HRCW.
  2006-12-08  2:49   ` Jerry Van Baren
@ 2006-12-08 16:33     ` Timur Tabi
  2006-12-08 16:50       ` Jerry Van Baren
  0 siblings, 1 reply; 12+ messages in thread
From: Timur Tabi @ 2006-12-08 16:33 UTC (permalink / raw)
  To: u-boot

Jerry Van Baren wrote:

> Arrgh, I forgot about the 8260 master + 7 slaves mode, which fills the 
> first 256 bytes with HRCWs.  As a result, we cannot put the magic number 
> and version at offset 0x40 like I did with the 8360 (well, we could do 
> it, but only if the system doesn't have slaves).  We could, however, put 
> the magic number and version in a different vector area that has room 
> (e.g. offset 0x240).

Or, you could tag the version string with a checksum and a signature, then have 
the application scan memory until it finds it.  That way, you could put it 
wherever you want, even in different places on different systems, and it would 
still work.

Joakim asked me to ack or nack this patch, but at this point I can't tell who 
wants what.  Can someone summarize the status of this patch for me?

-- 
Timur Tabi
Linux Kernel Developer @ Freescale

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot-Users] [PATCH] 83xx: Put the version (and magic) after the HRCW.
  2006-12-08 16:33     ` Timur Tabi
@ 2006-12-08 16:50       ` Jerry Van Baren
  2006-12-08 21:13         ` Timur Tabi
  0 siblings, 1 reply; 12+ messages in thread
From: Jerry Van Baren @ 2006-12-08 16:50 UTC (permalink / raw)
  To: u-boot

Timur Tabi wrote:
> Jerry Van Baren wrote:
> 
>> Arrgh, I forgot about the 8260 master + 7 slaves mode, which fills the 
>> first 256 bytes with HRCWs.  As a result, we cannot put the magic number 
>> and version at offset 0x40 like I did with the 8360 (well, we could do 
>> it, but only if the system doesn't have slaves).  We could, however, put 
>> the magic number and version in a different vector area that has room 
>> (e.g. offset 0x240).
> 
> Or, you could tag the version string with a checksum and a signature, then have 
> the application scan memory until it finds it.  That way, you could put it 
> wherever you want, even in different places on different systems, and it would 
> still work.
> 
> Joakim asked me to ack or nack this patch, but at this point I can't tell who 
> wants what.  Can someone summarize the status of this patch for me?

Hi Timur,

The root post and patch is
   <http://article.gmane.org/gmane.comp.boot-loaders.u-boot/25427>
which is a patch for the 83xx and is what Joakim is interested in 
(tested on the MPC8360EMDS).  The posting (above) was a followup.  I 
intended to do an equivalent patch for the 8260, but decided not to due 
to the level of effort vs. reward.

The git repository with my patches is at:
    <http://www.cideas.us/cgi-bin/gitweb.cgi>
Actual repository:
<http://www.cideas.us/cgi-bin/gitweb.cgi?p=u-boot/u-boot-mpc83xx;a=summary>

Branches:
* version-in-text - Put the version (and magic) after the HRCW.
* lowboot - Add high/lowboot configuration to the Makefile, etc.

Thanks,
gvb

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot-Users] [PATCH] 83xx: Put the version (and magic) after the HRCW.
  2006-12-08 16:50       ` Jerry Van Baren
@ 2006-12-08 21:13         ` Timur Tabi
  2006-12-08 21:36           ` Jerry Van Baren
  0 siblings, 1 reply; 12+ messages in thread
From: Timur Tabi @ 2006-12-08 21:13 UTC (permalink / raw)
  To: u-boot

Jerry Van Baren wrote:

> * version-in-text - Put the version (and magic) after the HRCW.

This patch works on the 8349E-mITX.  Ack.

However, there's a caveat.  The 8349E-mITX doesn't place the U-Boot image over 
the HRCW - it's located somewhere else in flash.  So the HRCW in the U-Boot 
image is ignored.  This may also be true of some other 83xx boards.

> * lowboot - Add high/lowboot configuration to the Makefile, etc.

I haven't tried this patch.

-- 
Timur Tabi
Linux Kernel Developer @ Freescale

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot-Users] [PATCH] 83xx: Put the version (and magic) after the HRCW.
  2006-12-08 21:13         ` Timur Tabi
@ 2006-12-08 21:36           ` Jerry Van Baren
  2006-12-08 21:38             ` Timur Tabi
  0 siblings, 1 reply; 12+ messages in thread
From: Jerry Van Baren @ 2006-12-08 21:36 UTC (permalink / raw)
  To: u-boot

Timur Tabi wrote:
> Jerry Van Baren wrote:
> 
>> * version-in-text - Put the version (and magic) after the HRCW.
> 
> This patch works on the 8349E-mITX.  Ack.
> 
> However, there's a caveat.  The 8349E-mITX doesn't place the U-Boot 
> image over the HRCW - it's located somewhere else in flash.  So the HRCW 
> in the U-Boot image is ignored.  This may also be true of some other 
> 83xx boards.

Hi Timur,

I suspect your 8349E-mITX is configured to "boothigh" (BMS = 1, also 
known as HRCWH_FROM_0XFFF00100) so the u-boot image starts at 0xFFF00000 
rather than at the start of flash (nominally 0xFE000000).  In this case 
you should find the magic and version string starting at 0xFFF00040.  Of 
course, in the .bin/.srec/whatever file, it should be at offset 0x40.

That is one of the advantages of "bootlow" - the HRCW from u-boot is 
placed at the start of flash and thus is used.  With "boothigh" , the 
HRCW that is part of u-boot is in the "wrong place" and thus is not 
used.  (Another advantage of "bootlow" is that you don't have to 
dedicate 1MB of flash for the u-boot image.)

Looking at include/configs/MPC8349ITX.h, if PCI_64BIT is defined it does 
a lowboot, otherwise it does a highboot (which seems odd to me, but 
people tell me I'm odd and the world is normal).

>> * lowboot - Add high/lowboot configuration to the Makefile, etc.
> 
> I haven't tried this patch.

The "lowboot" patch is specific to the MPC8360EMDS, although it could be 
copy and pasted into the MPC8349ITX configuration easily enough.

gvb

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot-Users] [PATCH] 83xx: Put the version (and magic) after the HRCW.
  2006-12-08 21:36           ` Jerry Van Baren
@ 2006-12-08 21:38             ` Timur Tabi
  0 siblings, 0 replies; 12+ messages in thread
From: Timur Tabi @ 2006-12-08 21:38 UTC (permalink / raw)
  To: u-boot

Jerry Van Baren wrote:

> I suspect your 8349E-mITX is configured to "boothigh" (BMS = 1, also 
> known as HRCWH_FROM_0XFFF00100) so the u-boot image starts at 0xFFF00000 
> rather than at the start of flash (nominally 0xFE000000).  In this case 
> you should find the magic and version string starting at 0xFFF00040.  Of 
> course, in the .bin/.srec/whatever file, it should be at offset 0x40.

Yes, that's correct.

> That is one of the advantages of "bootlow" - the HRCW from u-boot is 
> placed at the start of flash and thus is used.  With "boothigh" , the 
> HRCW that is part of u-boot is in the "wrong place" and thus is not 
> used.  (Another advantage of "bootlow" is that you don't have to 
> dedicate 1MB of flash for the u-boot image.)

The original code from our BSP had only boothigh, so that's how I left it.  I 
guess I should test lowboot as an option.

> Looking at include/configs/MPC8349ITX.h, if PCI_64BIT is defined it does 
> a lowboot, otherwise it does a highboot (which seems odd to me, but 
> people tell me I'm odd and the world is normal).

I've noticed that too, and I'm trying to get answer as to why.

> The "lowboot" patch is specific to the MPC8360EMDS, although it could be 
> copy and pasted into the MPC8349ITX configuration easily enough.

Ok, if it gets accepted, I'll port it to the 8349ITX.


-- 
Timur Tabi
Linux Kernel Developer @ Freescale

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2006-12-08 21:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-07  8:32 [U-Boot-Users] [PATCH] 83xx: Put the version (and magic) after the HRCW Joakim Tjernlund
2006-12-07 13:22 ` Jerry Van Baren
  -- strict thread matches above, loose matches on Subject: below --
2006-12-07 17:05 Joakim Tjernlund
2006-12-07  3:16 [U-Boot-Users] Re: " Sam Song
2006-12-07  3:45 ` [U-Boot-Users] " Jerry Van Baren
2006-12-08  2:49   ` Jerry Van Baren
2006-12-08 16:33     ` Timur Tabi
2006-12-08 16:50       ` Jerry Van Baren
2006-12-08 21:13         ` Timur Tabi
2006-12-08 21:36           ` Jerry Van Baren
2006-12-08 21:38             ` Timur Tabi
2006-12-07  2:23 Jerry Van Baren
2006-12-07  2:55 ` Jerry Van Baren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox