|
@@ -75,7 +75,7 @@ static EFI_GUID efi_hii_ibm_ucm_compliant_formset_guid
|
75
|
75
|
|
76
|
76
|
/** EFI HII database protocol */
|
77
|
77
|
static EFI_HII_DATABASE_PROTOCOL *efihii;
|
78
|
|
-EFI_REQUIRE_PROTOCOL ( EFI_HII_DATABASE_PROTOCOL, &efihii );
|
|
78
|
+EFI_REQUEST_PROTOCOL ( EFI_HII_DATABASE_PROTOCOL, &efihii );
|
79
|
79
|
|
80
|
80
|
/**
|
81
|
81
|
* Identify settings to be exposed via HII
|
|
@@ -649,6 +649,10 @@ int efi_snp_hii_install ( struct efi_snp_device *snpdev ) {
|
649
|
649
|
int efirc;
|
650
|
650
|
int rc;
|
651
|
651
|
|
|
652
|
+ /* Do nothing if HII database protocol is not supported */
|
|
653
|
+ if ( ! efihii )
|
|
654
|
+ return 0;
|
|
655
|
+
|
652
|
656
|
/* Initialise HII protocol */
|
653
|
657
|
memcpy ( &snpdev->hii, &efi_snp_device_hii, sizeof ( snpdev->hii ) );
|
654
|
658
|
|
|
@@ -705,6 +709,11 @@ int efi_snp_hii_install ( struct efi_snp_device *snpdev ) {
|
705
|
709
|
void efi_snp_hii_uninstall ( struct efi_snp_device *snpdev ) {
|
706
|
710
|
EFI_BOOT_SERVICES *bs = efi_systab->BootServices;
|
707
|
711
|
|
|
712
|
+ /* Do nothing if HII database protocol is not supported */
|
|
713
|
+ if ( ! efihii )
|
|
714
|
+ return;
|
|
715
|
+
|
|
716
|
+ /* Uninstall protocols and remove package list */
|
708
|
717
|
bs->UninstallMultipleProtocolInterfaces (
|
709
|
718
|
snpdev->handle,
|
710
|
719
|
&efi_hii_config_access_protocol_guid, &snpdev->hii,
|