From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Fri, 13 Jul 2012 23:32:42 +0200 Subject: [U-Boot] [PATCH] fsl: board EEPROM has the CRC in the wrong location In-Reply-To: <50009349.9000609@freescale.com> References: <1342129594-7861-1-git-send-email-timur@freescale.com> <9F5356FB-8CA2-44DE-9089-64ABD82CA733@freescale.com> <20120713043026.00DD82000B1@gemini.denx.de> <50001038.50303@freescale.com> <20120713212501.4C8132000F2@gemini.denx.de> <50009349.9000609@freescale.com> Message-ID: <20120713213243.071AE2000F2@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Timur Tabi, In message <50009349.9000609@freescale.com> you wrote: > > > In case you have an EEPROM with correct layout (CRC at 0xFC) but > > incorrect CRC, you will access random data and interpret this as CRC. > > This is provoking undefined behaviour. > > True, but it doesn't matter. The EEPROM is not that important, and the > odds of screwing this up is one in four billion. > > > If you want, then rather provide an update tool that theuser can use > > (manually!) to update, but this should be done once, and with explicit > > confirmation from the user, never automagically. > > Considering how unimportant the EEPROM really is, I don't see the point in > making it so complicated. We already automagically upgrade the board from > NXID v0 to NXID v1. Now we automagically fix boards that have the CRC in > the wrong place. > > Anyway, I don't see why it's so controversial. This code is only used on > a small number of Freescale reference boards. Well, if it's really so unimportant and used in only a small number of boards, then just omit this broken code that provokes the undefined behaviour. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de The main thing is the play itself. I swear that greed for money has nothing to do with it, although heaven knows I am sorely in need of money. - Feodor Dostoyevsky