diff options
author | Emmanuel Vadot <manu@bidouilliste.com> | 2017-01-19 10:23:56 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-01-20 15:38:05 -0500 |
commit | 995eab8b5b580b67394312b1621c60a71042cd18 (patch) | |
tree | ed4713d36ca41a2b03815763b39a43bb8c773e64 /common/bootm_os.c | |
parent | b4e923a8056c29ae978c2086b65be0cbc84cef4e (diff) |
bootm: qnx: Disable data cache before booting QNX image
Instead of disabling the data cache in the bootelf command, disabling
it in the do_bootm_qnxelf function.
Some ELF binary might want the cache enabled.
Signed-off-by: Emmanuel Vadot <manu@bidouilliste.com>
Diffstat (limited to 'common/bootm_os.c')
-rw-r--r-- | common/bootm_os.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/common/bootm_os.c b/common/bootm_os.c index e3f5a46412..6e463c317e 100644 --- a/common/bootm_os.c +++ b/common/bootm_os.c @@ -353,6 +353,7 @@ static int do_bootm_qnxelf(int flag, int argc, char * const argv[], { char *local_args[2]; char str[16]; + int dcache; if (flag != BOOTM_STATE_OS_GO) return 0; @@ -367,8 +368,19 @@ static int do_bootm_qnxelf(int flag, int argc, char * const argv[], sprintf(str, "%lx", images->ep); /* write entry-point into string */ local_args[0] = argv[0]; local_args[1] = str; /* and provide it via the arguments */ + + /* + * QNX images require the data cache is disabled. + */ + dcache = dcache_status(); + if (dcache) + dcache_disable(); + do_bootelf(NULL, 0, 2, local_args); + if (dcache) + dcache_enable(); + return 1; } #endif |