Eliminate duplicate GUID definition.
Do explicit data cast.
Use StrnCpy instead of StrCpy.
Update GCC assembly.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed off by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed by: Eric Dong <eric.dong@intel.com>
Reviewed by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15762
6f19259b-4bc3-4df7-8a09-
765794883524
[Defines]\r
INF_VERSION = 0x00010005\r
BASE_NAME = FspSecCore\r
- FILE_GUID = 1BA0062E-C779-4582-8566-336AE8F78F09\r
+ FILE_GUID = 207CE046-0ADF-47c3-B9E3-844F12C398DD\r
MODULE_TYPE = SEC\r
VERSION_STRING = 1.0\r
\r
-\r
#\r
# The following information is for reference only and not required by the build tools.\r
#\r
//\r
if (EnableMtrr) {\r
TempQword = AsmReadMsr64(EFI_MSR_CACHE_IA32_MTRR_DEF_TYPE);\r
- TempQword |= (B_EFI_MSR_GLOBAL_MTRR_ENABLE | B_EFI_MSR_FIXED_MTRR_ENABLE);\r
+ TempQword |= (UINT64)(B_EFI_MSR_GLOBAL_MTRR_ENABLE | B_EFI_MSR_FIXED_MTRR_ENABLE);\r
} else {\r
TempQword = OldMtrr;\r
}\r
//\r
// Generate the ASSERT() message in Ascii format\r
//\r
- AsciiStrCpy (Buffer, "-> EBP:0x00000000 EIP:0x00000000\n");\r
+ AsciiStrnCpy (Buffer, sizeof(Buffer), "-> EBP:0x00000000 EIP:0x00000000\n");\r
SerialPortWrite ((UINT8 *)"ASSERT DUMP:\n", 13);\r
while (Frame != NULL) {\r
FillHex ((UINT32)Frame, Buffer + 9);\r
NotificatonCount = 0;\r
while (NotificatonCount < sizeof(mFspNotfifySequence) / sizeof(UINT32)) {\r
\r
- Count = (NotificatonCount << 1) & 0x07;\r
+ Count = (UINT8)((NotificatonCount << 1) & 0x07);\r
SetFspMeasurePoint (FSP_PERF_ID_API_NOTIFY_POSTPCI_ENTRY + Count);\r
\r
NotificatonValue = ((NOTIFY_PHASE_PARAMS *)(UINTN)GetFspApiParameter ())->Phase;\r
[Defines]\r
INF_VERSION = 0x00010005\r
BASE_NAME = FspWrapperSecCore\r
- FILE_GUID = 1BA0062E-C779-4582-8566-336AE8F78F09\r
+ FILE_GUID = 4BAEF5C9-3247-4eab-801A-32A7F330D330\r
MODULE_TYPE = SEC\r
VERSION_STRING = 1.0\r
\r
#\r
gFspWrapperTokenSpaceGuid = {0x2bc1c74a, 0x122f, 0x40b2, { 0xb2, 0x23, 0x8, 0x2b, 0x74, 0x65, 0x22, 0x5d } }\r
\r
- # Guid define in FSP EAS\r
- gFspHeaderFileGuid = { 0x912740BE, 0x2284, 0x4734, { 0xB9, 0x71, 0x84, 0xB0, 0x27, 0x35, 0x3F, 0x0C } }\r
- gFspBootLoaderTemporaryMemoryGuid = { 0xbbcff46c, 0xc8d3, 0x4113, { 0x89, 0x85, 0xb9, 0xd4, 0xf3, 0xb3, 0xf6, 0x4e } }\r
- gFspReservedMemoryResourceHobGuid = { 0x69a79759, 0x1373, 0x4367, { 0xa6, 0xc4, 0xc7, 0xf5, 0x9e, 0xfd, 0x98, 0x6e } }\r
- gFspNonVolatileStorageHobGuid = { 0x721acf02, 0x4d77, 0x4c2a, { 0xb3, 0xdc, 0x27, 0x0b, 0x7b, 0xa9, 0xe4, 0xb0 } }\r
-\r
[Ppis]\r
gFspInitDonePpiGuid = { 0xf5ef05e4, 0xd538, 0x4774, { 0x8f, 0x1b, 0xe9, 0x77, 0x30, 0x11, 0xe0, 0x38 } }\r
gTopOfTemporaryRamPpiGuid = { 0x2f3962b2, 0x57c5, 0x44ec, { 0x9e, 0xfc, 0xa6, 0x9f, 0xd3, 0x02, 0x03, 0x2b } }\r
\r
#include "Fsp.h"\r
\r
+ASM_GLOBAL ASM_PFX(_gPcd_FixedAtBuild_PcdFlashFvFspBase)\r
+ASM_GLOBAL ASM_PFX(_gPcd_FixedAtBuild_PcdFlashFvFspSize)\r
+\r
ASM_GLOBAL ASM_PFX(_TEXT_REALMODE)\r
ASM_PFX(_TEXT_REALMODE):\r
#----------------------------------------------------------------------------\r
# Transition to Flat 32 bit protected mode\r
# The jump to a far pointer causes the transition to 32 bit mode\r
#\r
- movl $ProtectedModeEntryLinearAddress, %esi\r
+ movl ASM_PFX(ProtectedModeEntryLinearAddress), %esi\r
jmp *%cs:(%si)\r
\r
ASM_GLOBAL ASM_PFX(_TEXT_PROTECTED_MODE)\r
ASM_PFX(ProtectedModeEntryPoint):\r
\r
# Find the fsp info header\r
- movl PcdGet32 (PcdFlashFvFspBase), %edi\r
- movl PcdGet32 (PcdFlashFvFspSize), %ecx\r
+ movl ASM_PFX(_gPcd_FixedAtBuild_PcdFlashFvFspBase), %edi\r
+ movl ASM_PFX(_gPcd_FixedAtBuild_PcdFlashFvFspSize), %ecx\r
\r
movl FVH_SIGINATURE_OFFSET(%edi), %eax\r
cmp $FVH_SIGINATURE_VALID_VALUE, %eax\r
.align 0x10\r
TempRamInitStack:\r
.long TempRamInitDone\r
- .long TempRamInitParams\r
+ .long ASM_PFX(TempRamInitParams)\r
\r
#\r
# ROM-based Global-Descriptor Table for the Tiano PEI Phase\r
\r
ASM_PFX(ProtectedModeEntryLinearAddress):\r
ProtectedModeEntryLinearOffset:\r
- .long ProtectedModeEntryPoint # Offset of our 32 bit code\r
+ .long ASM_PFX(ProtectedModeEntryPoint) # Offset of our 32 bit code\r
.word LINEAR_CODE_SEL\r