Changeset 108794 in vbox for trunk/src/VBox/Devices/EFI/FirmwareNew/UefiPayloadPkg/PayloadLoaderPeim/PayloadLoaderPeim.c
- Timestamp:
- Mar 31, 2025 11:31:09 AM (2 weeks ago)
- svn:sync-xref-src-repo-rev:
- 168237
- Location:
- trunk/src/VBox/Devices/EFI/FirmwareNew
- Files:
-
- 2 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,129194-164365 /vendor/edk2/current 103735-103757,103769-103776,129194-168232
-
Property svn:mergeinfo
changed from (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/FirmwareNew/UefiPayloadPkg/PayloadLoaderPeim/PayloadLoaderPeim.c
r99404 r108794 18 18 #include <Library/MemoryAllocationLib.h> 19 19 #include <Library/BaseMemoryLib.h> 20 20 #include <Guid/UniversalPayloadBase.h> 21 21 #include "ElfLib.h" 22 23 CONST EFI_PEI_PPI_DESCRIPTOR gReadyToPayloadSignalPpi = { 24 (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST), 25 &gUplReadyToPayloadPpiGuid, 26 NULL 27 }; 28 29 /** 30 Notify ReadyToPayLoad signal. 31 @param[in] PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation. 32 @param[in] NotifyDescriptor Address of the notification descriptor data structure. 33 @param[in] Ppi Address of the PPI that was installed. 34 @retval EFI_SUCCESS Hobs data is discovered. 35 @return Others No Hobs data is discovered. 36 **/ 37 EFI_STATUS 38 EFIAPI 39 EndOfPeiPpiNotifyCallback ( 40 IN EFI_PEI_SERVICES **PeiServices, 41 IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor, 42 IN VOID *Ppi 43 ) 44 { 45 EFI_STATUS Status; 46 47 // 48 // Ready to Payload phase signal 49 // 50 Status = PeiServicesInstallPpi (&gReadyToPayloadSignalPpi); 51 52 return Status; 53 } 54 55 EFI_PEI_NOTIFY_DESCRIPTOR mEndOfPeiNotifyList[] = { 56 { 57 (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST), 58 &gEfiEndOfPeiSignalPpiGuid, 59 EndOfPeiPpiNotifyCallback 60 } 61 }; 22 62 23 63 /** … … 48 88 VOID *Elf; 49 89 UNIVERSAL_PAYLOAD_EXTRA_DATA *ExtraData; 90 UNIVERSAL_PAYLOAD_BASE *PayloadBase; 50 91 ELF_IMAGE_CONTEXT Context; 51 92 UINT32 Index; … … 74 115 } while (EFI_ERROR (Status)); 75 116 76 DEBUG (( 77 DEBUG_INFO, 78 "Payload File Size: 0x%08X, Mem Size: 0x%08x, Reload: %d\n", 79 Context.FileSize, 80 Context.ImageSize, 81 Context.ReloadRequired 82 )); 117 Length = sizeof (UNIVERSAL_PAYLOAD_BASE); 118 PayloadBase = BuildGuidHob ( 119 &gUniversalPayloadBaseGuid, 120 Length 121 ); 122 PayloadBase->Entry = (EFI_PHYSICAL_ADDRESS)Context.FileBase; 123 124 DEBUG ( 125 ( 126 DEBUG_INFO, 127 "Payload File Size: 0x%08X, Mem Size: 0x%08x, Reload: %d\n", 128 Context.FileSize, 129 Context.ImageSize, 130 Context.ReloadRequired 131 ) 132 ); 83 133 84 134 // … … 154 204 } 155 205 206 DEBUG ((DEBUG_INFO, "LoadElfImage :%r, EntryPoint :%x\n", Status, (UINTN)Context.EntryPoint)); 207 208 Status = PeiServicesNotifyPpi (&mEndOfPeiNotifyList[0]); 209 ASSERT_EFI_ERROR (Status); 210 156 211 return Status; 157 212 } … … 174 229 @param PeiServices Describes the list of possible PEI Services. 175 230 176 @retval EFI_SUC ESSThe entry point executes successfully.231 @retval EFI_SUCCESS The entry point executes successfully. 177 232 @retval Others Some error occurs during the execution of this function. 178 233
Note:
See TracChangeset
for help on using the changeset viewer.