From: Nitin Mahajan Date: Mon, 8 Mar 2010 19:46:12 -0800 (PST) Subject: [U-Boot] bootcounter implementation for OMAP3 Message-ID: <251177.91741.qm@web50106.mail.re2.yahoo.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello, I am trying to implement the bootcount_store and bootcount_load methods for the OMAP3503 processor based board which I am using. For this I decided to use the location at the end of scratchpad RAM, that is I am trying to write at location 0x480029BF. The code looks like this, but the boot loader hags when it encounters bootcount_load. #ifdef CONFIG_BOOTCOUNT_LIMIT void bootcount_store(ulong a) { volatile ulong *save_addr = (volatile ulong *)(0x480029BF); *save_addr = (BOOTCOUNT_MAGIC & 0xffff0000) | (a & 0x0000ffff); } ulong bootcount_load(void) { volatile ulong *save_addr = (volatile ulong *)(0x480029BF); if ((*save_addr & 0xffff0000) != (BOOTCOUNT_MAGIC & 0xffff0000)) return 0; else return (*save_addr & 0x0000ffff); } #endif /* CONFIG_BOOTCOUNT_LIMIT */ Am I doing some thing wring fundamentally? Can I get some pointers towrads this? Also this code I have put in cpu/arm_cortexa8/cpu.c. Is there a way I can put these functions in OMAP3 specific code and still have them called? regards -Nitin New Email names for you! Get the Email name you've always wanted on the new @ymail and @rocketmail. Hurry before someone else does! http://mail.promotions.yahoo.com/newdomains/aa/