Fixed compilation of all packages tracked by CI after rebasing upon edk2-stable202405 tag.

This commit is contained in:
Mikhail Krichanov 2024-06-28 11:01:20 +03:00
parent dfbc6323ce
commit a6c369fc36
21 changed files with 53 additions and 67 deletions

View File

@ -10,6 +10,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <Base.h>
#include <Library/BaseMemoryLib.h>
#if !defined (__arm__)
#if defined (__clang__) && !defined (__APPLE__)
/* Copies bytes between buffers */
@ -53,3 +54,4 @@ __bzero (
ZeroMem (src, count);
}
#endif
#endif

View File

@ -156,60 +156,3 @@ PhaseFreePool (
{
// Not implemented yet
}
/**
Reallocates a buffer of type EfiBootServicesData.
Allocates and zeros the number bytes specified by NewSize from memory of type
EfiBootServicesData. If OldBuffer is not NULL, then the smaller of OldSize and
NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
OldBuffer is freed. A pointer to the newly allocated buffer is returned.
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
enough memory remaining to satisfy the request, then NULL is returned.
If the allocation of the new buffer is successful and the smaller of NewSize and OldSize
is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT().
@param OldSize The size, in bytes, of OldBuffer.
@param NewSize The size, in bytes, of the buffer to reallocate.
@param OldBuffer The buffer to copy to the allocated buffer. This is an optional
parameter that may be NULL.
@return A pointer to the allocated buffer or NULL if allocation fails.
**/
VOID *
EFIAPI
ReallocatePool (
IN UINTN OldSize,
IN UINTN NewSize,
IN VOID *OldBuffer OPTIONAL
)
{
VOID *NewBuffer;
// Validate the OldBuffer is HobAllocated.
DEBUG_CODE_BEGIN ();
EFI_HOB_HANDOFF_INFO_TABLE *HandOffHob;
if (OldBuffer != NULL) {
HandOffHob = GetHobList ();
ASSERT (((EFI_PHYSICAL_ADDRESS)(UINTN)OldBuffer >= HandOffHob->EfiMemoryBottom));
ASSERT (((EFI_PHYSICAL_ADDRESS)((UINTN)OldBuffer + OldSize) <= HandOffHob->EfiFreeMemoryBottom));
}
DEBUG_CODE_END ();
// If new buffer would be smaller just return old buffer as FreePool isn't supported.
if ((OldBuffer != NULL) && (OldSize >= NewSize)) {
return OldBuffer;
}
NewBuffer = AllocateZeroPool (NewSize);
if ((NewBuffer != NULL) && (OldBuffer != NULL)) {
CopyMem (NewBuffer, OldBuffer, MIN (OldSize, NewSize));
FreePool (OldBuffer);
}
return NewBuffer;
}

View File

@ -49,6 +49,7 @@ FillWriteBuffer (
UINT8 SfdpAddressBytes;
SfdpAddressBytes = (UINT8)Instance->SfdpBasicFlash->AddressBytes;
AddressSize = 0;
// Copy Opcode into Write Buffer
Instance->SpiTransactionWriteBuffer[0] = Opcode;

View File

@ -109,6 +109,12 @@
SpiHcPlatformLib|MdeModulePkg/Library/BaseSpiHcPlatformLibNull/BaseSpiHcPlatformLibNull.inf
IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
[LibraryClasses.IA32]
AmdSvsmLib|UefiCpuPkg/Library/AmdSvsmLibNull/AmdSvsmLibNull.inf
[LibraryClasses.X64]
AmdSvsmLib|OvmfPkg/Library/AmdSvsmLib/AmdSvsmLib.inf
[LibraryClasses.EBC.PEIM]
IoLib|MdePkg/Library/PeiIoLibCpuIo/PeiIoLibCpuIo.inf

View File

@ -437,7 +437,7 @@ UnitTestDebugAssert (
#define DEBUG(Expression) \
do { \
if (FALSE) { \
_DEBUG (Expression); \
_DEBUGLIB_DEBUG (Expression); \
} \
} while (FALSE)
#endif

View File

@ -1001,7 +1001,7 @@ Dhcp6AppendETOption (
return EFI_INVALID_PARAMETER;
}
if ((Elapsed == NULL)) {
if (Elapsed == NULL) {
return EFI_INVALID_PARAMETER;
}

View File

@ -18,7 +18,6 @@
#include <IndustryStandard/IntelTdx.h>
#include <Library/PeiServicesLib.h>
#include <Pi/PiHob.h>
#include <Library/TdxLib.h>
#include <WorkArea.h>
#include <ConfidentialComputingGuestAttr.h>

View File

@ -82,11 +82,11 @@ gUefiOvmfPkgTokenSpaceGuid.PcdOvmfWorkAreaBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvm
0x010000|0x010000
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamSize
0x020000|0x0E0000
0x020000|0x100000
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfPeiMemFvBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfPeiMemFvSize
FV = PEIFV
0x100000|0xE80000
0x120000|0xE60000
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDxeMemFvBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDxeMemFvSize
FV = DXEFV

View File

@ -103,11 +103,11 @@ gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecApicPageTableBase|gUefiOvmfPkgTokenSpaceGui
0x011000|0x00F000
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamSize
0x020000|0x110000
0x020000|0x120000
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfPeiMemFvBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfPeiMemFvSize
FV = PEIFV
0x130000|0xE50000
0x140000|0xE40000
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDxeMemFvBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDxeMemFvSize
FV = DXEFV

View File

@ -9,13 +9,18 @@
**/
#include "MpLib.h"
#include <Library/CcExitLib.h>
#include <Library/AmdSvsmLib.h>
#include <Library/CcExitLib.h>
#include <Library/PlatformInitLib.h>
#include <Register/Amd/Fam17Msr.h>
#include <Register/Amd/Ghcb.h>
#define _IS_ALIGNED(x, y) (ALIGN_POINTER((x), (y)) == (x))
extern EFI_HOB_PLATFORM_INFO *mPlatformInfoHob;
/**
Perform the requested AP Creation action.
@ -293,7 +298,7 @@ SevSnpCreateAP (
//
GuidHob = GetFirstGuidHob (&gGhcbApicIdsGuid);
GhcbApicIds = (GHCB_APIC_IDS *)(*(UINTN *)GET_GUID_HOB_DATA (GuidHob));
MaxIndex = MIN (GhcbApicIds->NumEntries, PcdGet32 (PcdCpuMaxLogicalProcessorNumber));
MaxIndex = MIN (GhcbApicIds->NumEntries, mPlatformInfoHob->PcdCpuMaxLogicalProcessorNumber);
} else {
//
// APs have been previously started.

View File

@ -22,7 +22,7 @@
SUPPORTED_ARCHITECTURES = IA32|X64
BUILD_TARGETS = DEBUG|RELEASE|NOOPT
SKUID_IDENTIFIER = DEFAULT
OUTPUT_DIRECTORY = Build/UefiPayloadPkg$(BUILD_ARCH)
OUTPUT_DIRECTORY = Build/UefiPayloadPkg
FLASH_DEFINITION = UefiPayloadPkg/UefiPayloadPkg.fdf
PCD_DYNAMIC_AS_DYNAMICEX = TRUE

View File

@ -39,3 +39,6 @@
[Depex]
TRUE
[BuildOptions]
NOOPT_CLANGPDB_*_DLINK_FLAGS = /force:unresolved

View File

@ -33,3 +33,6 @@
[Pcd]
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask
[BuildOptions]
NOOPT_CLANGPDB_*_DLINK_FLAGS = /force:unresolved

View File

@ -39,3 +39,6 @@
[Depex]
gEfiPeiMemoryDiscoveredPpiGuid
[BuildOptions]
NOOPT_CLANGPDB_*_DLINK_FLAGS = /force:unresolved

View File

@ -40,3 +40,6 @@
[Depex]
gEfiSmmCpuProtocolGuid
[BuildOptions]
NOOPT_CLANGPDB_*_DLINK_FLAGS = /force:unresolved

View File

@ -36,3 +36,6 @@
[Pcd]
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask
[BuildOptions]
NOOPT_CLANGPDB_*_DLINK_FLAGS = /force:unresolved

View File

@ -41,3 +41,6 @@
[Depex]
TRUE
[BuildOptions]
NOOPT_CLANGPDB_*_DLINK_FLAGS = /force:unresolved

View File

@ -35,3 +35,6 @@
[Pcd]
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask
[BuildOptions]
NOOPT_CLANGPDB_*_DLINK_FLAGS = /force:unresolved

View File

@ -41,3 +41,6 @@
[Depex]
gEfiPeiMemoryDiscoveredPpiGuid
[BuildOptions]
NOOPT_CLANGPDB_*_DLINK_FLAGS = /force:unresolved

View File

@ -42,3 +42,6 @@
[Depex]
gEfiSmmCpuProtocolGuid
[BuildOptions]
NOOPT_CLANGPDB_*_DLINK_FLAGS = /force:unresolved

View File

@ -38,3 +38,6 @@
[Pcd]
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask
[BuildOptions]
NOOPT_CLANGPDB_*_DLINK_FLAGS = /force:unresolved