summaryrefslogtreecommitdiffstats
path: root/EmulatorPkg/Unix/Host
diff options
context:
space:
mode:
authorLiu, Zhiguang <Zhiguang.Liu@intel.com>2022-12-06 13:41:36 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-12-08 10:44:20 +0000
commit8a485e4bb8b5c5a800d6b3e1b8fa80fe27afb274 (patch)
treeb43a6e3d3f484b91e34d2c8f465489541ccc821c /EmulatorPkg/Unix/Host
parent2c284027b23ca63cc459411df9d1fcbfc47a5126 (diff)
downloadedk2-8a485e4bb8b5c5a800d6b3e1b8fa80fe27afb274.tar.gz
edk2-8a485e4bb8b5c5a800d6b3e1b8fa80fe27afb274.tar.bz2
edk2-8a485e4bb8b5c5a800d6b3e1b8fa80fe27afb274.zip
EmulatorPkg: Record Argc, Argv and Envp in EmuThunk Ppi
Record Argc, Argv and Envp in EmuThunk Ppi so that other modules can use these fields to change behavior depends on boot parameters or environment. Cc: Andrew Fish <afish@apple.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
Diffstat (limited to 'EmulatorPkg/Unix/Host')
-rw-r--r--EmulatorPkg/Unix/Host/Host.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/EmulatorPkg/Unix/Host/Host.c b/EmulatorPkg/Unix/Host/Host.c
index 8d0be5b54b..1f29dd00a3 100644
--- a/EmulatorPkg/Unix/Host/Host.c
+++ b/EmulatorPkg/Unix/Host/Host.c
@@ -145,6 +145,9 @@ main (
}
CopyMem (SecEmuThunkPpi, &mSecEmuThunkPpi, sizeof (EMU_THUNK_PPI));
+ SecEmuThunkPpi->Argc = Argc;
+ SecEmuThunkPpi->Argv = Argv;
+ SecEmuThunkPpi->Envp = Envp;
SecEmuThunkPpi->PersistentMemorySize = FixedPcdGet32 (PcdPersistentMemorySize);
AddThunkPpi (EFI_PEI_PPI_DESCRIPTOR_PPI, &gEmuThunkPpiGuid, SecEmuThunkPpi);