Skip to contentSkip to conversation

efi_loader: Correct value for ARM_SMC_MM_RET_NO_MEMORY

PATCH New Ilias Apalodimas 2 participants 2 messages Jul 16, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 efi_loader: Correct value for ARM_SMC_MM_RET_NO_MEMORY

Instead of adding the definition for the specific MM SVC used in StandAloneMM we added the one used in the standard SMC calls. So change the value from -4 to -5 to match the correct one defined in EDK2

Fixes 23a397d2e2fb: ("efi_loader: Add headers for EDK2 StandAloneMM communication")

---
 include/mm_communication.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/mm_communication.h +2 -2
index 193c4d157874..5aa60160ac63 100644
@@ -52,14 +52,14 @@ struct efi_mm_communicate_header {
 #define MM_COMMUNICATE_HEADER_SIZE \
 	(sizeof(struct efi_mm_communicate_header))
 
-/* Defined in EDK2 ArmPkg/Include/IndustryStandard/ArmStdSmc.h */
+/* Defined in EDK2 ArmPkg/Include/IndustryStandard/ArmMmSvc.h */
 
 /* MM return error codes */
 #define ARM_SMC_MM_RET_SUCCESS              0
 #define ARM_SMC_MM_RET_NOT_SUPPORTED       -1
 #define ARM_SMC_MM_RET_INVALID_PARAMS      -2
 #define ARM_SMC_MM_RET_DENIED              -3
-#define ARM_SMC_MM_RET_NO_MEMORY           -4
+#define ARM_SMC_MM_RET_NO_MEMORY           -5
 
 /* Defined in EDK2 MdeModulePkg/Include/Guid/SmmVariableCommon.h */
 
Signature · 1 line
2.28.0.rc0
#1 lore raw

PATCH 1/1 efi_loader: Correct value for ARM_SMC_MM_RET_NO_MEMORY

Quoted 4 lines · Ilias Apalodimas

Instead of adding the definition for the specific MM SVC used in StandAloneMM we added the one used in the standard SMC calls. So change the value from -4 to -5 to match the correct one defined in EDK2

Please, rename all your MM return code constants to avoid further confusion:

/* MM SVC return error codes */
#define ARM_SVC_SPM_RET_SUCCESS 0

#define ARM_SVC_SPM_RET_NOT_SUPPORTED        -1
#define ARM_SVC_SPM_RET_INVALID_PARAMS       -2
#define ARM_SVC_SPM_RET_DENIED               -3
#define ARM_SVC_SPM_RET_NO_MEMORY            -5

Best regards

Heinrich

Quoted 29 lines

Fixes 23a397d2e2fb: ("efi_loader: Add headers for EDK2 StandAloneMM communication")

---
 include/mm_communication.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/mm_communication.h +2 -2
index 193c4d157874..5aa60160ac63 100644
@@ -52,14 +52,14 @@ struct efi_mm_communicate_header {
 #define MM_COMMUNICATE_HEADER_SIZE \
 	(sizeof(struct efi_mm_communicate_header))
 
-/* Defined in EDK2 ArmPkg/Include/IndustryStandard/ArmStdSmc.h */
+/* Defined in EDK2 ArmPkg/Include/IndustryStandard/ArmMmSvc.h */
 
 /* MM return error codes */
 #define ARM_SMC_MM_RET_SUCCESS              0
 #define ARM_SMC_MM_RET_NOT_SUPPORTED       -1
 #define ARM_SMC_MM_RET_INVALID_PARAMS      -2
 #define ARM_SMC_MM_RET_DENIED              -3
-#define ARM_SMC_MM_RET_NO_MEMORY           -4
+#define ARM_SMC_MM_RET_NO_MEMORY           -5
 
 /* Defined in EDK2 MdeModulePkg/Include/Guid/SmmVariableCommon.h */