summaryrefslogtreecommitdiffstats
path: root/EmulatorPkg/Win
Commit message (Collapse)AuthorAgeFilesLines
* EmulatorPkg/host: fix overflow in Multwenyi,xie via groups.io2020-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2947 When calculating memory regions and store the information in the gSystemMemory in file WinHost.c, the code below will cause overflow, because _wtoi (MemorySizeStr) return an int value and SIZE_1MB is also an int value, if MemorySizeStr is lager for example 2048, then result of multiplication will overflow. for (Index = 0, Done = FALSE; !Done; Index++) { // // Save the size of the memory and make a Unicode filename SystemMemory00 // gSystemMemory[Index].Size = _wtoi (MemorySizeStr) * SIZE_1MB; Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Andrew Fish <afish@apple.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Signed-off-by: Wenyi Xie <xiewenyi2@huawei.com>
* EmulatorPkg/WinHost: Enable network support.Nickle Wang2020-06-044-1/+1147
| | | | | | | | | | | 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>
* EmulatorPkg/WinHost: Add link flags for VS2019 tool chains.Guomin Jiang2020-04-131-0/+2
| | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2604 The link flags for VS2019 is absent and result the build fail. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* EmulatorPkg/Win: Fix various typosAntoine Coeur2020-02-107-19/+19
| | | | | | | | | | | | | Fix various typos in comments and documentation. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Antoine Coeur <coeur@gmx.fr> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Acked-by: Liming Gao <liming.gao@intel.com> Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com> Message-Id: <20200207010831.9046-7-philmd@redhat.com>
* EmulatorPkg DSC and WinHost.inf: Update tool chain name to CLANGPDBLiming Gao2019-11-151-4/+4
| | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2341 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Andrew Fish <afish@apple.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* EmulatorPkg: Enable CLANG9 tool chainLiming Gao2019-10-242-4/+10
| | | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1603 1. Add WIN_HOST_BUILD macro check for CLANG9 tool chain build -p EmulatorPkg\EmulatorPkg.dsc -a IA32 -DWIN_HOST_BUILD=TRUE -t CLANG9 build -p EmulatorPkg\EmulatorPkg.dsc -a X64 -DWIN_HOST_BUILD=TRUE -t CLANG9 2. Append CLANG CC and LINK flags to generate windows HOST. 3. Fix WinHost issue to call GetProcessAffinityMask() API. The input parameter should be UINTN pointer instead of UINT32 pointer. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* WinHost: Add SimplePointer supportMarvin Haeuser2019-10-214-3/+69
| | | | | | | | | Catch WM mouse events and expose them via the SimplePointer protocol. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Andrew Fish <afish@apple.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Signed-off-by: Marvin Haeuser <mhaeuser@outlook.de>
* EmulatorPkg/Win/Host: Fix SecPrint() log line endingsMichael D Kinney2019-08-271-13/+13
| | | | | | | | | | | Update use of SecPrint() to consistently use \n\r for line endings to fix formatting issues in the debug log. Cc: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Andrew Fish <afish@apple.com> Tested-by: Tim Lewis <tim.lewis@insyde.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
* EmulatorPkg/Win/Host: Fix image unload regressionMichael D Kinney2019-08-271-6/+161
| | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=2104 When UEFI Applications or UEFI Drivers are unloaded, the PeCoffLoaderUnloadImageExtraAction() needs to unload the image using FreeLibrary() if the image was successfully loaded using LoadLibrrayEx(). This is a regression from the Nt32Pkg that supported unloading applications and drivers as well as loading the same application or driver multiple times. Cc: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Andrew Fish <afish@apple.com> Tested-by: Tim Lewis <tim.lewis@insyde.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
* EmulatorPkg: Add -D DISABLE_NEW_DEPRECATED_INTERFACESMichael D Kinney2019-08-191-37/+79
| | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=162 Update EmulatorPkg specific modules and libraries to use safe string functions in BaseLib and safe PcdSetxx() functions in PcdLib. With these updates, the define DISABLE_NEW_DEPRECATED_INTERFACES is enabled in the DSC file. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Acked-by: Jordan Justen <jordan.l.justen@intel.com> Tested-by: Andrew Fish <afish@apple.com>
* EmulatorPkg: Remove UNIX_SEC_BUILD/WIN_SEC_BUILDMichael D Kinney2019-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=2055 Remove the use of the defines UNIX_SEC_BUILD and WIN_SEC_BUILD. This simplifies the build command for the EmulatorPkg. Instead, use !if statements in the DSC file using $(ARCH) and $(FAMILY) to determine if the build is for a Windows or POSIX environment. The Readme.md, BAT, and sh files are also updated to remove the use of these defines. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Tested-by: Andrew Fish <afish@apple.com>
* EmulatorPkg: Fix VS2015 build when VS2017 also installedMichael Kinney2019-08-061-14/+8
| | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=2045 * Remove INTEL family flags that are no longer used. * Remove [BuildOptions] statements that apply to all MSFT family tool chains * Update [BuildOptions] for VS2015 and VS2015x86 tool chain tags to use the correct path to tools when multiple VS20xx tool chains are installed. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* EmulatorPkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-0911-76/+11
| | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* Emulator/Win: Fix build failure using VS2015x86 or old WinSDKRuiyu Ni2018-09-102-8/+17
| | | | | | | | | | | When build with WinSDK <= Win10 TH2, the terminal over CMD.exe doesn't work. Because Win10 later than TH2 starts to support VT terminal. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* EmulatorPkg/Win: Add VS2017 project fileRuiyu Ni2018-08-315-0/+211
| | | | | | | | | | | Developer can build the Win Host in VS2017 and launch to debug it. Platform 'x64' is to build 64bit EmulatorWin. Platform 'Win32' is to build 32bit EmulatorWin. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Cc: Andrew Fish <afish@apple.com>
* EmulatorPkg/Win: Enable 64bit (SEC,PEI,DXE all run at 64bit)Ruiyu Ni2018-08-312-2/+2
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Cc: Andrew Fish <afish@apple.com>
* EmulatorPkg/Win: ReadKeyStrokeEx() always returns correct KeyStateRuiyu Ni2018-08-311-0/+17
| | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1118 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Cc: Andrew Fish <afish@apple.com>
* EmulatorPkg/Win: Use FrameBufferBltLib for BLT operationRuiyu Ni2018-08-313-151/+72
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Cc: Andrew Fish <afish@apple.com>
* EmulatorPkg: formalize line endingsRuiyu Ni2018-08-302-2/+2
| | | | | | | | | | | | The patch is the result of running "BaseTools/Scripts/FormatDosFiles.py EmulatorPkg/" No functionality impact. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Cc: Liming Gao <liming.gao@intel.com>
* EmulatorPkg/Win: Add BlockIo supportRuiyu Ni2018-08-274-0/+570
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Cc: Andrew Fish <afish@apple.com>
* EmulatorPkg/Win: Add SimpleFileSystem supportRuiyu Ni2018-08-274-0/+2424
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Cc: Andrew Fish <afish@apple.com>
* EmulatorPkg/Win: Add RTC supportRuiyu Ni2018-08-271-2/+56
| | | | | | | | | Now firmware can display the time correctly. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Cc: Andrew Fish <afish@apple.com>
* EmulatorPkg/Win: Add timer and interrupt supportRuiyu Ni2018-08-271-0/+194
| | | | | | | | | | Now the firmware can boot to Shell and count down 5 seconds to command prompt. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Cc: Andrew Fish <afish@apple.com>
* EmulatorPkg/Win: Add input/output supportRuiyu Ni2018-08-276-0/+1507
| | | | | | | | | | The patch adds GOP and SimpleTextIn[Ex] support. Now firmware can boot to UI and Shell but timer doesn't work. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Andrew Fish <afish@apple.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* EmulatorPkg/Win: Enable native OS console as firmware consoleRuiyu Ni2018-08-271-4/+105
| | | | | | | | | | | The patch implements Stdin/Stdout/Stderr access so that the native OS console (cmd.exe) can be used as the firmware console and debug message can also be routed to it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Cc: Andrew Fish <afish@apple.com>
* EmulatorPkg/Win: Add Windows host supportRuiyu Ni2018-08-276-0/+1709
This is the initial patch to make it boot to early DXE phase without display (only debug message). Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Cc: Andrew Fish <afish@apple.com>