From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Thu, 24 Feb 2011 08:07:35 +0100 Subject: [U-Boot] ARM: Incorrect ROM protection range? In-Reply-To: <4D660030.409@free.fr> References: <4D660030.409@free.fr> Message-ID: <20110224070735.ADBE1146940@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 Albert ARIBAUD, In message <4D660030.409@free.fr> you wrote: > > You're right that U-Boot protection should cover the whole of U-Boot, > including the relocation tables... True. This was overlooked during all thie relocation rework. > ... I *think* protection uses a monitor > length define for this. Can you verify this point, and check what your > "monitor length" define amounts to? Maybe it does not cover the > relocation tables any more. I'm not sure if all boards do the same; the common CFI driver ("drivers/mtd/cfi_flash.c", search for "Monitor protection ON by default) protects an area of "monitor_flash_len" bytes starting at CONFIG_SYS_MONITOR_BASE plus the environment sector(s). monitor_flash_len gets normally computed in archh/*/lib/board.c; on ARM, we have this: monitor_flash_len = _bss_start_ofs; > Would it not be better to compute the actual image size rather than rely > on a define? This is already the case. It's just that the computation is not correct any more. 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 Those who do not understand Unix are condemned to reinvent it, poorly. - Henry Spencer, University of Toronto Unix hack