Commit ce43528d6a9ff3d1099a6bc194f0cccc8f0df44d
1 parent
359a699a12
Exists in
smarc_8mq_lf_v2020.04
and in
9 other branches
efi_loader: move efi_query_variable_info()
Let's keep similar things together. Move efi_query_variable_info() to lib/efi_loader/efi_variable.c Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Showing 3 changed files with 32 additions and 27 deletions Side-by-side Diff
include/efi_loader.h
... | ... | @@ -618,6 +618,11 @@ |
618 | 618 | const efi_guid_t *vendor, u32 attributes, |
619 | 619 | efi_uintn_t data_size, const void *data); |
620 | 620 | |
621 | +efi_status_t EFIAPI efi_query_variable_info( | |
622 | + u32 attributes, u64 *maximum_variable_storage_size, | |
623 | + u64 *remaining_variable_storage_size, | |
624 | + u64 *maximum_variable_size); | |
625 | + | |
621 | 626 | /* |
622 | 627 | * See section 3.1.3 in the v2.7 UEFI spec for more details on |
623 | 628 | * the layout of EFI_LOAD_OPTION. In short it is: |
lib/efi_loader/efi_runtime.c
... | ... | @@ -782,33 +782,6 @@ |
782 | 782 | return EFI_UNSUPPORTED; |
783 | 783 | } |
784 | 784 | |
785 | -/** | |
786 | - * efi_query_variable_info() - get information about EFI variables | |
787 | - * | |
788 | - * This function implements the QueryVariableInfo() runtime service. | |
789 | - * | |
790 | - * See the Unified Extensible Firmware Interface (UEFI) specification for | |
791 | - * details. | |
792 | - * | |
793 | - * @attributes: bitmask to select variables to be | |
794 | - * queried | |
795 | - * @maximum_variable_storage_size: maximum size of storage area for the | |
796 | - * selected variable types | |
797 | - * @remaining_variable_storage_size: remaining size of storage are for the | |
798 | - * selected variable types | |
799 | - * @maximum_variable_size: maximum size of a variable of the | |
800 | - * selected type | |
801 | - * Returns: status code | |
802 | - */ | |
803 | -efi_status_t __efi_runtime EFIAPI efi_query_variable_info( | |
804 | - u32 attributes, | |
805 | - u64 *maximum_variable_storage_size, | |
806 | - u64 *remaining_variable_storage_size, | |
807 | - u64 *maximum_variable_size) | |
808 | -{ | |
809 | - return EFI_UNSUPPORTED; | |
810 | -} | |
811 | - | |
812 | 785 | struct efi_runtime_services __efi_runtime_data efi_runtime_services = { |
813 | 786 | .hdr = { |
814 | 787 | .signature = EFI_RUNTIME_SERVICES_SIGNATURE, |
lib/efi_loader/efi_variable.c
... | ... | @@ -520,4 +520,31 @@ |
520 | 520 | |
521 | 521 | return EFI_EXIT(ret); |
522 | 522 | } |
523 | + | |
524 | +/** | |
525 | + * efi_query_variable_info() - get information about EFI variables | |
526 | + * | |
527 | + * This function implements the QueryVariableInfo() runtime service. | |
528 | + * | |
529 | + * See the Unified Extensible Firmware Interface (UEFI) specification for | |
530 | + * details. | |
531 | + * | |
532 | + * @attributes: bitmask to select variables to be | |
533 | + * queried | |
534 | + * @maximum_variable_storage_size: maximum size of storage area for the | |
535 | + * selected variable types | |
536 | + * @remaining_variable_storage_size: remaining size of storage are for the | |
537 | + * selected variable types | |
538 | + * @maximum_variable_size: maximum size of a variable of the | |
539 | + * selected type | |
540 | + * Returns: status code | |
541 | + */ | |
542 | +efi_status_t __efi_runtime EFIAPI efi_query_variable_info( | |
543 | + u32 attributes, | |
544 | + u64 *maximum_variable_storage_size, | |
545 | + u64 *remaining_variable_storage_size, | |
546 | + u64 *maximum_variable_size) | |
547 | +{ | |
548 | + return EFI_UNSUPPORTED; | |
549 | +} |