83xx: Put the version (and magic) after the HRCW.
PATCH 1/1 83xx: Put the version (and magic) after the HRCW.
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.
-------------- 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
PATCH 1/1 83xx: Put the version (and magic) after the HRCW.
Quoted 4 lines · Jerry Van Baren
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 <[email protected]>
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
Quoted 2 lines · Jerry Van Baren
Put the version (and magic) after the HRCW. This
puts it in a fixed location in flash, not at the
start
Quoted 1 line
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
___________________________________________________________
????????-3.5G???20M???
http://cn.mail.yahoo.com
PATCH 1/1 83xx: Put the version (and magic) after the HRCW.
Quoted 6 lines · Sam Song
Quoted 2 lines · Jerry Van Baren
Put the version (and magic) after the HRCW. This
puts it in a fixed location in flash, not at thestart
Quoted 1 line
of flash but as close as we can get.
Quoted 7 lines
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
PATCH 1/1 83xx: Put the version (and magic) after the HRCW.
Quoted 20 lines · Jerry Van Baren
Quoted 4 lines · Sam Song
Quoted 2 lines · Jerry Van Baren
Put the version (and magic) after the HRCW. This
puts it in a fixed location in flash, not at thestart
Quoted 8 lines
Quoted 1 line
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. ;-)
Quoted 5 lines
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
PATCH 1/1 83xx: Put the version (and magic) after the HRCW.
Quoted 6 lines · Jerry Van Baren
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
0x40like 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. offset0x240).
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?
Signature · 2 lines
Timur Tabi Linux Kernel Developer @ Freescale
PATCH 1/1 83xx: Put the version (and magic) after the HRCW.
Quoted 9 lines · Timur Tabi
Quoted 6 lines · Jerry Van Baren
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
0x40like 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. offset0x240).
Quoted 7 lines
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
PATCH 1/1 83xx: Put the version (and magic) after the HRCW.
Quoted 1 line · Jerry Van Baren
* 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.
Quoted 1 line
* lowboot - Add high/lowboot configuration to the
Makefile, etc.
I haven't tried this patch.
Signature · 2 lines
Timur Tabi Linux Kernel Developer @ Freescale
PATCH 1/1 83xx: Put the version (and magic) after the HRCW.
Quoted 10 lines · Timur Tabi
Quoted 1 line · Jerry Van Baren
* 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).
Quoted 3 lines
Quoted 1 line
* 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
PATCH 1/1 83xx: Put the version (and magic) after the HRCW.
Quoted 5 lines · Jerry Van Baren
I suspect your 8349E-mITX is configured to "boothigh" (BMS = 1, also known as
HRCWH_FROM_0XFFF00100) so the u-boot image starts at0xFFF00000rather than at the start of flash (nominally0xFE000000). In this case you should find the magic and version string starting at0xFFF00040. Of course, in the .bin/.srec/whatever file, it should be at offset0x40.
Yes, that's correct.
Quoted 5 lines
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.
Quoted 3 lines
Looking at
include/configs/MPC8349ITX.h, ifPCI_64BITis 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.
Quoted 2 lines
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.
Signature · 2 lines
Timur Tabi Linux Kernel Developer @ Freescale