This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Bug in RedBoot FIS
- From: Nicolas Brouard <nicolas dot brouard at silicomp dot ca>
- To: eCos Discussion <ecos-discuss at ecos dot sourceware dot org>
- Date: Wed, 27 Oct 2004 13:51:01 -0400
- Subject: [ECOS] Bug in RedBoot FIS
Hi all,
I assume there is a bug in RedBoot FIS. The chunk of free space is not
correctly calculated. (see redboot console output at the end)
My configuration is :
16 Mo Flash from 0x7C000000 to 0x7D000000.
The FIS directory is at the address 0x7C830000.
CYGDAT_REDBOOT_FIS_MAX_FREE_CHUNKS = 32 (default value).
RedBoot/eCos source form the latest CVS.
This is my redboot Console output:
---------------------------------------------------------------------
RedBoot> version
RedBoot(tm) bootstrap and debug environment [ROM]
Non-certified release, version UNKNOWN - built 10:15:42, Oct 27 2004
Platform: Daito Group MSA (PowerPC 860P)
Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
RAM: 0x00000000-0x04000000, [0x00010c60-0x03fed000] available
FLASH: 0x7c000000 - 0x7d000000, 256 blocks of 0x00010000 bytes each.
RedBoot> fis init
About to initialize [format] FLASH image system - continue (y/n)? y
*** Initialize FLASH Image System
... Erase from 0x7c830000-0x7c840000: .
... Program from 0x03ff0000-0x04000000 at 0x7c830000: .
RedBoot> fis list
Name FLASH addr Mem addr Length Entry point
RedBoot 0x7C000000 0x7C000000 0x00030000 0x00000000
FIS directory 0x7C830000 0x7C830000 0x0000F000 0x00000000
RedBoot config 0x7C83F000 0x7C83F000 0x00001000 0x00000000
RedBoot> fis free
0x7C030000 .. 0x7C830000
0x7C840000 .. 0x7CFFFFFF
RedBoot> load shell.srec
Using default protocol (TFTP)
Entry point: 0x00020000, address range: 0x00020000-0x0004854c
RedBoot> fis create Shell -f 0x7c040000 -b 0x20000 -l 0x40000
... Erase from 0x7c040000-0x7c080000: ....
... Program from 0x00020000-0x00060000 at 0x7c040000: ....
... Erase from 0x7c830000-0x7c840000: .
... Program from 0x03ff0000-0x04000000 at 0x7c830000: .
RedBoot> fis list
Name FLASH addr Mem addr Length Entry point
RedBoot 0x7C000000 0x7C000000 0x00030000 0x00000000
Shell 0x7C040000 0x7C040000 0x00040000 0x00020000
FIS directory 0x7C830000 0x7C830000 0x0000F000 0x00000000
RedBoot config 0x7C83F000 0x7C83F000 0x00001000 0x00000000
RedBoot> fis free
0x7C030000 .. 0x7C040000
0x7C080000 .. 0x7C830000
0x0000D6F4 .. 0x000005F6 <------ This is strange !
RedBoot>
---------------------------------------------------------------------
The problem comes here in the table of free space. A new strange free
space is added and the 0x7C840000 .. 0x7CFFFFFF free space doesn't
appear anymore.
Second output: (I use -r instead of -b in the fis create command)
---------------------------------------------------------------------
RedBoot> fis delete Shell
Delete image 'Shell' - continue (y/n)? y
... Erase from 0x7c040000-0x7c080000: ....
... Erase from 0x7c830000-0x7c840000: .
... Program from 0x03ff0000-0x04000000 at 0x7c830000: .
RedBoot> fis list
Name FLASH addr Mem addr Length Entry point
RedBoot 0x7C000000 0x7C000000 0x00030000 0x00000000
FIS directory 0x7C830000 0x7C830000 0x0000F000 0x00000000
RedBoot config 0x7C83F000 0x7C83F000 0x00001000 0x00000000
RedBoot> fis free
0x7C030000 .. 0x7C830000
0x7C840000 .. 0x7CFFFFFF <--- Good table of free space
RedBoot> fis create Shell -f 0x7c040000 -r 0x20000 -l 0x40000
... Erase from 0x7c040000-0x7c080000: ....
... Program from 0x00020000-0x0004854c at 0x7c040000: ...
... Erase from 0x7c830000-0x7c840000: .
... Program from 0x03ff0000-0x04000000 at 0x7c830000: .
RedBoot> fis list
Name FLASH addr Mem addr Length Entry point
RedBoot 0x7C000000 0x7C000000 0x00030000 0x00000000
Shell 0x7C040000 0x00020000 0x00040000 0x00020000
FIS directory 0x7C830000 0x7C830000 0x0000F000 0x00000000
RedBoot config 0x7C83F000 0x7C83F000 0x00001000 0x00000000
RedBoot> fis free
0x7C030000 .. 0x7C040000
0x7C080000 .. 0x7C830000
0x00000000 .. 0x00000000 <---- This is strange !
RedBoot>
---------------------------------------------------------------------
This is almost the same case.
Did anyone see this behaviour, and have a patch ?
Thank's
Nicolas
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss