summaryrefslogtreecommitdiff
path: root/cmd/nvedit_efi.c
Commit message (Collapse)AuthorAgeFilesLines
* common: Drop uuid.h from common headerSimon Glass2020-05-181-0/+1
| | | | | | Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
* efi_loader: use logical and in do_env_print_efi()Heinrich Schuchardt2020-05-071-1/+1
| | | | | | | If we want to check if two booleans are true, we should use a logical conjunction (&&) and not a bitwise and-operator (&). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* cmd: env: add "-at" option to "env set -e" commandAKASHI Takahiro2020-04-161-1/+4
| | | | | | | With "-at" option, EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS will be passed to SetVariable() to authenticate the variable. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
* cmd: env: use appropriate guid for authenticated UEFI variableAKASHI Takahiro2020-04-161-4/+14
| | | | | | | | A signature database variable is associated with a specific guid. For convenience, if user doesn't supply any guid info, "env set|print -e" should complement it. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
* cmd: env: extend "env [set|print] -e" to manage UEFI variablesAKASHI Takahiro2019-10-301-39/+238
| | | | | | | | | | | | | | | | | | | With this patch, when setting UEFI variable with "env set -e" command, we will be able to - specify vendor guid with "-guid guid", - specify variable attributes, BOOTSERVICE_ACCESS, RUNTIME_ACCESS, respectively with "-bs" and "-rt", - append a value instead of overwriting with "-a", - use memory as variable's value instead of explicit values given at the command line with "-i address,size" If guid is not explicitly given, default value will be used. Meanwhile, "env print -e," will be modified so that it will NOT dump a variable's value if '-n' is specified. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* cmd: env: fix a typo in a comment of do_env_set_efi()AKASHI Takahiro2019-10-061-1/+1
| | | | | | | A wrong function name is referred to in a comment of do_env_set_efi(). Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* env: Move env_set() to env.hSimon Glass2019-08-111-0/+1
| | | | | | | Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* cmd: env: add -nv option for UEFI non-volatile variableAKASHI Takahiro2019-06-041-3/+12
| | | | | | | | With this option, -nv, at "setenv -e" command, a variable will be defined as non-volatile. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* cmd: env: print a message when setting UEFI variable failedAKASHI Takahiro2019-06-041-1/+9
| | | | | | | Error message will alert a user that setting/deleting a variable failed. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: memory leak in append valueHeinrich Schuchardt2019-05-021-1/+4
| | | | | | | | | | When printing an UEFI variable an error may arise while converting an illegal hexadecimal value. In this case a buffer is leaked. Close the memory leak. Provide an error message. Reported-by: Coverity (CID 185830) Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: memory leak in efi_dump_single_var()Heinrich Schuchardt2019-03-201-1/+0
| | | | | | | | A misplaced return statement lead to a memory leak in efi_dump_single_var(). Reported-by: Coverity (CID 185829) Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* cmd: env: add "-e" option for handling UEFI variablesAKASHI Takahiro2019-02-251-0/+399
"env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>