mirror of https://github.com/acidanthera/audk.git
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>
This commit is contained in:
parent
2c284027b2
commit
8a485e4bb8
|
@ -107,6 +107,9 @@ typedef struct {
|
|||
EMU_PEI_AUTOSCAN MemoryAutoScan;
|
||||
EMU_PEI_FD_INFORMATION FirmwareDevices;
|
||||
EMU_PEI_THUNK_INTERFACE Thunk;
|
||||
INTN Argc;
|
||||
CHAR8 **Argv;
|
||||
CHAR8 **Envp;
|
||||
UINTN PersistentMemorySize;
|
||||
UINT8 PersistentMemory[0];
|
||||
} EMU_THUNK_PPI;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -499,6 +499,9 @@ Returns:
|
|||
}
|
||||
|
||||
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);
|
||||
AddThunkPpi (EFI_PEI_PPI_DESCRIPTOR_PPI, &gEfiPeiReset2PpiGuid, &mEmuReset2Ppi);
|
||||
|
|
Loading…
Reference in New Issue