Subrata Banik | 20fe24b | 2021-12-09 02:46:38 +0530 | [diff] [blame] | 1 | /** @file |
| 2 | |
| 3 | Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR> |
| 4 | SPDX-License-Identifier: BSD-2-Clause-Patent |
| 5 | |
| 6 | **/ |
| 7 | |
| 8 | #ifndef _FSP_PLATFORM_LIB_H_ |
| 9 | #define _FSP_PLATFORM_LIB_H_ |
| 10 | |
| 11 | /** |
| 12 | Get system memory resource descriptor by owner. |
| 13 | |
| 14 | @param[in] OwnerGuid resource owner guid |
| 15 | **/ |
| 16 | EFI_HOB_RESOURCE_DESCRIPTOR * |
| 17 | EFIAPI |
| 18 | FspGetResourceDescriptorByOwner ( |
| 19 | IN EFI_GUID *OwnerGuid |
| 20 | ); |
| 21 | |
| 22 | /** |
| 23 | Get system memory from HOB. |
| 24 | |
| 25 | @param[in,out] LowMemoryLength less than 4G memory length |
| 26 | @param[in,out] HighMemoryLength greater than 4G memory length |
| 27 | **/ |
| 28 | VOID |
| 29 | EFIAPI |
| 30 | FspGetSystemMemorySize ( |
| 31 | IN OUT UINT64 *LowMemoryLength, |
| 32 | IN OUT UINT64 *HighMemoryLength |
| 33 | ); |
| 34 | |
| 35 | |
| 36 | /** |
| 37 | Set a new stack frame for the continuation function. |
| 38 | |
| 39 | **/ |
| 40 | VOID |
| 41 | EFIAPI |
| 42 | FspSetNewStackFrame ( |
| 43 | VOID |
| 44 | ); |
| 45 | |
| 46 | /** |
| 47 | This function transfer control back to BootLoader after FspSiliconInit. |
| 48 | |
| 49 | **/ |
| 50 | VOID |
| 51 | EFIAPI |
| 52 | FspSiliconInitDone ( |
| 53 | VOID |
| 54 | ); |
| 55 | |
| 56 | /** |
| 57 | This function returns control to BootLoader after MemoryInitApi. |
| 58 | |
| 59 | @param[in,out] HobListPtr The address of HobList pointer. |
| 60 | **/ |
| 61 | VOID |
| 62 | EFIAPI |
| 63 | FspMemoryInitDone ( |
| 64 | IN OUT VOID **HobListPtr |
| 65 | ); |
| 66 | |
| 67 | /** |
| 68 | This function returns control to BootLoader after TempRamExitApi. |
| 69 | |
| 70 | **/ |
| 71 | VOID |
| 72 | EFIAPI |
| 73 | FspTempRamExitDone ( |
| 74 | VOID |
| 75 | ); |
| 76 | |
| 77 | /** |
| 78 | This function handle NotifyPhase API call from the BootLoader. |
| 79 | It gives control back to the BootLoader after it is handled. If the |
| 80 | Notification code is a ReadyToBoot event, this function will return |
| 81 | and FSP continues the remaining execution until it reaches the DxeIpl. |
| 82 | |
| 83 | **/ |
| 84 | VOID |
| 85 | EFIAPI |
| 86 | FspWaitForNotify ( |
| 87 | VOID |
| 88 | ); |
| 89 | |
| 90 | /** |
| 91 | This function transfer control back to BootLoader after FspSiliconInit. |
| 92 | |
| 93 | @param[in] Status return status for the FspSiliconInit. |
| 94 | **/ |
| 95 | VOID |
| 96 | EFIAPI |
| 97 | FspSiliconInitDone2 ( |
| 98 | IN EFI_STATUS Status |
| 99 | ); |
| 100 | |
| 101 | /** |
| 102 | This function returns control to BootLoader after MemoryInitApi. |
| 103 | |
| 104 | @param[in] Status return status for the MemoryInitApi. |
| 105 | @param[in,out] HobListPtr The address of HobList pointer. |
| 106 | **/ |
| 107 | VOID |
| 108 | EFIAPI |
| 109 | FspMemoryInitDone2 ( |
| 110 | IN EFI_STATUS Status, |
| 111 | IN OUT VOID **HobListPtr |
| 112 | ); |
| 113 | |
| 114 | /** |
| 115 | This function returns control to BootLoader after TempRamExitApi. |
| 116 | |
| 117 | @param[in] Status return status for the TempRamExitApi. |
| 118 | **/ |
| 119 | VOID |
| 120 | EFIAPI |
| 121 | FspTempRamExitDone2 ( |
| 122 | IN EFI_STATUS Status |
| 123 | ); |
| 124 | |
| 125 | #endif |