Beside the functional improvement, converting the input to int is required
depending on what Python version is being used to avoid the variable
propagating down the call-chain as a str.
Signed-off-by: Tamas K Lengyel <tamas.lengyel@oracle.com>
Currently the common.uefi.access_uefispec -a modify test modifications to variables
with the default variable attribute of nv | bs | rs (0x7). In this patch we make
this behavior more configurable.
By default the -a modify option will attempt to modify only the content of the variable,
but will not attempt to change the existing attributes of the variable. We have observed
cases where the test used this way uncovered more issues on variables where different
attributes were used and we did not attempt changing the attribute.
By specifying an optional attribute with -a modify,<attribute> the user can now test
variable modification with any attribute instead of just the currently hard-coded one.
Signed-off-by: Tamas K Lengyel <tamas.lengyel@oracle.com>
The access_uefispec module currently reports OsIndicationsSupported should be
read-only even when the module is ran from UEFI shell before ExitBootServices
has been called. This is a false positive, OsIndicationsSupported is expected
to be read-write before ExitBootServices.
See https://uefi.org/specs/UEFI/2.10/03_Boot_Manager.html, variables that
should be read-only in all cases are specifically called out as:
"Should be treated as read-only". OsIndicationsSupported is not listed as such.
After ExitBootServices the following applies, as specified in
https://uefi.org/specs/UEFI/2.10/08_Services_Runtime_Services.html#setvariable:
"Once ExitBootServices() is performed, only variables that have
EFI_VARIABLE_RUNTIME_ACCESS and EFI_VARIABLE_NON_VOLATILE set can be set with
SetVariable()."
Signed-off-by: Tamas K Lengyel <tamas.lengyel@oracle.com>
Updated the device.get_obj/objlist functions to match the other types e.g. "get_list_by_name" and "get_instance_by_name".
Updated register.read/read_field/write/write_field functions to first get the register objects, then read*/write* from there.
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
* Add Win Cert types to uefi_fv and spi_uefi
* Move uefi search to library.uefi folder
* Move uefi_fv to library.uefi
* Move uefi_compression to library.uefi>
* Move uefi_common to library.uefi
* Move uefi_platform to library.uefi
* Move spi_uefi to library.uefi
* Add library.uefi.sleep_scripts file
* Move S3 functionality into sleep_state file
* Add varstore and variable files to library.uefi
* Fixup Flake8 suggestions
* Rename library uefi files to remove uefi_
* This change changes the filename of any file under the library.uefi to remove the uefi as part of the name.
* Fix Errors when testing changes
Signed-off-by: brentholtsclaw <brent.holtsclaw@intel.com>