EmulatorPkg/WinHost: Enable network support.
Follow the implementation from Unix host to implement SNP EMU_IO_THUNK_PROTOCOL and EMU_SNP_PROTOCOL. The network IO driver is the same one as Nt32. Please refer to NETWORK-IO Subproject for network Io driver(SnpNt32Io.dll). Signed-off-by: Nickle Wang <nickle.wang@hpe.com> Signed-off-by: Derek Lin <derek.lin2@hpe.com> Acked-by: Ray Ni <ray.ni@intel.com>
This commit is contained in:
committed by
mergify[bot]
parent
68d720fd92
commit
bb78cfbec0
@@ -9,7 +9,7 @@
|
||||
allocate memory space with ReadWrite and Execute attribute.
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||
(C) Copyright 2016-2020 Hewlett Packard Enterprise Development LP<BR>
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
**/
|
||||
|
||||
@@ -443,6 +443,7 @@ Returns:
|
||||
AddThunkProtocol (&mWinNtWndThunkIo, (CHAR16 *)PcdGetPtr (PcdEmuGop), TRUE);
|
||||
AddThunkProtocol (&mWinNtFileSystemThunkIo, (CHAR16 *)PcdGetPtr (PcdEmuFileSystem), TRUE);
|
||||
AddThunkProtocol (&mWinNtBlockIoThunkIo, (CHAR16 *)PcdGetPtr (PcdEmuVirtualDisk), TRUE);
|
||||
AddThunkProtocol (&mWinNtSnpThunkIo, (CHAR16 *)PcdGetPtr (PcdEmuNetworkInterface), TRUE);
|
||||
|
||||
//
|
||||
// Allocate space for gSystemMemory Array
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/**@file
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
|
||||
@@ -29,6 +30,7 @@ Abstract:
|
||||
|
||||
#include <Protocol/EmuBlockIo.h>
|
||||
#include <Protocol/BlockIo.h>
|
||||
#include <Protocol/EmuSnp.h>
|
||||
|
||||
#include <Library/BaseLib.h>
|
||||
#include <Library/PeCoffLib.h>
|
||||
@@ -41,6 +43,7 @@ Abstract:
|
||||
#include <Library/BaseMemoryLib.h>
|
||||
#include <Library/PeiServicesLib.h>
|
||||
#include <Library/PeCoffExtraActionLib.h>
|
||||
#include <Library/NetLib.h>
|
||||
|
||||
|
||||
#define TEMPORARY_RAM_SIZE 0x20000
|
||||
@@ -200,4 +203,6 @@ extern EMU_THUNK_PROTOCOL gEmuThunkProtocol;
|
||||
extern EMU_IO_THUNK_PROTOCOL mWinNtWndThunkIo;
|
||||
extern EMU_IO_THUNK_PROTOCOL mWinNtFileSystemThunkIo;
|
||||
extern EMU_IO_THUNK_PROTOCOL mWinNtBlockIoThunkIo;
|
||||
extern EMU_IO_THUNK_PROTOCOL mWinNtSnpThunkIo;
|
||||
|
||||
#endif
|
||||
|
@@ -4,6 +4,7 @@
|
||||
# Main executable file of Win Emulator that loads Sec core after initialization finished.
|
||||
# Copyright (c) 2008 - 2019, Intel Corporation. All rights reserved.<BR>
|
||||
# Portions copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR>
|
||||
# (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
#
|
||||
@@ -33,11 +34,13 @@
|
||||
WinThunk.c
|
||||
WinHost.h
|
||||
WinHost.c
|
||||
WinPacketFilter.c
|
||||
WinInclude.h
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
MdeModulePkg/MdeModulePkg.dec
|
||||
NetworkPkg/NetworkPkg.dec
|
||||
EmulatorPkg/EmulatorPkg.dec
|
||||
|
||||
[LibraryClasses]
|
||||
@@ -61,6 +64,7 @@
|
||||
gEmuGraphicsWindowProtocolGuid
|
||||
gEmuBlockIoProtocolGuid
|
||||
gEfiSimpleFileSystemProtocolGuid
|
||||
gEmuSnpProtocolGuid
|
||||
|
||||
[Guids]
|
||||
gEfiFileSystemVolumeLabelInfoIdGuid # SOMETIMES_CONSUMED
|
||||
@@ -78,6 +82,7 @@
|
||||
gEmulatorPkgTokenSpaceGuid.PcdEmuGop|L"GOP Window"
|
||||
gEmulatorPkgTokenSpaceGuid.PcdEmuFileSystem
|
||||
gEmulatorPkgTokenSpaceGuid.PcdPeiServicesTablePage
|
||||
gEmulatorPkgTokenSpaceGuid.PcdEmuNetworkInterface|L"0"
|
||||
|
||||
[BuildOptions]
|
||||
MSFT:*_*_*_DLINK_FLAGS == /out:"$(BIN_DIR)\$(BASE_NAME).exe" /base:0x10000000 /pdb:"$(BIN_DIR)\$(BASE_NAME).pdb"
|
||||
|
1135
EmulatorPkg/Win/Host/WinPacketFilter.c
Normal file
1135
EmulatorPkg/Win/Host/WinPacketFilter.c
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user