Skip to content

Commit

Permalink
app: aboot: fastboot: Simplify fastboot_stage() a bit
Browse files Browse the repository at this point in the history
I don't think the cache invalidate is really necessary.
Also, avoid copying if giving in the download_base as address
(in that case we assume it was already copied there).
  • Loading branch information
stephan-gh committed Mar 17, 2021
1 parent e5087c8 commit 9776e65
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/aboot/fastboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,15 +406,14 @@ void fastboot_okay(const char *info)

void fastboot_stage(const void *data, unsigned sz)
{
arch_invalidate_cache_range((addr_t) download_base, download_size);
download_size = 0;

if (sz > download_max) {
fastboot_fail("data too large");
return;
}

memcpy(download_base, data, sz);
if (data != download_base)
memcpy(download_base, data, sz);
download_size = sz;

fastboot_okay("");
Expand Down

0 comments on commit 9776e65

Please sign in to comment.