Changeset 77662 in vbox for trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFspWrapperPkg
- Timestamp:
- Mar 12, 2019 12:40:12 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 129295
- Location:
- trunk/src/VBox/Devices/EFI/FirmwareNew
- Files:
-
- 1 deleted
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/FirmwareNew
-
Property svn:mergeinfo
changed from (toggle deleted branches)
to (toggle deleted branches)/vendor/edk2/current 103735-103757,103769-103776 /vendor/edk2/current 103735-103757,103769-103776,129194-129237
-
Property svn:mergeinfo
changed from (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFspWrapperPkg/FspInitPei/FindPeiCore.c
r58464 r77662 147 147 Find and return Pei Core entry point. 148 148 149 It also find SEC and PEI Core file debug infor amtion. It will report them if149 It also find SEC and PEI Core file debug information. It will report them if 150 150 remote debug is enabled. 151 151 -
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFspWrapperPkg/FspInitPei/SecMain.c
r58464 r77662 62 62 63 63 @param[in] SizeOfRam Size of the temporary memory available for use. 64 @param[in] TempRamBase Base address of tempor y ram64 @param[in] TempRamBase Base address of temporary ram 65 65 @param[in] BootFirmwareVolume Base address of the Boot Firmware Volume. 66 66 **/ -
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFspWrapperPkg/FspInitPei/SecMain.h
r58464 r77662 55 55 56 56 @param[in] SizeOfRam Size of the temporary memory available for use. 57 @param[in] TempRamBase Base address of tempor y ram57 @param[in] TempRamBase Base address of temporary ram 58 58 @param[in] BootFirmwareVolume Base address of the Boot Firmware Volume. 59 59 **/ … … 69 69 Find and return Pei Core entry point. 70 70 71 It also find SEC and PEI Core file debug infor amtion. It will report them if71 It also find SEC and PEI Core file debug information. It will report them if 72 72 remote debug is enabled. 73 73 -
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFspWrapperPkg/FspNotifyDxe/LoadBelow4G.c
r58464 r77662 1 1 /** @file 2 2 3 Copyright (c) 2015 , Intel Corporation. All rights reserved.<BR>3 Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR> 4 4 5 5 This program and the accompanying materials … … 113 113 ImageContext.ImageAddress = (PHYSICAL_ADDRESS)(UINTN)FfsBuffer; 114 114 // 115 // Align buffer on section bound ry115 // Align buffer on section boundary 116 116 // 117 117 ImageContext.ImageAddress += ImageContext.SectionAlignment - 1; 118 ImageContext.ImageAddress &= ~((EFI_PHYSICAL_ADDRESS) (ImageContext.SectionAlignment - 1));118 ImageContext.ImageAddress &= ~((EFI_PHYSICAL_ADDRESS)ImageContext.SectionAlignment - 1); 119 119 // 120 120 // Load the image to our new buffer -
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFspWrapperPkg/FspWrapperSecCore/FindPeiCore.c
r58464 r77662 147 147 Find and return Pei Core entry point. 148 148 149 It also find SEC and PEI Core file debug infor amtion. It will report them if149 It also find SEC and PEI Core file debug information. It will report them if 150 150 remote debug is enabled. 151 151 -
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFspWrapperPkg/FspWrapperSecCore/SecMain.c
r58464 r77662 53 53 54 54 @param[in] SizeOfRam Size of the temporary memory available for use. 55 @param[in] TempRamBase Base address of tempor y ram55 @param[in] TempRamBase Base address of temporary ram 56 56 @param[in] BootFirmwareVolume Base address of the Boot Firmware Volume. 57 57 **/ -
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFspWrapperPkg/FspWrapperSecCore/SecMain.h
r58464 r77662 54 54 55 55 @param[in] SizeOfRam Size of the temporary memory available for use. 56 @param[in] TempRamBase Base address of tempor y ram56 @param[in] TempRamBase Base address of temporary ram 57 57 @param[in] BootFirmwareVolume Base address of the Boot Firmware Volume. 58 58 **/ … … 68 68 Find and return Pei Core entry point. 69 69 70 It also find SEC and PEI Core file debug infor amtion. It will report them if70 It also find SEC and PEI Core file debug information. It will report them if 71 71 remote debug is enabled. 72 72 -
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFspWrapperPkg/IntelFspWrapperPkg.dsc
r58466 r77662 2 2 # Provides drivers and definitions to support fsp in EDKII bios. 3 3 # 4 # Copyright (c) 2014 - 201 5, Intel Corporation. All rights reserved.<BR>4 # Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR> 5 5 # This program and the accompanying materials are licensed and made available under 6 6 # the terms and conditions of the BSD License that accompanies this distribution. … … 20 20 OUTPUT_DIRECTORY = Build/IntelFspWrapperPkg 21 21 SUPPORTED_ARCHITECTURES = IA32|X64 22 BUILD_TARGETS = DEBUG|RELEASE 22 BUILD_TARGETS = DEBUG|RELEASE|NOOPT 23 23 SKUID_IDENTIFIER = DEFAULT 24 24 … … 84 84 gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80080046 85 85 gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07 86 87 [BuildOptions] 88 *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES -
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFspWrapperPkg/Library/BaseFspApiLib/FspApiLib.c
r58464 r77662 2 2 Provide FSP API related function. 3 3 4 Copyright (c) 2014 - 201 5, Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials 6 6 are licensed and made available under the terms and conditions of the BSD License … … 99 99 BOOLEAN InterruptState; 100 100 101 FspInitApi = (FSP_INIT)( UINTN)(FspHeader->ImageBase + FspHeader->FspInitEntryOffset);101 FspInitApi = (FSP_INIT)((UINTN)FspHeader->ImageBase + FspHeader->FspInitEntryOffset); 102 102 InterruptState = SaveAndDisableInterrupts (); 103 103 Status = Execute32BitCode ((UINTN)FspInitApi, (UINTN)FspInitParams); … … 126 126 BOOLEAN InterruptState; 127 127 128 NotifyPhaseApi = (FSP_NOTIFY_PHASE)( UINTN)(FspHeader->ImageBase + FspHeader->NotifyPhaseEntryOffset);128 NotifyPhaseApi = (FSP_NOTIFY_PHASE)((UINTN)FspHeader->ImageBase + FspHeader->NotifyPhaseEntryOffset); 129 129 InterruptState = SaveAndDisableInterrupts (); 130 130 Status = Execute32BitCode ((UINTN)NotifyPhaseApi, (UINTN)NotifyPhaseParams); … … 153 153 BOOLEAN InterruptState; 154 154 155 FspMemoryInitApi = (FSP_MEMORY_INIT)( UINTN)(FspHeader->ImageBase + FspHeader->FspMemoryInitEntryOffset);155 FspMemoryInitApi = (FSP_MEMORY_INIT)((UINTN)FspHeader->ImageBase + FspHeader->FspMemoryInitEntryOffset); 156 156 InterruptState = SaveAndDisableInterrupts (); 157 157 Status = Execute32BitCode ((UINTN)FspMemoryInitApi, (UINTN)FspMemoryInitParams); … … 180 180 BOOLEAN InterruptState; 181 181 182 TempRamExitApi = (FSP_TEMP_RAM_EXIT)( UINTN)(FspHeader->ImageBase + FspHeader->TempRamExitEntryOffset);182 TempRamExitApi = (FSP_TEMP_RAM_EXIT)((UINTN)FspHeader->ImageBase + FspHeader->TempRamExitEntryOffset); 183 183 InterruptState = SaveAndDisableInterrupts (); 184 184 Status = Execute32BitCode ((UINTN)TempRamExitApi, (UINTN)TempRamExitParam); … … 207 207 BOOLEAN InterruptState; 208 208 209 FspSiliconInitApi = (FSP_SILICON_INIT)( UINTN)(FspHeader->ImageBase + FspHeader->FspSiliconInitEntryOffset);209 FspSiliconInitApi = (FSP_SILICON_INIT)((UINTN)FspHeader->ImageBase + FspHeader->FspSiliconInitEntryOffset); 210 210 InterruptState = SaveAndDisableInterrupts (); 211 211 Status = Execute32BitCode ((UINTN)FspSiliconInitApi, (UINTN)FspSiliconInitParam); -
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFspWrapperPkg/Library/BaseFspApiLib/X64/DispatchExecute.c
r58464 r77662 90 90 ) 91 91 { 92 return AsmExecute32BitCode (Function, Param1, 0, &mGdt); 92 EFI_STATUS Status; 93 IA32_DESCRIPTOR Idtr; 94 95 // 96 // Idtr might be changed inside of FSP. 32bit FSP only knows the <4G address. 97 // If IDTR.Base is >4G, FSP can not handle. So we need save/restore IDTR here for X64 only. 98 // Interrupt is already disabled here, so it is safety to update IDTR. 99 // 100 AsmReadIdtr (&Idtr); 101 Status = AsmExecute32BitCode (Function, Param1, 0, &mGdt); 102 AsmWriteIdtr (&Idtr); 103 104 return Status; 93 105 } 94 106 -
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFspWrapperPkg/Library/PeiFspHobProcessLibSample/FspHobProcessLibSample.c
r58464 r77662 26 26 #include <Guid/GuidHobFspEas.h> 27 27 #include <Guid/MemoryTypeInformation.h> 28 #include <Guid/PcdDataBaseHobGuid.h> 28 29 #include <Ppi/Capsule.h> 29 30 … … 46 47 ) 47 48 { 48 EFI_STATUS Status;49 49 EFI_PEI_HOB_POINTERS Hob; 50 50 EFI_MEMORY_TYPE_INFORMATION *MemoryData; … … 53 53 54 54 MemoryData = NULL; 55 Status =(*PeiServices)->GetHobList ((CONST EFI_PEI_SERVICES**)PeiServices, (VOID **) &Hob.Raw);55 (*PeiServices)->GetHobList ((CONST EFI_PEI_SERVICES**)PeiServices, (VOID **) &Hob.Raw); 56 56 while (!END_OF_HOB_LIST (Hob)) { 57 57 if (Hob.Header->HobType == EFI_HOB_TYPE_GUID_EXTENSION && … … 156 156 EFI_STATUS Status; 157 157 EFI_BOOT_MODE BootMode; 158 PEI_CAPSULE_PPI*Capsule;158 EFI_PEI_CAPSULE_PPI *Capsule; 159 159 VOID *CapsuleBuffer; 160 160 UINTN CapsuleBufferLength; … … 247 247 S3PeiMemBase = 0; 248 248 S3PeiMemSize = 0; 249 Status = GetS3MemoryInfo (&S3PeiMem Base, &S3PeiMemSize);249 Status = GetS3MemoryInfo (&S3PeiMemSize, &S3PeiMemBase); 250 250 ASSERT_EFI_ERROR (Status); 251 251 DEBUG((DEBUG_INFO, "S3 memory %Xh - %Xh bytes\n", S3PeiMemBase, S3PeiMemSize)); … … 272 272 if (BootMode == BOOT_ON_FLASH_UPDATE) { 273 273 Status = PeiServicesLocatePpi ( 274 &g PeiCapsulePpiGuid,274 &gEfiPeiCapsulePpiGuid, 275 275 0, 276 276 NULL, … … 336 336 337 337 /** 338 Process FSP HOB list 339 340 @param[in] FspHobList Pointer to the HOB data structure produced by FSP. 341 342 **/ 343 VOID 344 ProcessFspHobList ( 345 IN VOID *FspHobList 346 ) 347 { 348 EFI_PEI_HOB_POINTERS FspHob; 349 350 FspHob.Raw = FspHobList; 351 352 // 353 // Add all the HOBs from FSP binary to FSP wrapper 354 // 355 while (!END_OF_HOB_LIST (FspHob)) { 356 if (FspHob.Header->HobType == EFI_HOB_TYPE_GUID_EXTENSION) { 357 // 358 // Skip FSP binary creates PcdDataBaseHobGuid 359 // 360 if (!CompareGuid(&FspHob.Guid->Name, &gPcdDataBaseHobGuid)) { 361 BuildGuidDataHob ( 362 &FspHob.Guid->Name, 363 GET_GUID_HOB_DATA(FspHob), 364 GET_GUID_HOB_DATA_SIZE(FspHob) 365 ); 366 } 367 } 368 FspHob.Raw = GET_NEXT_HOB (FspHob); 369 } 370 } 371 372 /** 338 373 BIOS process FspBobList for other data (not Memory Resource Descriptor). 339 374 … … 348 383 ) 349 384 { 385 ProcessFspHobList (FspHobList); 386 350 387 return EFI_SUCCESS; 351 388 } -
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFspWrapperPkg/Library/PeiFspHobProcessLibSample/PeiFspHobProcessLibSample.inf
r58464 r77662 71 71 gFspReservedMemoryResourceHobGuid ## CONSUMES ## HOB 72 72 gEfiMemoryTypeInformationGuid ## CONSUMES ## GUID 73 gPcdDataBaseHobGuid ## CONSUMES ## HOB 73 74 74 75 [Ppis] 75 g PeiCapsulePpiGuid## CONSUMES76 gEfiPeiCapsulePpiGuid ## CONSUMES -
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFspWrapperPkg/Library/SecPeiFspPlatformSecLibSample/Ia32/SecEntry.S
r58464 r77662 211 211 212 212 TempRamInitDone: 213 cmp $0x8000000E, %eax #Check if EFI_NOT_FOUND returned. Error code for Microcode Update not found. 214 je CallSecFspInit #If microcode not found, don't hang, but continue. 215 213 216 cmp $0x0, %eax 214 217 jnz FspApiFailed … … 216 219 # ECX: start of range 217 220 # EDX: end of range 221 CallSecFspInit: 222 xorl %eax, %eax 218 223 movl %edx, %esp 224 225 # Align the stack at DWORD 226 addl $3, %esp 227 andl $0xFFFFFFFC, %esp 228 219 229 pushl %edx 220 230 pushl %ecx -
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFspWrapperPkg/Library/SecPeiFspPlatformSecLibSample/Ia32/SecEntry.asm
r58464 r77662 221 221 222 222 TempRamInitDone: 223 cmp eax, 0 223 cmp eax, 8000000Eh ;Check if EFI_NOT_FOUND returned. Error code for Microcode Update not found. 224 je CallSecFspInit ;If microcode not found, don't hang, but continue. 225 226 cmp eax, 0 ;Check if EFI_SUCCESS retuned. 224 227 jnz FspApiFailed 225 228 226 229 ; ECX: start of range 227 230 ; EDX: end of range 231 CallSecFspInit: 232 xor eax, eax 228 233 mov esp, edx 234 235 ; Align the stack at DWORD 236 add esp, 3 237 and esp, 0FFFFFFFCh 238 229 239 push edx 230 240 push ecx -
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFspWrapperPkg/Library/SecPeiFspPlatformSecLibSample/SecTempRamSupport.c
r58464 r77662 140 140 // 141 141 // SecSwitchStack function must be invoked after the memory migration 142 // immediat ly, also we need fixup the stack change caused by new call into143 // perm enent memory.142 // immediately, also we need fixup the stack change caused by new call into 143 // permanent memory. 144 144 // 145 145 SecSwitchStack (
Note:
See TracChangeset
for help on using the changeset viewer.