Skip to content
Commit a930d69b authored by Ilias Apalodimas's avatar Ilias Apalodimas Committed by Heinrich Schuchardt
Browse files

efi_loader: replace a u16_strdup with alloc + memcpy



Heinrich reports that on RISC-V unaligned access is emulated by OpenSBI
which is very slow.  Performance wise it's better if we skip the calls
to u16_strdup() -- which in turn calls u16_strsize() and just allocate/copy the
memory directly.  The access to dp.length may still be unaligned, but that's
way less than what u16_strsize() would do

Signed-off-by: default avatarIlias Apalodimas <ilias.apalodimas@linaro.org>
Use malloc() instead of calloc().
Reviewed-by: default avatarHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
parent 64012e0c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment