This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

recent breakage of fis_free


fis create and fis_free which use similar code in redboot.src/flash.c
were broken by the latest changes which added dataflash support
reverting the status of functions fis_free ans fis_find_free to he previous 
rev solves it. These functions need to traverse the whole flash not only the fis 
directory while only that was put in the RAM workspace. Also because the reserved
area at the beginning of the flash can be quite big, that added to the workspace
start resulted in acces beyond end of RAM.
I don't know what the real solution should be as I don't know whether dataflash support
is supposed to be only for fis data or for the whole flash.For now IMHO reverting this part
should be enough.

Jani 

--- current/src/flash.c	19 Sep 2003 17:11:34 -0000	1.51
+++ current/src/flash.c	24 Sep 2003 09:25:51 -0000
@@ -498,8 +498,7 @@
     void *err_addr;
 
     // Do not search the area reserved for pre-RedBoot systems:
-    flash_read(fis_addr, fis_work_block, fisdir_size, (void **)&err_addr);
-    fis_ptr = (unsigned long *)((CYG_ADDRESS)fis_work_block + 
+    fis_ptr = (unsigned long *)((CYG_ADDRESS)flash_start + 
                                 CYGNUM_REDBOOT_FLASH_RESERVED_BASE + 
                                 CYGBLD_REDBOOT_MIN_IMAGE_SIZE);
     fis_end = (unsigned long *)(CYG_ADDRESS)flash_end;
@@ -539,8 +538,7 @@
     void *err_addr;
 
     // Do not search the area reserved for pre-RedBoot systems:
-    flash_read(fis_addr, fis_work_block, fisdir_size, (void **)&err_addr);
-    fis_ptr = (unsigned long *)((CYG_ADDRESS)fis_work_block + 
+    fis_ptr = (unsigned long *)((CYG_ADDRESS)flash_start + 
                                 CYGNUM_REDBOOT_FLASH_RESERVED_BASE + 
                                 CYGBLD_REDBOOT_MIN_IMAGE_SIZE);
     fis_end = (unsigned long *)(CYG_ADDRESS)flash_end;

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]