Eliminate duplicated file GUID.
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
This commit is contained in:
parent
e7a8edfdf6
commit
a81fcd30c1
@ -14,11 +14,10 @@
|
|||||||
[Defines]
|
[Defines]
|
||||||
INF_VERSION = 0x00010005
|
INF_VERSION = 0x00010005
|
||||||
BASE_NAME = FspSecCore
|
BASE_NAME = FspSecCore
|
||||||
FILE_GUID = 1BA0062E-C779-4582-8566-336AE8F78F09
|
FILE_GUID = 207CE046-0ADF-47c3-B9E3-844F12C398DD
|
||||||
MODULE_TYPE = SEC
|
MODULE_TYPE = SEC
|
||||||
VERSION_STRING = 1.0
|
VERSION_STRING = 1.0
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# The following information is for reference only and not required by the build tools.
|
# The following information is for reference only and not required by the build tools.
|
||||||
#
|
#
|
||||||
|
@ -159,7 +159,7 @@ EfiRecoverCacheMtrr (
|
|||||||
//
|
//
|
||||||
if (EnableMtrr) {
|
if (EnableMtrr) {
|
||||||
TempQword = AsmReadMsr64(EFI_MSR_CACHE_IA32_MTRR_DEF_TYPE);
|
TempQword = AsmReadMsr64(EFI_MSR_CACHE_IA32_MTRR_DEF_TYPE);
|
||||||
TempQword |= (B_EFI_MSR_GLOBAL_MTRR_ENABLE | B_EFI_MSR_FIXED_MTRR_ENABLE);
|
TempQword |= (UINT64)(B_EFI_MSR_GLOBAL_MTRR_ENABLE | B_EFI_MSR_FIXED_MTRR_ENABLE);
|
||||||
} else {
|
} else {
|
||||||
TempQword = OldMtrr;
|
TempQword = OldMtrr;
|
||||||
}
|
}
|
||||||
|
@ -148,7 +148,7 @@ DebugAssertInternal (
|
|||||||
//
|
//
|
||||||
// Generate the ASSERT() message in Ascii format
|
// Generate the ASSERT() message in Ascii format
|
||||||
//
|
//
|
||||||
AsciiStrCpy (Buffer, "-> EBP:0x00000000 EIP:0x00000000\n");
|
AsciiStrnCpy (Buffer, sizeof(Buffer), "-> EBP:0x00000000 EIP:0x00000000\n");
|
||||||
SerialPortWrite ((UINT8 *)"ASSERT DUMP:\n", 13);
|
SerialPortWrite ((UINT8 *)"ASSERT DUMP:\n", 13);
|
||||||
while (Frame != NULL) {
|
while (Frame != NULL) {
|
||||||
FillHex ((UINT32)Frame, Buffer + 9);
|
FillHex ((UINT32)Frame, Buffer + 9);
|
||||||
|
@ -141,7 +141,7 @@ FspWaitForNotify (
|
|||||||
NotificatonCount = 0;
|
NotificatonCount = 0;
|
||||||
while (NotificatonCount < sizeof(mFspNotfifySequence) / sizeof(UINT32)) {
|
while (NotificatonCount < sizeof(mFspNotfifySequence) / sizeof(UINT32)) {
|
||||||
|
|
||||||
Count = (NotificatonCount << 1) & 0x07;
|
Count = (UINT8)((NotificatonCount << 1) & 0x07);
|
||||||
SetFspMeasurePoint (FSP_PERF_ID_API_NOTIFY_POSTPCI_ENTRY + Count);
|
SetFspMeasurePoint (FSP_PERF_ID_API_NOTIFY_POSTPCI_ENTRY + Count);
|
||||||
|
|
||||||
NotificatonValue = ((NOTIFY_PHASE_PARAMS *)(UINTN)GetFspApiParameter ())->Phase;
|
NotificatonValue = ((NOTIFY_PHASE_PARAMS *)(UINTN)GetFspApiParameter ())->Phase;
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
[Defines]
|
[Defines]
|
||||||
INF_VERSION = 0x00010005
|
INF_VERSION = 0x00010005
|
||||||
BASE_NAME = FspWrapperSecCore
|
BASE_NAME = FspWrapperSecCore
|
||||||
FILE_GUID = 1BA0062E-C779-4582-8566-336AE8F78F09
|
FILE_GUID = 4BAEF5C9-3247-4eab-801A-32A7F330D330
|
||||||
MODULE_TYPE = SEC
|
MODULE_TYPE = SEC
|
||||||
VERSION_STRING = 1.0
|
VERSION_STRING = 1.0
|
||||||
|
|
||||||
|
@ -30,12 +30,6 @@
|
|||||||
#
|
#
|
||||||
gFspWrapperTokenSpaceGuid = {0x2bc1c74a, 0x122f, 0x40b2, { 0xb2, 0x23, 0x8, 0x2b, 0x74, 0x65, 0x22, 0x5d } }
|
gFspWrapperTokenSpaceGuid = {0x2bc1c74a, 0x122f, 0x40b2, { 0xb2, 0x23, 0x8, 0x2b, 0x74, 0x65, 0x22, 0x5d } }
|
||||||
|
|
||||||
# Guid define in FSP EAS
|
|
||||||
gFspHeaderFileGuid = { 0x912740BE, 0x2284, 0x4734, { 0xB9, 0x71, 0x84, 0xB0, 0x27, 0x35, 0x3F, 0x0C } }
|
|
||||||
gFspBootLoaderTemporaryMemoryGuid = { 0xbbcff46c, 0xc8d3, 0x4113, { 0x89, 0x85, 0xb9, 0xd4, 0xf3, 0xb3, 0xf6, 0x4e } }
|
|
||||||
gFspReservedMemoryResourceHobGuid = { 0x69a79759, 0x1373, 0x4367, { 0xa6, 0xc4, 0xc7, 0xf5, 0x9e, 0xfd, 0x98, 0x6e } }
|
|
||||||
gFspNonVolatileStorageHobGuid = { 0x721acf02, 0x4d77, 0x4c2a, { 0xb3, 0xdc, 0x27, 0x0b, 0x7b, 0xa9, 0xe4, 0xb0 } }
|
|
||||||
|
|
||||||
[Ppis]
|
[Ppis]
|
||||||
gFspInitDonePpiGuid = { 0xf5ef05e4, 0xd538, 0x4774, { 0x8f, 0x1b, 0xe9, 0x77, 0x30, 0x11, 0xe0, 0x38 } }
|
gFspInitDonePpiGuid = { 0xf5ef05e4, 0xd538, 0x4774, { 0x8f, 0x1b, 0xe9, 0x77, 0x30, 0x11, 0xe0, 0x38 } }
|
||||||
gTopOfTemporaryRamPpiGuid = { 0x2f3962b2, 0x57c5, 0x44ec, { 0x9e, 0xfc, 0xa6, 0x9f, 0xd3, 0x02, 0x03, 0x2b } }
|
gTopOfTemporaryRamPpiGuid = { 0x2f3962b2, 0x57c5, 0x44ec, { 0x9e, 0xfc, 0xa6, 0x9f, 0xd3, 0x02, 0x03, 0x2b } }
|
||||||
|
@ -22,6 +22,9 @@
|
|||||||
|
|
||||||
#include "Fsp.h"
|
#include "Fsp.h"
|
||||||
|
|
||||||
|
ASM_GLOBAL ASM_PFX(_gPcd_FixedAtBuild_PcdFlashFvFspBase)
|
||||||
|
ASM_GLOBAL ASM_PFX(_gPcd_FixedAtBuild_PcdFlashFvFspSize)
|
||||||
|
|
||||||
ASM_GLOBAL ASM_PFX(_TEXT_REALMODE)
|
ASM_GLOBAL ASM_PFX(_TEXT_REALMODE)
|
||||||
ASM_PFX(_TEXT_REALMODE):
|
ASM_PFX(_TEXT_REALMODE):
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
@ -103,7 +106,7 @@ ASM_PFX(_ModuleEntryPoint):
|
|||||||
# Transition to Flat 32 bit protected mode
|
# Transition to Flat 32 bit protected mode
|
||||||
# The jump to a far pointer causes the transition to 32 bit mode
|
# The jump to a far pointer causes the transition to 32 bit mode
|
||||||
#
|
#
|
||||||
movl $ProtectedModeEntryLinearAddress, %esi
|
movl ASM_PFX(ProtectedModeEntryLinearAddress), %esi
|
||||||
jmp *%cs:(%si)
|
jmp *%cs:(%si)
|
||||||
|
|
||||||
ASM_GLOBAL ASM_PFX(_TEXT_PROTECTED_MODE)
|
ASM_GLOBAL ASM_PFX(_TEXT_PROTECTED_MODE)
|
||||||
@ -134,8 +137,8 @@ ASM_GLOBAL ASM_PFX(ProtectedModeEntryPoint)
|
|||||||
ASM_PFX(ProtectedModeEntryPoint):
|
ASM_PFX(ProtectedModeEntryPoint):
|
||||||
|
|
||||||
# Find the fsp info header
|
# Find the fsp info header
|
||||||
movl PcdGet32 (PcdFlashFvFspBase), %edi
|
movl ASM_PFX(_gPcd_FixedAtBuild_PcdFlashFvFspBase), %edi
|
||||||
movl PcdGet32 (PcdFlashFvFspSize), %ecx
|
movl ASM_PFX(_gPcd_FixedAtBuild_PcdFlashFvFspSize), %ecx
|
||||||
|
|
||||||
movl FVH_SIGINATURE_OFFSET(%edi), %eax
|
movl FVH_SIGINATURE_OFFSET(%edi), %eax
|
||||||
cmp $FVH_SIGINATURE_VALID_VALUE, %eax
|
cmp $FVH_SIGINATURE_VALID_VALUE, %eax
|
||||||
@ -224,7 +227,7 @@ FspApiFailed:
|
|||||||
.align 0x10
|
.align 0x10
|
||||||
TempRamInitStack:
|
TempRamInitStack:
|
||||||
.long TempRamInitDone
|
.long TempRamInitDone
|
||||||
.long TempRamInitParams
|
.long ASM_PFX(TempRamInitParams)
|
||||||
|
|
||||||
#
|
#
|
||||||
# ROM-based Global-Descriptor Table for the Tiano PEI Phase
|
# ROM-based Global-Descriptor Table for the Tiano PEI Phase
|
||||||
@ -321,5 +324,5 @@ GdtDesc: # GDT descriptor
|
|||||||
|
|
||||||
ASM_PFX(ProtectedModeEntryLinearAddress):
|
ASM_PFX(ProtectedModeEntryLinearAddress):
|
||||||
ProtectedModeEntryLinearOffset:
|
ProtectedModeEntryLinearOffset:
|
||||||
.long ProtectedModeEntryPoint # Offset of our 32 bit code
|
.long ASM_PFX(ProtectedModeEntryPoint) # Offset of our 32 bit code
|
||||||
.word LINEAR_CODE_SEL
|
.word LINEAR_CODE_SEL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user