]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EmulatorPkg/Include/Ppi/EmuThunk.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / EmulatorPkg / Include / Ppi / EmuThunk.h
index 20cdc462f9cb2bcd588d8fc208a18cdcca8d87f7..c78ad692ed8ef1cd728ab663b2c0329564a08517 100644 (file)
@@ -2,14 +2,8 @@
   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
@@ -39,17 +31,16 @@ Returns:
 **/\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
@@ -65,14 +56,13 @@ Returns:
 **/\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
@@ -84,12 +74,10 @@ Returns:
 **/\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
@@ -108,20 +96,24 @@ Returns:
 **/\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