Emulator Thunk to abstract OS services from pure EFI code\r
\r
Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR>\r
- \r
- This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+ Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
\r
#define EMU_THUNK_PPI_GUID \\r
{ 0xB958B78C, 0x1D3E, 0xEE40, { 0x8B, 0xF4, 0xF0, 0x63, 0x2D, 0x06, 0x39, 0x16 } }\r
\r
-\r
-\r
/*++\r
\r
Routine Description:\r
This service is called from Index == 0 until it returns EFI_UNSUPPORTED.\r
- It allows discontiguous memory regions to be supported by the emulator.\r
+ It allows discontinuous memory regions to be supported by the emulator.\r
\r
Arguments:\r
Index - Which memory region to use\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *EMU_PEI_AUTOSCAN) (\r
+(EFIAPI *EMU_PEI_AUTOSCAN)(\r
IN UINTN Index,\r
OUT EFI_PHYSICAL_ADDRESS *MemoryBase,\r
OUT UINT64 *MemorySize\r
);\r
\r
-\r
/*++\r
\r
Routine Description:\r
- Return the FD Size and base address. Since the FD is loaded from a \r
+ Return the FD Size and base address. Since the FD is loaded from a\r
file into host memory only the SEC will know it's address.\r
\r
Arguments:\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *EMU_PEI_FD_INFORMATION) (\r
+(EFIAPI *EMU_PEI_FD_INFORMATION)(\r
IN UINTN Index,\r
IN OUT EFI_PHYSICAL_ADDRESS *FdBase,\r
IN OUT UINT64 *FdSize,\r
IN OUT EFI_PHYSICAL_ADDRESS *FixUp\r
);\r
\r
-\r
/*++\r
\r
Routine Description:\r
**/\r
typedef\r
VOID *\r
-(EFIAPI *EMU_PEI_THUNK_INTERFACE) (\r
+(EFIAPI *EMU_PEI_THUNK_INTERFACE)(\r
VOID\r
);\r
\r
-\r
-\r
/*++\r
\r
Routine Description:\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *EMU_PEI_LOAD_FILE) (\r
+(EFIAPI *EMU_PEI_LOAD_FILE)(\r
VOID *Pe32Data,\r
EFI_PHYSICAL_ADDRESS *ImageAddress,\r
UINT64 *ImageSize,\r
EFI_PHYSICAL_ADDRESS *EntryPoint\r
);\r
\r
-\r
typedef struct {\r
- EMU_PEI_AUTOSCAN MemoryAutoScan;\r
- EMU_PEI_FD_INFORMATION FirmwareDevices;\r
- EMU_PEI_THUNK_INTERFACE Thunk;\r
+ EMU_PEI_AUTOSCAN MemoryAutoScan;\r
+ EMU_PEI_FD_INFORMATION FirmwareDevices;\r
+ EMU_PEI_THUNK_INTERFACE Thunk;\r
+ INTN Argc;\r
+ CHAR8 **Argv;\r
+ CHAR8 **Envp;\r
+ UINTN PersistentMemorySize;\r
+ UINT8 PersistentMemory[0];\r
} EMU_THUNK_PPI;\r
\r
-extern EFI_GUID gEmuThunkPpiGuid;\r
+extern EFI_GUID gEmuThunkPpiGuid;\r
\r
#endif\r