summaryrefslogtreecommitdiffstats
path: root/EmulatorPkg
Commit message (Collapse)AuthorAgeFilesLines
* EmulatorPkg: strip trailing whitespaceLeif Lindholm2019-10-041-2/+2
| | | | | | | | | Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
* EmulatorPkg/TimerLib: Add missing GetTimeInNanoSecond functionMichael Johnson2019-09-193-3/+134
| | | | | | | | | | | | Add GetTimeInNanoSecond, already declared in the TimerLib API, to EmulatorPkg implementations of TimerLib. 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 Johnson <michael.johnson@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* EmulatorPkg/PeiEmuSerialPortLib: Update the INF file Guidshenglei2019-09-171-1/+1
| | | | | | | | | | | | | FILE GUID in PeiEmuSerialPortLib.inf is same to MdePkg\Library\BaseSerialPortLibNull\BaseSerialPortLibNull.inf. PeiEmuSerialPortLib.inf FILE_GUID should be updated. https://bugzilla.tianocore.org/show_bug.cgi?id=2144 Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Ray Ni <ray.ni@Intel.com>
* 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/Sec: Change scope of PpiArray[10]Andrew Fish2019-08-191-10/+8
| | | | | | | | | | | | | | | | | | | | | The local variable PpiArray[10] is declared in the middle of the SEC module _ModuleEntryPoint() with its own scope. However, PpiArray has a dangling reference to its location on the stack after the scope is closed. This causes issues with some compilers (e.g. XCODE5). The fix is to move the declaration of PpiArray[10] to the beginning of the function, so it is scoped correctly for all references to this local variable and references to its location. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Andrew Fish <afish@apple.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Tested-by: Andrew Fish <afish@apple.com>
* EmulatorPkg: Disable TftpDynamicCommand and LogoDxe for XCODE5Andrew Fish2019-08-192-0/+8
| | | | | | | | | | | | | | | | | | | | Disable TftpDynamicCommand for XCODE5 because this command places HII content in an PE/COFF resource section that is not supported by the XCODE5 tool chain, and the missing HII content causes the load of this command to ASSERT(). Disable the LogoDxe module that places the logo bitmap in a PE/COFF resource section that is not supported by the XCODE5 tool chain, and the missing HII content causes the load of this module to ASSERT(). Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Andrew Fish <afish@apple.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Acked-by: Jordan Justen <jordan.l.justen@intel.com> Tested-by: Andrew Fish <afish@apple.com>
* EmulatorPkg/Unix/Host: Remove debug code from BerkeleyPacketFilter.cAndrew Fish2019-08-191-4/+0
| | | | | | | | | | | | Remove old debug code that generates an exception. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Andrew Fish <afish@apple.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Tested-by: Andrew Fish <afish@apple.com>
* EmulatorPkg/Unix/Host: Initialize field in BerkeleyPacketFilter.cAndrew Fish2019-08-191-0/+1
| | | | | | | | | | | | Initialize Private->ReadBuffer to NULL. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Andrew Fish <afish@apple.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Tested-by: Andrew Fish <afish@apple.com>
* EmulatorPkg: Fix XCODE5 lldb issuesAndrew Fish2019-08-192-18/+15
| | | | | | | | | | | | | Fix scripts to support lldb symbolic debugging when using XCODE5 tool chain. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Andrew Fish <afish@apple.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Acked-by: Jordan Justen <jordan.l.justen@intel.com> Tested-by: Andrew Fish <afish@apple.com>
* EmulatorPkg/Unix/Host: Disable inline/optimizations for XCODE5Andrew Fish2019-08-192-2/+5
| | | | | | | | | | | | | | | | | * Disable XCODE5 compiler optimizations fort Unix/Host. * Disable inline of SecGdbScriptBreak() to improve compatibility with XCODE5 * For X64 XCODE5 builds place output Host application in $(BIN_DIR) to match all other EmulatorPkg Host application builds. 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: Michael D Kinney <michael.d.kinney@intel.com> Acked-by: Jordan Justen <jordan.l.justen@intel.com> Tested-by: Andrew Fish <afish@apple.com>
* EmulatorPkg: Add support for NOOPT targetMichael D Kinney2019-08-191-1/+1
| | | | | | | | | | | | Add NOOPT to BUILD_TARGETS in 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> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Tested-by: Andrew Fish <afish@apple.com>
* EmulatorPkg: Add -D DISABLE_NEW_DEPRECATED_INTERFACESMichael D Kinney2019-08-199-76/+172
| | | | | | | | | | | | | | | | | | 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-194-22/+22
| | | | | | | | | | | | | | | | | | | | | | 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 VS20xx IA32 boot failureMichael D Kinney2019-08-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=2056 The IA32 build of the EmulatorPkg for VS20xx does not boot because the default value of PCD PcdPeiServicesTablePage rarely succeeds to be mapped on IA32 Windows Host Environments. Change the DEC default value for this PCD to a value that is compatible with Windows and POSIX host environments for IA32 and X64. For IA32 builds, this 64-bit PCD is truncated to a 32-bit value. PcdPeiServicesTablePage is changed from 0x1003000000 to 0x1013000000. With this new value, no boot failures are observed. However, the use of this hard coded value can potentially cause a boot failure if this address specified by the PCD is already allocated in the user process. 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/Unix/Host: Fix XCODE5 IA32/X64 build failureMichael D Kinney2019-08-064-10/+10
| | | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=2046 * Clean up XCODE5 IA32 [BuildOptions] and fix IA32 X11 include path. * Add -DEFIAPI=__attribute__((ms_abi)) to X64 XCODE5 [BuildOptions] * Use -target x86_64-apple-darwin for X64 XCODE5 [BuildOptions] * Add Wl,-no_pie to X64 XCODE5 [BuildOptions] * Address function type mismatch reported by XCODE5 in reverse gasket callback between UEFI ABI and MacOS ABI. Use a UINTN to pass function address to assembly code. 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/Unix/Host: Fix NetworkPkg dependenciesMichael D Kinney2019-08-062-1/+6
| | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=2046 * Add NetworkPkg to UNIX Host.inf dependencies * Fix MacOS redefinition of NTOHLL and HTONLL macros between EDK II and standard includes in UNIX Host.h. 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: 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/Unix: Convert timezone from seconds to minutesJordan Justen2019-07-142-3/+4
| | | | | | | | | | | | Fixes and assert seen when running ls under the shell. It appears the assert was added in: commit 99849a906e15ea3a9a0330d69bbae0d21ff49808 ShellPkg/ls: Display the file time in local time. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* EmulatorPkg/build.sh: Fix missing usage of -b BUILDTARGET parameterJordan Justen2019-07-141-5/+5
| | | | | Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* EmulatorPkg: update HOST_TOOLS to xcode5Stephano Cetola2019-07-131-2/+2
| | | | | | | | | | | | | | The last compiler flag change was for Xcode 5.0, not Xcode 3.2. As such the HOST_TOOLS should be set to XCODE5. Also, fix a small typo. This fixes bug 447: https://bugzilla.tianocore.org/show_bug.cgi?id=447 Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* EmulatorPkg/MiscSubClassPlatformDxe: Remove this unused moduleWu, Hao A2019-07-0239-2825/+0
| | | | | | | | | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1953 For commit 63f9b9b9312f3e08c92a2ea3cdbe01e723ef653b, the use of module EmulatorPkg/MiscSubClassPlatformDxe/MiscSubClassDriver.inf was replaced by: EmulatorPkg/PlatformSmbiosDxe/PlatformSmbiosDxe.inf in platform DSC/FDF files. This commit will remove this unused module from EmulatorPkg. 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: Hao A Wu <hao.a.wu@intel.com>
* EmulatorPkg: Add NetworkPkg/NetworkPkg.dec as the package dependencyLiming Gao2019-05-211-1/+2
| | | | | | | | | | | NetLib will be moved from MdeModulePkg and NetworkPkg. So, the module that consumes NetLib need to depend on NetworkPkg.dec. Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Ray Ni <ray.ni@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* EmulatorPkg: Update DSC/FDF to use NetworkPkg's include fragment file.Fu Siyuan2019-05-162-26/+13
| | | | | | | | | | | | | | | | | This patch updates the platform DSC/FDF files to use the include fragment files provided by NetworkPkg. The feature enabling flags in [Defines] section have been updated to use the NetworkPkg's terms, and the value has been overridden with the original default value on this platform. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Message-Id: <20190516081810.27840-5-shenglei.zhang@intel.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1293 [lersek@redhat.com: add TianoCore Bugzilla reference]
* EmulatorPkg: Remove framework pkgs dependency from EmulatorPkgZhiguang Liu2019-05-102-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1721 Remove two inf files form EmulatorPkg. About IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf, this inf file is not included in the EmulaotrPkg.fdf, which means the StatusCodePei.inf does't work at all, so it is ok to remove it from EmulatorPkg. About IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBusDxe.inf, in the inf file, we can see it consumes gEfiIdeControllerInitProtocolGuid. there are only two inf files in the edk project that produce this Protocol, as belows: PcAtChipsetPkg\Bus\Pci\IdeControllerDxe\IdeControllerDxe.inf MdeModulePkg\Bus\Pci\SataControllerDxe\SataControllerDxe.inf However, neither of them is included in the EmulatorPkg.dsc. It means the IdeBusDxe.inf can't work at all, so it is ok to remove it from EmulatorPkg. Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Ray Ni <ray.ni@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* EmulatorPkg: Save the modified order after rebootingZhiguang Liu2019-05-101-0/+1
| | | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1650 Use memory mapped FV device path by adding FvNameGuid to EmulatorPkg.fdf file. Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Ray Ni <ray.ni@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* EmulatorPkg: Make the shell be the first boot optionZhiguang Liu2019-05-101-0/+30
| | | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1649 Make the shell be the first boot option by default, So it can boot into UEFI Internal Shell directly Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Ray Ni <ray.ni@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* EmulatorPkg: Change the cpu frequency to a non-zero valueZhiguang Liu2019-05-101-1/+4
| | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1686 The valuse of 1234 is a fake value for CPU frequency. Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Ray Ni <ray.ni@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* EmulatorPkg: Support a second GOP windowZhiguang Liu2019-05-081-0/+36
| | | | | | | | | | | | | Two GOP screens will be created if PcdEmuGop is set in EmulatorPkg.dsc: gEmulatorPkgTokenSpaceGuid.PcdEmuGop|L"GOP Window 1!GOP Window 2" REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1687 Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Ray Ni <ray.ni@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* EmulatorPkg/Unix: Rename GdbRun to GdbRun.shKinney, Michael D2019-04-155-4/+4
| | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1657 Add .sh file extension to the shell script GdbRun so changes to this file will pass PatchCheck.py. Also update all scripts that execute GdbRun to execute GdbRun.sh instead. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Ray Ni <ray.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* EmulatorPkg: Update UefiDecompressLib instanceDandan Bi2019-04-101-1/+1
| | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1683 BaseUefiDecompressLib in MdePkg is the base UEFI decompress Library. BaseUefiTianoCustomDecompressLib in IntelFrameworkModulePkg implements the base UEFI decompress functionality and Tiano decompress functionality. Platform doesn't use the TianoCompress, so do not have to use BaseUefiTianoCustomDecompressLib, can use the BaseUefiDecompressLib in MdePkg directly. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Ray Ni <ray.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* EmulatorPkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-09203-1376/+203
| | | | | | | | | | | | | | | | | | | | 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>
* EmulatorPkg: require GCC48 or laterLaszlo Ersek2019-01-082-19/+3
| | | | | | | | | | | | | | | | | | We're about to remove BaseTools support for GCC44..GCC47. Reject those gcc versions cleanly in "EmulatorPkg/build.sh", and drop build flags too that are specific to them. No GCC44..GCC47 references remain under EmulatorPkg after this patch. Cc: Andrew Fish <afish@apple.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1377 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* EmulatorPkg: Remove EdkShellBinPkg in FDF and DECshenglei2018-11-193-10/+1
| | | | | | | | | | | | | | | | | | | Remove EdkShellBinPkg in EmulatorPkg.dec and EmulatorPkg.fdf. https://bugzilla.tianocore.org/show_bug.cgi?id=1108 v2: Remove USE_OLD_SHELL because it will not be used. v4: Remove PcdShellFile in EmulatorPkg.dsc. https://bugzilla.tianocore.org/show_bug.cgi?id=1298 Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Andrew Fish <afish@apple.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* EmulatorPkg/build.sh: Fix 'run' path to simulator host executableLiu Yu2018-11-181-2/+2
| | | | | | Fixes: f89c018f3d "EmulatorPkg/Win: Enable 64bit (SEC, PEI, DXE all run at 64bit)" Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Pedroa Liu <pedroa.liu@outlook.com>
* EmulatorPkg: Replace obsoleted network drivers from platform DSC/FDF.Fu Siyuan2018-11-052-2/+2
| | | | | | | | | | | | | This patch replaces the MdeModulePkg TCP, PXE and iSCSI driver with those ones in NetworkPkg. These 3 drivers in MdeModulePkg are not being actively maintained and will be removed from edk2 master soon. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* EmulatorPkg/EmulatorPkg.dsc: override PCD default to avoid boot failureJian J Wang2018-09-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1215 This issue is caused by commit 5267926134d17e86672b84fd57b438f05ffa68e1. The reason is this commit changed the condition of building page table in DxeIpl. The code before it will only build page table for the sake of PcdSetNxForStack. This commit added PcdImageProtectionPolicy and PcdDxeNxMemoryProtectionPolicy into the logic. But the default value of PcdImageProtectionPolicy is 02, which means the DxeIpl should build page table. Due to the fact that EmulatorPkg doesn't support page table at all, this will cause exception on Windows OS. This patch solves this issue by setting PcdImageProtectionPolicy to 0 explicitly in EmulatorPkg.dsc. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* EmulatorPkg: Removing ipf which is no longer supported from edk2.Chen A Chen2018-09-2531-62/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removing rules for Ipf sources file: * Remove the source file which path with "ipf" and also listed in [Sources.IPF] section of INF file. * Remove the source file which listed in [Components.IPF] section of DSC file and not listed in any other [Components] section. * Remove the embedded Ipf code for MDE_CPU_IPF. Removing rules for Inf file: * Remove IPF from VALID_ARCHITECTURES comments. * Remove DXE_SAL_DRIVER from LIBRARY_CLASS in [Defines] section. * Remove the INF which only listed in [Components.IPF] section in DSC. * Remove statements from [BuildOptions] that provide IPF specific flags. * Remove any IPF sepcific sections. Removing rules for Dec file: * Remove [Includes.IPF] section from Dec. Removing rules for Dsc file: * Remove IPF from SUPPORTED_ARCHITECTURES in [Defines] section of DSC. * Remove any IPF specific sections. * Remove statements from [BuildOptions] that provide IPF specific flags. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@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: Update package level Readme.mdRuiyu Ni2018-09-102-35/+68
| | | | | | | | | | | Since the emulator under Windows is enabled, the patch changes README to include the information of emulator under Windows. It also changes README to Readme.md for better looking. 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/PlatformBmLib: Fix GCC build failureRuiyu Ni2018-09-061-14/+0
| | | | | | | | | Some local variables are initialized but never used. GCC complains about that. The patch fixes this issue. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com>
* EmulatorPkg: IoThunk->Close() is called too early, may causing hangRuiyu Ni2018-08-313-18/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1121 To produce a EFI_BLOCK_IO_PROTOCOL instance in Emulator platform, EmulatorPkg defines the EMU_IO_THUNK_PROTOCOL. OS dependent layer needs to produce this protocol implementation and a generic OS independent layer consumes this protocol to produce EFI_BLOCK_IO_PROTOCOL. EMU_IO_THUNK_PROTOCOL can also be used to abstract the OS dependent IO operation for other UEFI protocols, e.g.: GOP, SimpleFileSystem and etc. It contains two interfaces Open() and Close(). Open() creates the specific IO instances, e.g. for Block IO access, File System access, Screen access, etc. Close() destroys the specific IO instances. Later on the Emulator generic module (e.g.: EmuBlockIoDxe) calls Open() to create the IO instance in DriverBindingStart() and calls Close() in DriverBindingStop(). But today's implementation of DriverBindingStop() contains a bug that it calls Close() before uninstalling the EFI_BLOCK_IO_PROTOCOL. It's a mistake in code. Take EFI_BLOCK_IO for example, the uninstallation may cause the upper layer driver that consumes EFI_BLOCK_IO call BlockIo.Reset(), which consequently calls EmuBlockIo.Reset(). But the EmuBlockIo instance is already destroyed by Close() that happens before uninstallation. So a proper implementation is to call Close() after uninstallation succeeds. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1121 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 Wu <hao.a.wu@intel.com>
* EmulatorPkg: Use MdeModulePkg/Bds moduleRuiyu Ni2018-08-318-634/+649
| | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1120 Logo is enabled by adding a separate core driver LogoDxe. UiApp and BootManagerMenuApp are added to provide two UIs. LoadFileOnFv2 is added to auto-install LoadFile protocol for applications in FV so the boot options for applications can be auto-created from LoadFile. 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: 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/AutoScanPei: Report the correct CPU address sizeRuiyu Ni2018-08-311-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1119 Today's implementation reports CPU address size as 36 through CPU HOB. But when WinHost is running at 64bit, the system memory might be allocated above 2^36. It causes system asserts when DxeCore code tries to find the corresponding GCD entry for a given valid address. The patch uses 57 as the CPU address size which is maximum linear address size when 5-level paging is enabled in host OS. Using 64 seems more proper and a one-time change even 6-level paging might be invented. But it causes CoreInitializeGcdServices() assertion on following code: Entry->EndAddress = LShiftU64 (1, SizeOfMemorySpace) - 1; Because LShiftU64 expects SizeOfMemorySpace < 64. So to be practical, I didn't report 64 and change CoreInitializeGcdServices(). 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-313-7/+3
| | | | | | | 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-314-151/+73
| | | | | | | 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/EmuGopDxe: Clear screen to black in GOP.SetModeRuiyu Ni2018-08-311-4/+4
| | | | | | | | | 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/EmuGopDxe: Fix TxtInEx.SetState SCT conformance failureRuiyu Ni2018-08-311-1/+10
| | | | | | | | | 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>