From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Fri, 13 Jul 2012 18:12:03 -0500 Subject: [U-Boot] [PATCH] fsl: board EEPROM has the CRC in the wrong location In-Reply-To: <20120713230100.5E9C1200320@gemini.denx.de> 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> <500096E0.9010406@freescale.com> <500098F6.8050702@freescale.com> <20120713230100.5E9C1200320@gemini.denx.de> Message-ID: <5000AB43.6090406@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 07/13/2012 06:01 PM, Wolfgang Denk wrote: > Dear Timur Tabi, > > In message <500098F6.8050702@freescale.com> you wrote: >> >> I honestly don't see what's wrong with checking the CRC in the old >> location, and using it if it's valid. Like I said, we already > > You are interpreting something which can be random data. > >> if (e.version == 0) >> crc_offset = 0x72; >> >> So here we're reading the 'version' field before we validate the data, >> because we need to check the version to know where the CRC is. > > Argh. More crap ... And how would you do it? You have to look at *something* first, and whatever that is could be a coincidence if you think people are going to stuff arbitrary data into the EEPROM. -Scott