Since there is now a formal definition of EFI_LOAD_OPTION, we can no longer typedef it as a UINT8*. So update the code to use the common definition, which is not a pointer type, hence the additional changes to the C code.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- Hello Olivier, This fixes the currently broken build for me. Regards, Ard. ArmPkg/Include/Library/BdsLib.h | 4 +--- ArmPkg/Library/BdsLib/BdsLoadOption.c | 8 ++++---- ArmPlatformPkg/Bds/BootOption.c | 6 +++--- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/ArmPkg/Include/Library/BdsLib.h b/ArmPkg/Include/Library/BdsLib.h index eb7f8f293fb1..c6416db8ae79 100644 --- a/ArmPkg/Include/Library/BdsLib.h +++ b/ArmPkg/Include/Library/BdsLib.h @@ -15,14 +15,12 @@ #ifndef __BDS_ENTRY_H__ #define __BDS_ENTRY_H__ -typedef UINT8* EFI_LOAD_OPTION; - /** This is defined by the UEFI specs, don't change it **/ typedef struct { UINT16 LoadOptionIndex; - EFI_LOAD_OPTION LoadOption; + EFI_LOAD_OPTION *LoadOption; UINTN LoadOptionSize; UINT32 Attributes; diff --git a/ArmPkg/Library/BdsLib/BdsLoadOption.c b/ArmPkg/Library/BdsLib/BdsLoadOption.c index be5ed41980a3..a87e7a0ff62c 100644 --- a/ArmPkg/Library/BdsLib/BdsLoadOption.c +++ b/ArmPkg/Library/BdsLib/BdsLoadOption.c @@ -16,7 +16,7 @@ EFI_STATUS BootOptionParseLoadOption ( - IN EFI_LOAD_OPTION EfiLoadOption, + IN EFI_LOAD_OPTION *EfiLoadOption, IN UINTN EfiLoadOptionSize, IN OUT BDS_LOAD_OPTION **BdsLoadOption ) @@ -73,7 +73,7 @@ BootOptionFromLoadOptionVariable ( ) { EFI_STATUS Status; - EFI_LOAD_OPTION EfiLoadOption; + EFI_LOAD_OPTION *EfiLoadOption; UINTN EfiLoadOptionSize; Status = GetGlobalEnvironmentVariable (BootVariableName, NULL, &EfiLoadOptionSize, (VOID**)&EfiLoadOption); @@ -141,12 +141,12 @@ BootOptionToLoadOptionVariable ( // Allocate the memory for the EFI Load Option BdsLoadOption->LoadOptionSize = sizeof(UINT32) + sizeof(UINT16) + DescriptionSize + BdsLoadOption->FilePathListLength + BdsLoadOption->OptionalDataSize; - BdsLoadOption->LoadOption = (EFI_LOAD_OPTION)AllocateZeroPool (BdsLoadOption->LoadOptionSize); + BdsLoadOption->LoadOption = (EFI_LOAD_OPTION *)AllocateZeroPool (BdsLoadOption->LoadOptionSize); if (BdsLoadOption->LoadOption == NULL) { return EFI_OUT_OF_RESOURCES; } - EfiLoadOptionPtr = BdsLoadOption->LoadOption; + EfiLoadOptionPtr = (UINT8 *) BdsLoadOption->LoadOption; // // Populate the EFI Load Option and BDS Boot Option structures diff --git a/ArmPlatformPkg/Bds/BootOption.c b/ArmPlatformPkg/Bds/BootOption.c index 889040e3b63a..bb218f82aaf4 100644 --- a/ArmPlatformPkg/Bds/BootOption.c +++ b/ArmPlatformPkg/Bds/BootOption.c @@ -141,7 +141,7 @@ BootOptionSetFields ( IN UINTN OptionalDataSize ) { - EFI_LOAD_OPTION EfiLoadOption; + EFI_LOAD_OPTION *EfiLoadOption; UINTN EfiLoadOptionSize; UINTN BootDescriptionSize; UINT16 FilePathListLength; @@ -168,8 +168,8 @@ BootOptionSetFields ( // Allocate the memory for the EFI Load Option EfiLoadOptionSize = sizeof(UINT32) + sizeof(UINT16) + BootDescriptionSize + FilePathListLength + OptionalDataSize; - EfiLoadOption = (EFI_LOAD_OPTION)AllocatePool(EfiLoadOptionSize); - EfiLoadOptionPtr = EfiLoadOption; + EfiLoadOption = (EFI_LOAD_OPTION *)AllocatePool(EfiLoadOptionSize); + EfiLoadOptionPtr = (UINT8 *)EfiLoadOption; // // Populate the EFI Load Option and BDS Boot Option structures -- 1.9.1 ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel