Skip to contentSkip to conversation

Cash flash correction of do_load()

PATCH In review yoko 4 participants 5 messages Sep 25, 2016 – Oct 11, 2016 VFS

lore
Share & tools
lore

yoko

author
#0 lore raw

PATCH 1/1 Cash flash correction of do_load()

---
 fs/fs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

For a program execution abnormal measure by the fatload command, cash flash processing is added to do_load().

fs/fs.c +2 -1
index 595ff1f..7607230 100644
@@ -417,6 +417,8 @@ int do_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
 	}
 	puts("\n");
 
+	flush_cache(addr, len_read);
+
 	setenv_hex("fileaddr", addr);
 	setenv_hex("filesize", len_read);
 
@@ -535,4 +537,3 @@ int do_fs_type(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
 	return CMD_RET_SUCCESS;
 }
-
Signature · 1 line
2.8.4 (Apple Git-73)
#1 lore raw
Quoted 6 lines · yoko
---
 fs/fs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

For a program execution abnormal measure by the fatload command, cash flash processing is added to do_load().

Can you please move this bottom part into the commit message itself and elaborate on why we need a flush, and here, rather than say in 'go' or 'bootelf' or .. ? Thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161006/2589fbbd/attachment.sig>
#2 lore raw

PATCH v2 1/1 fs:When 'go' run the program by 'fatload', added the cache flush to prevent cache mismatch.

---

Changes for v2:
- The commit message is changed.

 fs/fs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/fs.c +2 -1
index 595ff1f..7607230 100644
@@ -417,6 +417,8 @@ int do_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
 	}
 	puts("\n");
 
+	flush_cache(addr, len_read);
+
 	setenv_hex("fileaddr", addr);
 	setenv_hex("filesize", len_read);
 
@@ -535,4 +537,3 @@ int do_fs_type(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
 	return CMD_RET_SUCCESS;
 }
-
Signature · 1 line
2.8.4 (Apple Git-73)
#3 lore raw

PATCH v2 1/1 fs:When 'go' run the program by 'fatload', added the cache flush to prevent cache mismatch.

Dear yoko,

Quoted 24 lines · yoko

---

Changes for v2:
- The commit message is changed.

 fs/fs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/fs.c +2 -0
index 595ff1f..7607230 100644
@@ -417,6 +417,8 @@ int do_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
 	}
 	puts("\n");
 
+	flush_cache(addr, len_read);
+
 	setenv_hex("fileaddr", addr);
 	setenv_hex("filesize", len_read);
 

fs/fs.c int do_fs_type(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) · line 538

Quoted 4 lines
fs/fs.c +0 -1
@@ -535,4 +537,3 @@ int do_fs_type(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
 	return CMD_RET_SUCCESS;
 }
-

The wiki includes information about cache considerations for the "go" command [1]. If possible, please check that information to be sure it remains consistent with this patch.

Thanks,
Jim

[1] http://www.denx.de/wiki/view/DULG/UBootStandalone#Section_5.12.3.

Signature · 3 lines
Jim Chargin
AJA Video Systems                       jimc at aja.com
(530) 271-3334                          http://www.aja.com
#4 lore raw

PATCH v2 1/1 fs:When 'go' run the program by 'fatload', added the cache flush to prevent cache mismatch.

Dear Jim,

Thank you very much.

I read the Wiki page.
I was running to load the standalone application program. CPU is so ARM, there is instruction and data caches.

As in the Wiki of example, a program that was loaded with 'loads' command was able to run.
However, when I loaded in the same program the 'fatload' command, it could not be executed.

When I look at the source program, in the 'loads' command has been executed cache flush.
But, in the 'fatload' command, cache flash was not executed.

So, I created this patch.

Thanks.

---
yoko

2016-10-10 22:26 GMT+09:00 James Chargin <[email protected]>:

Quoted 48 lines

Dear yoko,

Quoted 26 lines · yoko

---

Changes for v2:
- The commit message is changed.

 fs/fs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/fs.c +2 -0
index 595ff1f..7607230 100644
@@ -417,6 +417,8 @@ int do_load(cmd_tbl_t *cmdtp, int flag, int argc,
 char * const argv[],
        }
        puts("\n");
 
+       flush_cache(addr, len_read);
+
        setenv_hex("fileaddr", addr);
        setenv_hex("filesize", len_read);

fs/fs.c int do_fs_type(cmd_tbl_t *cmdtp, int flag, int argc, · line 538

Quoted 5 lines
fs/fs.c +0 -1
@@ -535,4 +537,3 @@ int do_fs_type(cmd_tbl_t *cmdtp, int flag, int argc,
 char * const argv[])
 
        return CMD_RET_SUCCESS;
 }
-

The wiki includes information about cache considerations for the "go" command [1]. If possible, please check that information to be sure it remains consistent with this patch.

Thanks,
Jim

[1] http://www.denx.de/wiki/view/DULG/UBootStandalone#Section_5.12.3.
--
Jim Chargin
AJA Video Systems jimc at aja.com
(530) 271-3334 http://www.aja.com