TianoCore EDK2 master
|
#include "WinHost.h"
Go to the source code of this file.
Data Structures | |
struct | PDB_NAME_TO_MOD_HANDLE |
Macros | |
#define | SE_TIME_ZONE_NAME TEXT("SeTimeZonePrivilege") |
#define | MAX_PDB_NAME_TO_MOD_HANDLE_ARRAY_SIZE 0x100 |
Functions | |
EFI_STATUS | WinPeiAutoScan (IN UINTN Index, OUT EFI_PHYSICAL_ADDRESS *MemoryBase, OUT UINT64 *MemorySize) |
EFI_STATUS | WinFdAddress (IN UINTN Index, IN OUT EFI_PHYSICAL_ADDRESS *FdBase, IN OUT UINT64 *FdSize, IN OUT EFI_PHYSICAL_ADDRESS *FixUp) |
VOID * | WinThunk (VOID) |
VOID | SecPrint (CHAR8 *Format,...) |
VOID EFIAPI | WinReset (IN EFI_RESET_TYPE ResetType, IN EFI_STATUS ResetStatus, IN UINTN DataSize, IN VOID *ResetData OPTIONAL) |
BOOLEAN | EfiSystemMemoryRange (IN VOID *MemoryAddress) |
EFI_STATUS | WinNtOpenFile (IN CHAR16 *FileName OPTIONAL, IN UINT32 MapSize, IN DWORD CreationDisposition, IN OUT VOID **BaseAddress, OUT UINTN *Length) |
INTN EFIAPI | main (IN INT Argc, IN CHAR8 **Argv, IN CHAR8 **Envp) |
VOID | SecLoadSecCore (IN UINTN TemporaryRam, IN UINTN TemporaryRamSize, IN VOID *BootFirmwareVolumeBase, IN UINTN BootFirmwareVolumeSize, IN VOID *SecCorePe32File) |
RETURN_STATUS EFIAPI | SecPeCoffGetEntryPoint (IN VOID *Pe32Data, IN OUT VOID **EntryPoint) |
EFI_STATUS EFIAPI | SecImageRead (IN VOID *FileHandle, IN UINTN FileOffset, IN OUT UINTN *ReadSize, OUT VOID *Buffer) |
CHAR16 * | AsciiToUnicode (IN CHAR8 *Ascii, IN UINTN *StrLen OPTIONAL) |
UINTN | CountSeparatorsInString (IN CONST CHAR16 *String, IN CHAR16 Separator) |
EFI_STATUS | AddModHandle (IN PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext, IN VOID *ModHandle) |
VOID * | RemoveModHandle (IN PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext) |
VOID EFIAPI | PeCoffLoaderRelocateImageExtraAction (IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext) |
VOID EFIAPI | PeCoffLoaderUnloadImageExtraAction (IN PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext) |
VOID | _ModuleEntryPoint (VOID) |
Variables | |
PDB_NAME_TO_MOD_HANDLE * | mPdbNameModHandleArray = NULL |
UINTN | mPdbNameModHandleArraySize = 0 |
UINTN | gFdInfoCount = 0 |
NT_FD_INFO * | gFdInfo |
UINTN | gSystemMemoryCount = 0 |
NT_SYSTEM_MEMORY * | gSystemMemory |
BASE_LIBRARY_JUMP_BUFFER | mResetJumpBuffer |
CHAR8 * | mResetTypeStr [] |
EMU_THUNK_PPI | mSecEmuThunkPpi |
EFI_PEI_RESET2_PPI | mEmuReset2Ppi |
WinNt emulator of pre-SEC phase. It's really a Win32 application, but this is Ok since all the other modules for NT32 are NOT Win32 applications.
This program gets NT32 PCD setting and figures out what the memory layout will be, how may FD's will be loaded and also what the boot mode is.
This code produces 128 K of temporary memory for the SEC stack by directly allocate memory space with ReadWrite and Execute attribute.
Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.
(C) Copyright 2016-2020 Hewlett Packard Enterprise Development LP
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file WinHost.c.
EFI_STATUS AddModHandle | ( | IN PE_COFF_LOADER_IMAGE_CONTEXT * | ImageContext, |
IN VOID * | ModHandle | ||
) |
Store the ModHandle in an array indexed by the Pdb File name. The ModHandle is needed to unload the image.
ImageContext | - Input data returned from PE Laoder Library. Used to find the .PDB file name of the PE Image. |
ModHandle | - Returned from LoadLibraryEx() and stored for call to FreeLibrary(). @return return EFI_SUCCESS when ModHandle was stored. |
VOID EFIAPI PeCoffLoaderRelocateImageExtraAction | ( | IN OUT PE_COFF_LOADER_IMAGE_CONTEXT * | ImageContext | ) |
Performs additional actions after a PE/COFF image has been loaded and relocated.
If ImageContext is NULL, then ASSERT().
ImageContext | Pointer to the image context structure that describes the PE/COFF image that has already been loaded and relocated. |
VOID EFIAPI PeCoffLoaderUnloadImageExtraAction | ( | IN PE_COFF_LOADER_IMAGE_CONTEXT * | ImageContext | ) |
VOID * RemoveModHandle | ( | IN PE_COFF_LOADER_IMAGE_CONTEXT * | ImageContext | ) |
Return the ModHandle and delete the entry in the array.
ImageContext | - Input data returned from PE Laoder Library. Used to find the .PDB file name of the PE Image. |
EFI_STATUS WinFdAddress | ( | IN UINTN | Index, |
IN OUT EFI_PHYSICAL_ADDRESS * | FdBase, | ||
IN OUT UINT64 * | FdSize, | ||
IN OUT EFI_PHYSICAL_ADDRESS * | FixUp | ||
) |
EFI_STATUS WinPeiAutoScan | ( | IN UINTN | Index, |
OUT EFI_PHYSICAL_ADDRESS * | MemoryBase, | ||
OUT UINT64 * | MemorySize | ||
) |
VOID EFIAPI WinReset | ( | IN EFI_RESET_TYPE | ResetType, |
IN EFI_STATUS | ResetStatus, | ||
IN UINTN | DataSize, | ||
IN VOID *ResetData | OPTIONAL | ||
) |
Resets the entire platform.
[in] | ResetType | The type of reset to perform. |
[in] | ResetStatus | The status code for the reset. |
[in] | DataSize | The size, in bytes, of ResetData. |
[in] | ResetData | For a ResetType of EfiResetCold, EfiResetWarm, or EfiResetShutdown the data buffer starts with a Null-terminated string, optionally followed by additional binary data. The string is a description that the caller may use to further indicate the reason for the system reset. |
NT_FD_INFO* gFdInfo |
NT_SYSTEM_MEMORY* gSystemMemory |
EFI_PEI_RESET2_PPI mEmuReset2Ppi |
PDB_NAME_TO_MOD_HANDLE* mPdbNameModHandleArray = NULL |
CHAR8* mResetTypeStr[] |
EMU_THUNK_PPI mSecEmuThunkPpi |