diff options
author | Guo Mang <mang.guo@intel.com> | 2016-08-03 13:32:16 +0800 |
---|---|---|
committer | Guo Mang <mang.guo@intel.com> | 2016-08-04 10:30:16 +0800 |
commit | 6c4214e6890ab7f1adc8a8c43b74dcba88a673e5 (patch) | |
tree | 226d680d610327e097adecac4c1795e6a40ed9f1 /BraswellPlatformPkg/Common | |
parent | 2c85c3eefbcd21b02e73bf2054ecfcdcbcbe1f01 (diff) | |
download | edk2-platforms-6c4214e6890ab7f1adc8a8c43b74dcba88a673e5.tar.xz |
BraswellPlatformPkg: Restructure code in Common/FspSupport directory
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Guo Mang <mang.guo@intel.com>
Reviewed-by: David Wei <david.wei@intel.com>
Diffstat (limited to 'BraswellPlatformPkg/Common')
10 files changed, 40 insertions, 33 deletions
diff --git a/BraswellPlatformPkg/Common/FspSupport/GraphicsOutputDxe/ComponentName.c b/BraswellPlatformPkg/Common/FspSupport/GraphicsOutputDxe/ComponentName.c index 54864b51f6..3826fb13ee 100644 --- a/BraswellPlatformPkg/Common/FspSupport/GraphicsOutputDxe/ComponentName.c +++ b/BraswellPlatformPkg/Common/FspSupport/GraphicsOutputDxe/ComponentName.c @@ -188,3 +188,4 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL mGraphicsOutputCompon (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) GraphicsOutputComponentNameGetControllerName,
"en"
};
+
diff --git a/BraswellPlatformPkg/Common/FspSupport/GraphicsOutputDxe/GraphicsOutput.c b/BraswellPlatformPkg/Common/FspSupport/GraphicsOutputDxe/GraphicsOutput.c index eccd973ccf..2e8f812659 100644 --- a/BraswellPlatformPkg/Common/FspSupport/GraphicsOutputDxe/GraphicsOutput.c +++ b/BraswellPlatformPkg/Common/FspSupport/GraphicsOutputDxe/GraphicsOutput.c @@ -662,3 +662,4 @@ InitializeGraphicsOutput ( return Status;
}
+
diff --git a/BraswellPlatformPkg/Common/FspSupport/GraphicsOutputDxe/GraphicsOutput.h b/BraswellPlatformPkg/Common/FspSupport/GraphicsOutputDxe/GraphicsOutput.h index 48c486418d..83544c45be 100644 --- a/BraswellPlatformPkg/Common/FspSupport/GraphicsOutputDxe/GraphicsOutput.h +++ b/BraswellPlatformPkg/Common/FspSupport/GraphicsOutputDxe/GraphicsOutput.h @@ -50,3 +50,4 @@ typedef struct { extern EFI_COMPONENT_NAME_PROTOCOL mGraphicsOutputComponentName;
extern EFI_COMPONENT_NAME2_PROTOCOL mGraphicsOutputComponentName2;
#endif
+
diff --git a/BraswellPlatformPkg/Common/FspSupport/GraphicsOutputDxe/GraphicsOutputDxe.inf b/BraswellPlatformPkg/Common/FspSupport/GraphicsOutputDxe/GraphicsOutputDxe.inf index c7c0435ec4..a0da4cfb73 100644 --- a/BraswellPlatformPkg/Common/FspSupport/GraphicsOutputDxe/GraphicsOutputDxe.inf +++ b/BraswellPlatformPkg/Common/FspSupport/GraphicsOutputDxe/GraphicsOutputDxe.inf @@ -56,3 +56,4 @@ gEfiGraphicsOutputProtocolGuid # PROTOCOL BY_START
gEfiDevicePathProtocolGuid # PROTOCOL BY_START
gEfiPciIoProtocolGuid # PROTOCOL TO_START
+
diff --git a/BraswellPlatformPkg/Common/FspSupport/Library/FrameBufferBltLib/FrameBufferBltLib.c b/BraswellPlatformPkg/Common/FspSupport/Library/FrameBufferBltLib/FrameBufferBltLib.c index 6f2cff6e81..74caa21663 100644 --- a/BraswellPlatformPkg/Common/FspSupport/Library/FrameBufferBltLib/FrameBufferBltLib.c +++ b/BraswellPlatformPkg/Common/FspSupport/Library/FrameBufferBltLib/FrameBufferBltLib.c @@ -570,3 +570,4 @@ BltVideoToVideo ( return EFI_SUCCESS;
}
+
diff --git a/BraswellPlatformPkg/Common/FspSupport/Library/BaseFspPlatformInfoLibSample/FspPlatformInfoLibSample.c b/BraswellPlatformPkg/Common/FspSupport/Library/FspPlatformInfoLib/FspPlatformInfoLib.c index 6b436bb2b3..60c8e9e2fc 100644 --- a/BraswellPlatformPkg/Common/FspSupport/Library/BaseFspPlatformInfoLibSample/FspPlatformInfoLibSample.c +++ b/BraswellPlatformPkg/Common/FspSupport/Library/FspPlatformInfoLib/FspPlatformInfoLib.c @@ -131,11 +131,11 @@ UpdateSilicionInitUpd ( PlatformInfo = PcdGetPtr (PcdPlatformInfo);
if (*((UINT32 *)PcdGetPtr (PcdCustomizedVbtFile)) == SIGNATURE_32 ('$', 'V', 'B', 'T')) {
- // It is a valid VBT Table
- VbtAddress = (EFI_PHYSICAL_ADDRESS) (UINTN)PcdGetPtr (PcdCustomizedVbtFile);
+ // It is a valid VBT Table
+ VbtAddress = (EFI_PHYSICAL_ADDRESS) (UINTN)PcdGetPtr (PcdCustomizedVbtFile);
} else {
- Status = FindVbt (PcdGetPtr (PcdBmpImageGuid), &VbtAddress);
- ASSERT_EFI_ERROR (Status);
+ Status = FindVbt (PcdGetPtr (PcdBmpImageGuid), &VbtAddress);
+ ASSERT_EFI_ERROR (Status);
}
//
@@ -347,27 +347,27 @@ GetNvsBuffer ( VariableSize = 0;
MrcData = NULL;
- //
- // TODO: Will remove this hardcode address.
- //
- VariableSize = 0x6C58;
+ //
+ // TODO: Will remove this hardcode address.
+ //
+ VariableSize = 0x6C58;
- DEBUG((EFI_D_INFO, "VarSize=0x%x.\n", VariableSize));
+ DEBUG((EFI_D_INFO, "VarSize=0x%x.\n", VariableSize));
- //
- // Get the MRC Parameters from SPI Flash. This function return the address of this variable in SPI Flash.
- //
- Status = PeiGetVariable (
- EfiMemoryConfigVariable,
- &gEfiChvVariableGuid,
- NULL,
- &VariableSize,
- &MrcData
- );
- DEBUG((EFI_D_INFO, "Get MRC data from SPI Flash at 0x0x%=. \n", (UINT32)MrcData));
-
- if (EFI_ERROR(Status))
- MrcData = NULL;
+ //
+ // Get the MRC Parameters from SPI Flash. This function return the address of this variable in SPI Flash.
+ //
+ Status = PeiGetVariable (
+ EfiMemoryConfigVariable,
+ &gEfiChvVariableGuid,
+ NULL,
+ &VariableSize,
+ &MrcData
+ );
+ DEBUG((EFI_D_INFO, "Get MRC data from SPI Flash at 0x0x%=. \n", (UINT32)MrcData));
+
+ if (EFI_ERROR(Status))
+ MrcData = NULL;
return MrcData;
}
@@ -589,3 +589,4 @@ GetStackInfo ( return EFI_SUCCESS;
}
+
diff --git a/BraswellPlatformPkg/Common/FspSupport/Library/BaseFspPlatformInfoLibSample/BaseFspPlatformInfoLibSample.inf b/BraswellPlatformPkg/Common/FspSupport/Library/FspPlatformInfoLib/FspPlatformInfoLib.inf index a6e8103fa1..1f60657ad5 100644 --- a/BraswellPlatformPkg/Common/FspSupport/Library/BaseFspPlatformInfoLibSample/BaseFspPlatformInfoLibSample.inf +++ b/BraswellPlatformPkg/Common/FspSupport/Library/FspPlatformInfoLib/FspPlatformInfoLib.inf @@ -20,7 +20,7 @@ ################################################################################
[Defines]
INF_VERSION = 0x00010005
- BASE_NAME = BaseFspPlatformInfoLibSample
+ BASE_NAME = FspPlatformInfoLib
FILE_GUID = 7CB6D6ED-5012-4e35-A42E-4C6512085A9E
MODULE_TYPE = SEC
VERSION_STRING = 1.0
@@ -40,7 +40,7 @@ ################################################################################
[Sources]
- FspPlatformInfoLibSample.c
+ FspPlatformInfoLib.c
MemoryMappedVariable.c
@@ -61,6 +61,7 @@ ChvRefCodePkg/ChvRefCodePkg.dec
ChvFspBinPkg/ChvFspBinPkg.dec
SecurityPkg/SecurityPkg.dec
+ BraswellPlatformPkg/Common/Silicon/IntelSiliconBasic/IntelSiliconBasic.dec
[LibraryClasses]
BaseLib
diff --git a/BraswellPlatformPkg/Common/FspSupport/Library/BaseFspPlatformInfoLibSample/MemoryMappedVariable.c b/BraswellPlatformPkg/Common/FspSupport/Library/FspPlatformInfoLib/MemoryMappedVariable.c index dc142e003b..4ff7c078e4 100644 --- a/BraswellPlatformPkg/Common/FspSupport/Library/BaseFspPlatformInfoLibSample/MemoryMappedVariable.c +++ b/BraswellPlatformPkg/Common/FspSupport/Library/FspPlatformInfoLib/MemoryMappedVariable.c @@ -1130,3 +1130,4 @@ PeiGetNextVariableName ( }
}
}
+
diff --git a/BraswellPlatformPkg/Common/FspSupport/Library/BaseFspPlatformInfoLibSample/MemoryMappedVariable.h b/BraswellPlatformPkg/Common/FspSupport/Library/FspPlatformInfoLib/MemoryMappedVariable.h index 23eada6473..69b3d312c7 100644 --- a/BraswellPlatformPkg/Common/FspSupport/Library/BaseFspPlatformInfoLibSample/MemoryMappedVariable.h +++ b/BraswellPlatformPkg/Common/FspSupport/Library/FspPlatformInfoLib/MemoryMappedVariable.h @@ -146,3 +146,4 @@ PeiGetNextVariableName ( );
#endif
+
diff --git a/BraswellPlatformPkg/Common/FspSupport/Library/PeiFspHobProcessLib/FspHobProcessLib.c b/BraswellPlatformPkg/Common/FspSupport/Library/PeiFspHobProcessLib/FspHobProcessLib.c index 8fb53c526d..f0605702bc 100644 --- a/BraswellPlatformPkg/Common/FspSupport/Library/PeiFspHobProcessLib/FspHobProcessLib.c +++ b/BraswellPlatformPkg/Common/FspSupport/Library/PeiFspHobProcessLib/FspHobProcessLib.c @@ -1,7 +1,7 @@ /** @file
Null instance of Platform Sec Lib.
- Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -270,8 +270,8 @@ FspHobProcessForMemoryResource ( if ((Hob.ResourceDescriptor->ResourceType == EFI_RESOURCE_SYSTEM_MEMORY) ||
(Hob.ResourceDescriptor->ResourceType == EFI_RESOURCE_MEMORY_RESERVED)) {
DEBUG((DEBUG_INFO, "ResourceAttribute: 0x%x\n", Hob.ResourceDescriptor->ResourceAttribute));
- DEBUG((DEBUG_INFO, "PhysicalStart: 0x%lx\n", Hob.ResourceDescriptor->PhysicalStart));
- DEBUG((DEBUG_INFO, "ResourceLength: 0x%lx\n", Hob.ResourceDescriptor->ResourceLength));
+ DEBUG((DEBUG_INFO, "PhysicalStart: 0x%x\n", Hob.ResourceDescriptor->PhysicalStart));
+ DEBUG((DEBUG_INFO, "ResourceLength: 0x%x\n", Hob.ResourceDescriptor->ResourceLength));
DEBUG((DEBUG_INFO, "Owner: %g\n\n", &Hob.ResourceDescriptor->Owner));
}
@@ -334,9 +334,7 @@ FspHobProcessForMemoryResource ( while ((Hob.Raw = GetNextHob (EFI_HOB_TYPE_RESOURCE_DESCRIPTOR, Hob.Raw)) != NULL) {
if (Hob.ResourceDescriptor->ResourceType == EFI_RESOURCE_SYSTEM_MEMORY
- && (Hob.ResourceDescriptor->PhysicalStart >= BASE_1MB)
- && (Hob.ResourceDescriptor->PhysicalStart + Hob.ResourceDescriptor->ResourceLength <= BASE_4GB)
- ) {
+ && (Hob.ResourceDescriptor->PhysicalStart >= BASE_1MB)) {
if (PeiMemoryHob.ResourceDescriptor != Hob.ResourceDescriptor) {
if (Hob.ResourceDescriptor->ResourceLength > CapsuleBufferLength) {
CapsuleBuffer = (VOID *) ((UINTN) Hob.ResourceDescriptor->PhysicalStart);
@@ -375,8 +373,7 @@ FspHobProcessForMemoryResource ( ASSERT_EFI_ERROR (Status);
if (BootMode == BOOT_ON_FLASH_UPDATE && Capsule != NULL) {
- Status = Capsule->CreateState ((EFI_PEI_SERVICES **)PeiServices, CapsuleBuffer, CapsuleBufferLength);
- DEBUG((EFI_D_INFO, "Capsule CreateState :%d\n", Status));
+ Capsule->CreateState ((EFI_PEI_SERVICES **)PeiServices, CapsuleBuffer, CapsuleBufferLength);
}
return EFI_SUCCESS;
@@ -526,3 +523,4 @@ FspHobProcess ( return Status;
}
+
|