From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Tue, 10 May 2011 23:59:42 +0200 Subject: [U-Boot] [PATCH] post: new parallel nor flash test In-Reply-To: <201105101711.07625.vapier@gentoo.org> References: <1305058102-26936-1-git-send-email-vapier@gentoo.org> <20110510201700.A8D4AD6F237@gemini.denx.de> <201105101711.07625.vapier@gentoo.org> Message-ID: <20110510215942.18554D6F237@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 Mike Frysinger, In message <201105101711.07625.vapier@gentoo.org> you wrote: > > > > This adds a simple parallel nor flash test to automatically verify > > > erasing/writing/reading of sectors. The code is based on existing > > > Blackfin tests but generalized for everyone to use. > > > > What exactly does the "parallel" in "parallel nor flash test" mean? > > how it is connected to the processor Are there any other types of NOR flashes? I mean, I have never heard anybody use this term before. Maybe we can just omit it - I find it more confusing than helpful. > > > + unsigned char *ret = (void *)CONFIG_SYS_SDRAM_BASE; > > > > This will not work on many systems. For example, on PPC you will > > overwrite the exception vectors in low memory, thus crashing the > > system. > > this is how the default memory post test works. it writes all memory from > CONFIG_SYS_SDRAM_BASE to CONFIG_SYS_SDRAM_BASE+MIN(1GiB,bd->memsize). so how > does this work on ppc systems ? The RAM test runs before relocation to RAM, i. e. whenRAM is still not used by anything. > i didnt think calling malloc() would be OK since i need enough memory to hold > one sector ... Just grabbing a random address in RAM is certainly not a proper way to allocate I/O buffers. If you need them, and if your code design makes it even necessary to pass these buffers around (so you can not just put them on the stack which is what I would try to do) you have to use malloc(). 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 only way to learn a new programming language is by writing pro- grams in it. - Brian Kernighan