!375 [sync] PR-374: add TPCM support with ipmi channel

From: @openeuler-sync-bot 
Reviewed-by: @t_feng 
Signed-off-by: @t_feng
This commit is contained in:
openeuler-ci-bot 2024-03-22 09:03:06 +00:00 committed by Gitee
commit 183b058470
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 19 additions and 14 deletions

View File

@ -13,7 +13,6 @@ fix firmwarehash length and uiCmdLength error
clean code
zhangqiumiao(4):
skip verification when just opening the grub.cfg without loading it
support control switch
modify GRUB_IPMI_TIMEOUT_MS from 7000 to 2000
@ -68,10 +67,10 @@ index 0000000..57a4cea
+ ((value >> 8 ) & 0x0000FF00) | \
+ ((value >> 24 ) & 0x000000FF))
+
+static grub_efi_guid_t gIpmiInterfaceProtocolGuid = EFI_TPCM_GUID;
+static grub_efi_guid_t hash2_service_binding_guid = GRUB_EFI_HASH2_SERVICE_BINDING_PROTOCOL_GUID;
+static grub_efi_guid_t hash2_guid = GRUB_EFI_HASH2_PROTOCOL_GUID;
+static grub_efi_guid_t sm3_guid = GRUB_HASH_ALGORITHM_SM3_GUID;
+static grub_guid_t gIpmiInterfaceProtocolGuid = EFI_TPCM_GUID;
+static grub_guid_t hash2_service_binding_guid = GRUB_EFI_HASH2_SERVICE_BINDING_PROTOCOL_GUID;
+static grub_guid_t hash2_guid = GRUB_EFI_HASH2_PROTOCOL_GUID;
+static grub_guid_t sm3_guid = GRUB_HASH_ALGORITHM_SM3_GUID;
+
+static grub_efi_ipmi_interface_protocol_t *tpcm_ipmi;
+static grub_efi_uint16_t grub_tcpm_file_type = GRUB_FILE_TYPE_NONE;
@ -80,7 +79,7 @@ index 0000000..57a4cea
+static grub_efi_uint8_t permissive = 0;
+
+static grub_efi_handle_t
+grub_efi_service_binding (grub_efi_guid_t *service_binding_guid)
+grub_efi_service_binding (grub_guid_t *service_binding_guid)
+{
+ grub_efi_service_binding_t *service;
+ grub_efi_status_t status;
@ -102,7 +101,7 @@ index 0000000..57a4cea
+ return NULL;
+ }
+
+ status = efi_call_2 (service->create_child, service, &child_dev);
+ status = service->create_child (service, &child_dev);
+ if (status != GRUB_EFI_SUCCESS)
+ {
+ grub_printf ("Failed to create child device of efi service %x\n", status);
@ -718,19 +717,19 @@ index 0000000..d4cf93b
+struct grub_efi_hash2_protocol {
+ grub_efi_status_t
+ (*get_hash_size) (struct grub_efi_hash2_protocol *this,
+ grub_efi_guid_t *hash_algorithm,
+ grub_guid_t *hash_algorithm,
+ grub_efi_uintn_t hash_size);
+
+ grub_efi_status_t
+ (*hash) (struct grub_efi_hash2_protocol *this,
+ grub_efi_guid_t *hash_algorithm,
+ grub_guid_t *hash_algorithm,
+ grub_efi_uint8_t *message,
+ grub_efi_uintn_t message_size,
+ grub_efi_hash2_output *hash);
+
+ grub_efi_status_t
+ (*hash_init) (struct grub_efi_hash2_protocol *this,
+ grub_efi_guid_t *hash_algorithm);
+ grub_guid_t *hash_algorithm);
+
+ grub_efi_status_t
+ (*hash_update) (struct grub_efi_hash2_protocol *this,

View File

@ -118,7 +118,7 @@
### fixme
%ifarch aarch64 %{arm} riscv64 loongarch64
%global efi_modules " tpm "
%global efi_modules " tpm tpcm_kunpeng "
%else
%global efi_modules " backtrace chain tpm usb usbserial_common usbserial_pl2303 usbserial_ftdi usbserial_usbdebug keylayouts at_keyboard "
%endif

View File

@ -216,5 +216,5 @@ Patch215: 0032-Try-prefix-if-fw_path-doesn-t-work.patch
Patch216: 0034-Make-grub2-mkconfig-construct-titles-that-look-like-.patch
Patch217: 0035-Add-friendly-grub2-password-config-tool-985962.patch
Patch218: grub2-set-password-prompts-to-enter-the-current-pass.patch
#Patch208: add-TPCM-support-with-ipmi-channel.patch
#Patch209: skip-verification-when-not-loading-grub.cfg.patch
Patch219: add-TPCM-support-with-ipmi-channel.patch
Patch220: skip-verification-when-not-loading-grub.cfg.patch

View File

@ -14,7 +14,7 @@
Name: grub2
Epoch: 1
Version: 2.12
Release: 4
Release: 5
Summary: Bootloader with support for Linux, Multiboot and more
License: GPLv3+
URL: http://www.gnu.org/software/grub/
@ -449,6 +449,12 @@ fi
%{_datadir}/man/man*
%changelog
* Thu Mar 21 2024 zhangqiumiao <zhangqiumiao1@huawei.com> - 1:2.12-5
- Type:requirement
- CVE:NA
- SUG:NA
- DESC:add TPCM support with ipmi channel
* Mon Mar 11 2024 zhangqiumiao <zhangqiumiao1@huawei.com> - 1:2.12-4
- Type:bugfix
- CVE:NA