| From 6dc17c01df592f685636e34ad8bb0a6ecb994e15 Mon Sep 17 00:00:00 2001 |
| From: Anusmita Dutta Mazumder <anusmita.duttamazumder@arm.com> |
| Date: Thu, 21 Mar 2024 20:34:46 +0000 |
| Subject: [PATCH] corstone1000: set unique GUID for fvp and mps3 |
| |
| This patch sets unique GUID for Corstone1000 FVP and MPS3 |
| |
| Upstream-Status: Inappropriate [Redesign of Capsule update interface is required] |
| Signed-off-by: Anusmita Dutta Mazumder <anusmita.duttamazumder@arm.com> |
| --- |
| lib/efi_loader/efi_firmware.c | 15 +++++++++++++-- |
| 1 file changed, 13 insertions(+), 2 deletions(-) |
| |
| diff --git a/lib/efi_loader/efi_firmware.c b/lib/efi_loader/efi_firmware.c |
| index 7792a6aa83..1e49f79864 100644 |
| --- a/lib/efi_loader/efi_firmware.c |
| +++ b/lib/efi_loader/efi_firmware.c |
| @@ -16,16 +16,19 @@ |
| |
| #include <linux/list.h> |
| #include <efi_variable.h> |
| +#include <generated/dt.h> |
| |
| #define FMP_PAYLOAD_HDR_SIGNATURE SIGNATURE_32('M', 'S', 'S', '1') |
| |
| #if CONFIG_IS_ENABLED(TARGET_CORSTONE1000) |
| /* Firmware GUID */ |
| -#define EFI_CORSTONE1000_FIRMWARE_GUID \ |
| +#define EFI_CORSTONE1000_FIRMWARE_GUID_FVP \ |
| EFI_GUID(0x989f3a4e, 0x46e0, 0x4cd0, 0x98, 0x77, \ |
| 0xa2, 0x5c, 0x70, 0xc0, 0x13, 0x29) |
| |
| -efi_guid_t corstone1000_firmware_guid = EFI_CORSTONE1000_FIRMWARE_GUID; |
| +#define EFI_CORSTONE1000_FIRMWARE_GUID_MPS3 \ |
| + EFI_GUID(0xdf1865d1, 0x90fb, 0x4d59, 0x9c, 0x38, \ |
| + 0xc9, 0xf2, 0xc1, 0xbb, 0xa8, 0xcc) |
| |
| static efi_status_t efi_corstone1000_img_info_get ( |
| efi_uintn_t *image_info_size, |
| @@ -334,6 +337,14 @@ efi_status_t EFIAPI efi_firmware_get_image_info( |
| u16 **package_version_name) |
| { |
| efi_status_t ret; |
| + efi_guid_t corstone1000_firmware_guid; |
| + const char *cmp_dtb = DEVICE_TREE; |
| + |
| + if (!strcmp(cmp_dtb, "corstone1000-fvp")) { |
| + corstone1000_firmware_guid = (efi_guid_t)EFI_CORSTONE1000_FIRMWARE_GUID_FVP; |
| + } else { |
| + corstone1000_firmware_guid = (efi_guid_t)EFI_CORSTONE1000_FIRMWARE_GUID_MPS3; |
| + } |
| |
| EFI_ENTRY("%p %p %p %p %p %p %p %p\n", this, |
| image_info_size, image_info, |
| -- |
| 2.38.1 |
| |