Commit Graph

210 Commits

Author SHA1 Message Date
Michael Kinney 113a7d9ec9 EmulatorPkg: Fix VS2015 build when VS2017 also installed
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>
2019-08-06 09:29:16 -07:00
Jordan Justen 70565e6422
EmulatorPkg/Unix: Convert timezone from seconds to minutes
Fixes and assert seen when running ls under the shell. It appears the
assert was added in:

commit 99849a906e

    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>
2019-07-14 01:12:31 -07:00
Jordan Justen 8f5b265500
EmulatorPkg/build.sh: Fix missing usage of -b BUILDTARGET parameter
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
2019-07-14 01:09:53 -07:00
Stephano Cetola 55b9bbf40a
EmulatorPkg: update HOST_TOOLS to xcode5
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>
2019-07-13 00:51:48 -07:00
Wu, Hao A e53303ca05 EmulatorPkg/MiscSubClassPlatformDxe: Remove this unused module
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1953

For commit 63f9b9b931, 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>
2019-07-02 10:42:46 +08:00
Liming Gao 110d4729b5 EmulatorPkg: Add NetworkPkg/NetworkPkg.dec as the package dependency
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>
2019-05-21 10:35:33 +08:00
Fu Siyuan 3b7a897cd8 EmulatorPkg: Update DSC/FDF to use NetworkPkg's include fragment file.
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]
2019-05-16 16:45:38 +02:00
Zhiguang Liu 21d5bf86b2 EmulatorPkg: Remove framework pkgs dependency from EmulatorPkg
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>
2019-05-10 10:49:57 +08:00
Zhiguang Liu 68cafc7bf0 EmulatorPkg: Save the modified order after rebooting
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>
2019-05-10 10:49:52 +08:00
Zhiguang Liu 0e92957eaa EmulatorPkg: Make the shell be the first boot option
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>
2019-05-10 10:49:45 +08:00
Zhiguang Liu ad9df93770 EmulatorPkg: Change the cpu frequency to a non-zero value
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>
2019-05-10 10:48:51 +08:00
Zhiguang Liu 792f0d4f12 EmulatorPkg: Support a second GOP window
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>
2019-05-08 16:21:49 +08:00
Kinney, Michael D eb33b3994d EmulatorPkg/Unix: Rename GdbRun to GdbRun.sh
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>
2019-04-15 14:54:08 -07:00
Dandan Bi 0108a91c55 EmulatorPkg: Update UefiDecompressLib instance
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>
2019-04-10 14:11:48 +08:00
Michael D Kinney e3ba31da1c EmulatorPkg: Replace BSD License with BSD+Patent License
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>
2019-04-09 10:57:59 -07:00
Laszlo Ersek 8ff1221199 EmulatorPkg: require GCC48 or later
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>
2019-01-08 02:34:05 +01:00
shenglei cc5c08f9d6 EmulatorPkg: Remove EdkShellBinPkg in FDF and DEC
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>
2018-11-19 10:50:15 +08:00
Liu Yu 90fa59f685
EmulatorPkg/build.sh: Fix 'run' path to simulator host executable
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>
2018-11-18 16:31:24 -08:00
Fu Siyuan 6cf3aeaeb1 EmulatorPkg: Replace obsoleted network drivers from platform DSC/FDF.
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>
2018-11-05 16:02:24 +08:00
Jian J Wang cf320090fa EmulatorPkg/EmulatorPkg.dsc: override PCD default to avoid boot failure
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1215

This issue is caused by commit 5267926134.

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>
2018-09-28 10:19:35 +08:00
Chen A Chen ba6037f833 EmulatorPkg: Removing ipf which is no longer supported from edk2.
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>
2018-09-25 23:46:00 +08:00
Ruiyu Ni f4eaaf1a6d Emulator/Win: Fix build failure using VS2015x86 or old WinSDK
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>
2018-09-10 10:29:35 +08:00
Ruiyu Ni 289cb872ed EmulatorPkg: Update package level Readme.md
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>
2018-09-10 10:29:34 +08:00
Ruiyu Ni 6623f8fe66 EmulatorPkg/PlatformBmLib: Fix GCC build failure
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>
2018-09-06 14:43:17 +08:00
Ruiyu Ni 1e57188216 EmulatorPkg: IoThunk->Close() is called too early, may causing hang
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>
2018-08-31 10:40:20 +08:00
Ruiyu Ni e01238946c EmulatorPkg: Use MdeModulePkg/Bds module
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>
2018-08-31 10:40:18 +08:00
Ruiyu Ni 0195dd509f EmulatorPkg/Win: Add VS2017 project file
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>
2018-08-31 10:40:16 +08:00
Ruiyu Ni 54ee6176ed EmulatorPkg/AutoScanPei: Report the correct CPU address size
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>
2018-08-31 10:40:15 +08:00
Ruiyu Ni f89c018f3d EmulatorPkg/Win: Enable 64bit (SEC,PEI,DXE all run at 64bit)
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>
2018-08-31 10:40:13 +08:00
Ruiyu Ni e3c96c391c EmulatorPkg/Win: ReadKeyStrokeEx() always returns correct KeyState
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>
2018-08-31 10:40:11 +08:00
Ruiyu Ni d773459e2f EmulatorPkg/Win: Use FrameBufferBltLib for BLT operation
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>
2018-08-31 10:40:10 +08:00
Ruiyu Ni ce8c1d92f5 EmulatorPkg/EmuGopDxe: Clear screen to black in GOP.SetMode
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>
2018-08-31 10:40:08 +08:00
Ruiyu Ni 158b558711 EmulatorPkg/EmuGopDxe: Fix TxtInEx.SetState SCT conformance failure
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>
2018-08-31 10:40:07 +08:00
Ruiyu Ni 79e4f2a56a EmulatorPkg: formalize line endings
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>
2018-08-30 09:26:54 +08:00
Ruiyu Ni 033949a810 EmulatorPkg/DSC: Remove FS mapping to EDK Shell bin directory
The EDK Shell is end of line so the FS mapping to old EDK
Shell bin directory is better to be removed.

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>
2018-08-27 15:21:03 +08:00
Ruiyu Ni 3da7b0639f EmulatorPkg/EmuFileSystem: Fix a bug that causes Close() assertion
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1117

The root cause is when a file is opened through File.Open(), the
private data for the File is not allocated, so when later
when File.Close() is called, the signature check in CR() causes
the assertion.

The private data for the File is allocated properly when the file
is opened from FS.OpenVolume().

The patch also fixes a minor issue that wrongly assigns
revision number to File.

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>
2018-08-27 15:21:02 +08:00
Ruiyu Ni 41fd56be34 EmulatorPkg/PlatformBds: Signal EndOfDxe in platform BDS
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1079

Without signal of EndOfDxe, the 3rd party code (.efi from non-flash
storage) cannot run. It's forbidden by
8be37a5cee
*MdeModulePkg/SecurityStubDxe: Defer 3rd party image before EndOfDxe

The patch enables running of SCT from internal shell.

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>
2018-08-27 15:21:01 +08:00
Ruiyu Ni 8f8196976e EmulatorPkg/Win: Add BlockIo support
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>
2018-08-27 15:20:59 +08:00
Ruiyu Ni 56502bf1ad EmulatorPkg/Win: Add SimpleFileSystem support
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>
2018-08-27 15:20:58 +08:00
Ruiyu Ni 07d8559c6b EmulatorPkg/Win: Add RTC support
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>
2018-08-27 15:20:56 +08:00
Ruiyu Ni 269c512393 EmulatorPkg/Win: Add timer and interrupt support
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>
2018-08-27 15:20:55 +08:00
Ruiyu Ni 7a465451be EmulatorPkg/Win: Add input/output support
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>
2018-08-27 15:20:54 +08:00
Ruiyu Ni 5601e90d5c EmulatorPkg/Win: Enable native OS console as firmware console
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>
2018-08-27 15:20:52 +08:00
Ruiyu Ni 0d9b5c461a EmulatorPkg/Win: Enable source level debugging
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>
2018-08-27 15:20:51 +08:00
Ruiyu Ni 3c859dfebb EmulatorPkg/Win: Add Windows host support
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>
2018-08-27 15:20:49 +08:00
Ruiyu Ni 47c04c382e EmulatorPkg/ThunkProtocolList: Fix VS build failure
VS compiler complains converting UINTN to UINT16 causes data lost.
Add typecast to fix the build failure.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Andrdw Fish <afish@apple.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
2018-08-27 15:20:47 +08:00
Marvin Häuser 7dc7c7435e EmulatorPkg/SmbiosLib: Declare the correct library class.
Currently, SmbiosLib declares the PcdLib library class. Update the
declaration to declare SmbiosLib.

V2:
  - Do not change the copyright date as requested.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2018-05-24 13:33:56 -07:00
Liming Gao 78647b9228 EmulatorPkg: Undefine CR3 macro in Host.h
CR3 has been used as structure field name in BaseLib IA32_TASK_STATE_SEGMENT.
Undefine CR3 to make sure there is no conflict to it.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Andrew Fish <afish@apple.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2018-02-27 18:33:51 +08:00
Michael D Kinney 44b5d55d8f EmulatorPkg: Add SafeIntLib and BmpSupportLib to DSC files
https://bugzilla.tianocore.org/show_bug.cgi?id=800

Based on content from the following branch/commits:
https://github.com/Microsoft/MS_UEFI/tree/share/MsCapsuleSupport
33bab4031a
ca516b1a61
2b9f111f2e

Add BmpSupportLib and SafeIntLib mappings that are required
by GenericBdsLib.

Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Andrew Fish <afish@apple.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>
Reviewed-by: Bret Barkelew <Bret.Barkelew@microsoft.com>
2018-02-11 16:11:19 -08:00
Ruiyu Ni fdd8463d7b EmulatorPkg: Fix build failure due to Tftp library removal
The TFTP command was converted from a NULL class library instance to
a dynamic shell command in commit 0961002352.

The ShellLib and FileHandleLib resolutions are moved from
Shell app <LibraryClasses> to [LibraryClasses.common]
because dynamic shell commands implemented as DXE_DRIVER modules
also depend on these libraries.

PcdShellLibAutoInitialize must be set to FALSE for both the shell app
itself and the dynamic shell command modules.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Cc: Andrew Fish <afish@apple.com>
2017-12-07 15:56:26 +08:00
Michael D Kinney 2a98de0344 edk2: Move License.txt file to root
https://bugzilla.tianocore.org/show_bug.cgi?id=642

Add top level License.txt file with the BSD 2-Clause
License that is used by the majority of the EKD II open
source project content.  Merge copyright statements
from the BSD 2-Clause License files in each package
directory and remove the duplication License.txt
file from package directories.

Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Andrew Fish <afish@apple.com>
Cc: Jordan Justen <jordan.l.justen@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>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-08-03 11:02:17 -07:00
Michael D Kinney bbdd3bad1b edk2: Move TianoCore Contribution Agreement to root
https://bugzilla.tianocore.org/show_bug.cgi?id=629

Move Contributions.txt that contains the TianoCore
Contribution Agreement 1.0 to the root of the edk2
repository and remove the duplicate Contributions.txt
files from all packages.

Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Andrew Fish <afish@apple.com>
Cc: Jordan Justen <jordan.l.justen@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>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-08-03 11:01:53 -07:00
Jordan Justen e9651c1272 EmulatorPkg/Unix/Host: Add GCC5 CC/DLINK commands (for GCC >= 5)
These flags are based on the flags from the GCC5 toolchain in
tools_def.template. Since the GCC5 toolchain uses link-time
optimizations (LTO), we must compile and link the 'Host' files with
LTO enabled so we can link to other modules.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2017-07-07 15:38:13 -07:00
Jordan Justen a04ec6d9f7 EmulatorPkg/build.sh: Merge GCC toolchain detection from OVMF
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2017-06-02 17:44:00 -07:00
Laszlo Ersek 1ee0e6532f EmulatorPkg/FvbServicesRuntimeDxe: correct NumOfLba vararg type in EraseBlocks()
According to the PI spec, Volume 3,
EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL.EraseBlocks():

> The variable argument list is a list of tuples. Each tuple describes a
> range of LBAs to erase and consists of the following:
> * An EFI_LBA that indicates the starting LBA
> * A UINTN that indicates the number of blocks to erase

(NB, in edk2, EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL is a typedef to
EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL.)

In this driver, the NumOfLba local variable is defined with type UINTN,
but the TYPE argument passed to VA_ARG() is UINT32. Fix the mismatch.

Cc: Andrew Fish <afish@apple.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Reported-by: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2017-05-18 23:38:45 +02:00
Dandan Bi 3df29b5d16 EmulatorPkg: Add SortLib/UefiBootManagerLib
ConPlatformDxe uses the UefiBootManagerLib,
and UefiBootManagerLib consumes SortLib.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2017-03-20 14:48:18 +08:00
Dandan Bi 29e9bf10dc EmulatorPkg: Add the UefiBootManagerLib library
Since shell has consumed the APIs in UefiBootManagerLib.

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.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2017-03-08 09:02:28 +08:00
Leif Lindholm 7bbe0b3eff EmulatorPkg: Remove use of IntelFrameworkModulePkg legacy libs
LzmaCustomDecompressLib and PeiDxeDebugLibReportStatusCode were copied
from IntelFrameworkModulePkg to MdeModulePkg, but the originals were
kept for compatibility.

Since the libraries are identical, move EmulatorPkg to use the
MdeModulePkg versions instead.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2016-12-02 15:59:19 +00:00
Gary Lin afa99fac54 EmulatorPkg: Fix typos in comments and variables
- Predfined -> Predefined
- minimue -> minimum
- predeined -> predefined
- excute -> execute
- availible -> available
- discontiguous -> discontinuous
- permenent -> permanent
- immediatly -> immediately
- environmemt -> environment
- Seperator -> Separator
- remmeber -> remember
- initailized -> initialized

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2016-10-19 13:32:20 -07:00
Ard Biesheuvel a1b8baccc3 BaseTools GCC: use 'gcc' as the linker command for GCC44 and later
To accommodate upcoming GCCx toolchain versions that require 'gcc' to
be used as the linker in order to support LTO, switch GCC44 and later
(including CLANG35) to a new DLINK build rule that invokes 'gcc' as the
linker instead of 'ld'. Since gcc expects its command line arguments in
a different format, and expects arguments that it needs to pass to the
linker to be prefixed with '-Wl,', this involves changes to most of the
DLINK_FLAGS definitions in tools_def.template, as well as some changes to
module .INF files that set their own linker options.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-08-02 08:40:43 +02:00
Giri P Mudusuru daea123d24 EmulatorPkg: Fix typos in comments
EFI_UNSUPPORTEDT to EFI_UNSUPPORTED

Cc: Andrew Fish <afish@apple.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Reviewed-by: Andrew Fish <afish@apple.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
2016-07-25 16:56:57 -07:00
Pedroa Liu 8b3ccf16e0 EmulatorPkg/EmuGopDxe: Use correct FROM_THIS macro for TextInEx
Fixes assert of "Bad signature"

Pedroa fixed EmuGopSimpleTextInExReadKeyStrokeEx.

Jordan fixed EmuGopSimpleTextInExSetState.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Pedroa Liu <pedroa.liu@insyde.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
[jordan.l.justen@intel.com: Also update EmuGopSimpleTextInExSetState]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2016-05-16 18:25:17 -07:00
Jordan Justen de23a7ec58 EmulatorPkg: Convert to always build FatPkg
Now that FatPkg is open source (and therefore can be included in the
EDK II tree) we always build and use it directly.

Build and boot tested with GCC 5.3 on X64, but I did not test
attaching a disk image with a FAT filesystem.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Cc: Andrew Fish <afish@apple.com>
Reviewed-by: Andrew Fish <afish@apple.com>
2016-04-07 20:45:45 +02:00
Laszlo Ersek 92658c8af1 EmulatorPkg: CpuRuntimeDxe: remove set but unused variables
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Andrew Fish <afish@apple.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
2016-03-25 10:52:15 +01:00
Jordan Justen 9fe7c61bc6 EmulatorPkg: Use UEFI Shell by default
Now we will build the UEFI shell from source and include it in the
EmulatorPkg build.

USE_OLD_SHELL can be defined on the command line to force using the
old shell.

Fixes: https://github.com/tianocore/edk2/issues/60
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Cc: Andrew Fish <afish@apple.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2016-03-02 16:05:16 -08:00
Jordan Justen e0d0ec2833 EmulatorPkg: Convert all .uni files to utf-8
To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py EmulatorPkg

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19253 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-15 04:51:49 +00:00
Jordan Justen 5c13dd09fc EmulatorPkg: Fix GCC49 build hang in PeiCore
This is a port of 55e96f9c60 / r17902 to
EmulatorPkg:

commit 55e96f9c60
Author: Ruiyu Ni <ruiyu.ni@intel.com>
Date:   Thu Jul 9 08:55:23 2015 +0000

    OvmfPkg: Fix GCC49 build hang in PeiCore

Cc: Andrew Fish <afish@apple.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Fixes: https://github.com/tianocore/edk2/issues/24
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19099 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-02 20:02:58 +00:00
Star Zeng 9fffd8e204 EmulatorPkg: Use SerialDxe in MdeModulePkg instead of EmbeddedPkg
It is also to add GetControl/SetControl/SetAttributes implementation
for DxeEmuSerialPortLib.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Andrew Fish <afish@apple.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18967 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-26 08:48:38 +00:00
Jordan Justen 6fa04d934b EmulatorPkg/build.sh: Use GCC49 toolchain with GCC 5.*
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Cc: Andrew Fish <afish@apple.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18578 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-08 05:51:57 +00:00
Star Zeng 1432065ed5 EmulatorPkg: Link separated VarCheckUefiLib NULL class library instance
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Andrew Fish <afish@apple.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18289 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-25 03:03:05 +00:00
Star Zeng b6e3355a1f EmulatorPkg: Add VarCheckLib library mapping
Since Variable driver has been updated to consume the separated VarCheckLib.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Andrew Fish <afish@apple.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18282 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-25 02:59:52 +00:00
Heyi Guo 1c145953d1 EmulatorPkg: Update comment for PcdDefaultTerminalType
Update comment for PcdDefaultTerminalType, as a new terminal type
TTYTERM has been added with type value of 4.

The new type is NOT defined in UEFI SPEC v2.5.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Andrew Fish <afish@apple.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Heyi Guo <heyi.guo@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18024 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-16 08:50:15 +00:00
Jiaxin Wu 4a43777457 EmulatorPkg: Remove Ip4ConfigDxe module from EmulatorPkg
Ip4ConfigDxe driver is deprecated in UEFI 2.5, so we will not support original Ip4Config Protocol, 
which is replace by Ip4Config2 Protocol integrated in Ip4Dxe driver(git commit 1f6729ff (SVN r17853)).
Therefore we can remove Ip4ConfigDxe driver from this build.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17913 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-10 05:44:23 +00:00
Star Zeng c8f451eb75 EmulatorPkg: Add TpmMeasurementLib and AuthVariableLib library mapping
These library classes are now linked with
MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
to optionally support secure variables.

For EmulatorPkg, secure boot is not currently enabled,
so we map these libraries to the NULL versions that don't support secure variables.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17761 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01 03:06:09 +00:00
Ruiyu Ni 3214cebd84 EmulatorPkg: Use the new PCDs defined in MdePkg.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17319 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-06 03:28:12 +00:00
Jordan Justen dff5a05ba1 EmulatorPkg: Update web page and wiki urls
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Bruce Cran <bruce.cran@gmail.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16780 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-05 18:25:01 +00:00
Jordan Justen 58f89bb1d2 EmulatorPkg: EmulatorPkg/Unix/Host/Host.c line-endings to CRLF
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16779 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-05 18:24:48 +00:00
Jordan Justen 3f3c4895da */Contributions.txt: Update example email address
Use the example.com domain as recommended in RFC 2606.

NOTE: This does not modify the wording of the "TianoCore Contribution
      Agreement 1.0" section

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Bruce Cran <bruce.cran@gmail.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16724 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-03 17:29:14 +00:00
Daryl McDaniel 45aee4c87a EmulatorPkg: Move libraries from ShellPkg into MdeModulePkg and MdePkg.
The following libraries are being migrated out of ShellPkg in order to make
their functionality more widely available.
  • PathLib:        Incorporate into MdePkg/Library/BaseLib
  • FileHandleLib:  MdePkg/Library/UefiFileHandleLib
  • BaseSortLib:    MdeModulePkg/Library/BaseSortLib
  • UefiSortLib:    MdeModulePkg/Library/UefiSortLib

EmulatorPkg.dsc:
  Delete PathLib LibraryClass description
  Update FileHandleLib LibraryClass description to reflect its new location.
  Update SortLib LibraryClass description to reflect its new location.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <daryl.mcdaniel@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Lee Rosenbaum  <lee.g.rosenbaum@intel.com> 


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16607 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-13 23:27:08 +00:00
Chen Fan 8864869a7f EmulatorPkg/MpService: add enabled processor check for startupThisAP
if processor number is the one of disabled processor, startupThisAP
should return invalid prameter.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16417 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-21 22:46:49 +00:00
Chen Fan c156d27b39 EmulatorPkg/MpService: StartupAllAPs should verify processor state before setting state
if any enabled APs are not in idle state, StartupAllAPs() should return immediately,
and must not change the other idled processor state. so we checked the state before
changed them.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16416 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-21 22:46:36 +00:00
Chen Fan ca186b1d4f EmulatorPkg/MpService: fix wrong unsigned to signed variable transition
Because TimeoutInMicrosecsond is a unsigned value, converting it to
signed value will cause the data region changed. so this patch fix
that.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16415 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-21 22:46:26 +00:00
Jordan Justen 26830e8579 EDK II Contributions.txt: Update patch format information
Update to show what the patch looks like in email form.

NOTE: This does not modify the wording of the "TianoCore Contribution
      Agreement 1.0" section

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16297 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-31 22:05:50 +00:00
Chen Fan 3dfe9247ce EmulatorPkg/MpService: remove redundant switch-case statement
we had set the AP procedure in StartupAllAPs(), so do not need
to set AP procedure twice.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16186 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-28 06:22:10 +00:00
Chen Fan 5152f6426c EmulatorPkg/MpService: Check Processor State when Set Procedure
Due to the state of processor could be set blocked by SingleThread
parameter, so we ought to add a READY state check, only let
the processor in READY state to invoke procedure.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16185 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-28 06:22:03 +00:00
Chen Fan 1a160a74a5 EmulatorPkg/MpService: use simple pointer access
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16184 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-28 06:21:55 +00:00
Chen Fan 8ab6d73c0e EmulatorPkg/MpService: Fix a NULL reference
when making a CreateEvent() to call CpuCheckAllAPsStatus(),
the Context parameter was NULL in CpuCheckAllAPsStatus(),
so we must not use the Context as the ProcessorData pointer.
and should recalculate it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16183 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-28 06:21:46 +00:00
Anderw Fish 8649abce5f EmulatorPkg: Unix: Use XCODE5 and lldb if Xcode 5 is detected
The EmulatorPkg build.sh will use XCODE5 if that is the default toolchain, and
default to using lldb if Xcode 5 is dectect. This will work for Xcode 6 and 
possibly future version of Xcode too.

/usr/bin/clang is just a wrapper that calls the currently selected Xcode 
version. xcode-select is used used to display or set the current version of
Xcode used by the command line tools. 

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Anderw Fish <afish@apple.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15983 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-29 18:58:36 +00:00
Anderw Fish 4880fc9ff7 EmulatorPkg: Unix: Add LLDB support for Xcode 5
Xcode5 retired gdb, so this patch adds support for using, and loading symbols
in, lldb. It also supports building with Xcode 5.

The lldb script also supports dumping out the build generated guid database
and it prints guids out with thier Cname if available. lldbefi.py also
contains some EFI specific type formatters. Symbols are loaded via the
lldbefi.py script setting a breakpoint on SecGdbScriptBreak() and runing a
breakpoint action Python function that uses the arguments to
SecGdbScriptBreak() to load symbols.

The location of SecGdbScriptBreak() in Host.c was updated to move symbol
loading control into the lldb Python script, since lldb only uses the
arguments to SecGdbScriptBreak() and not the files generated by the
emulator. The +1 on the SecGdbScriptBreak() argument makes it string size,
not string length, as this is what the lldb script is looking for.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Anderw Fish <afish@apple.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15982 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-29 18:52:42 +00:00
Anderw Fish e320062406 EmulatorPkg: Unix: Fix uninitiailzed variable bug.
clang warns on this error.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Anderw Fish <afish@apple.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15981 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-29 18:45:26 +00:00
Anderw Fish 459eba0148 EmulatorPkg:Unix: Add support for X11 on Mac OS X via XQuartz
Starting in OS X Mountain Lion X11 is not longer part of the OS install, so 
you must download it from http://xquartz.macosforge.org.
To make XQuartz work with the EmulatorPkg an include path needs to be added.
The build tools fail the build if you try to add an absolute inculde path to 
the X11 headers, so Unix/Host/X11IncludeHack, a symbolic link, was added to 
get the system building.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Anderw Fish <afish@apple.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15929 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-28 03:38:21 +00:00
Jordan Justen fad213a3db EDK II Contributions.txt: Note acceptable contribution licenses
We strongly prefer that contribtions be offered using the same license
as the project/module. But, we should document other acceptable
licenses for contributions.

This will allow package owners to more easily know if they can accept
a contribution under a different source license.

NOTE: This does not modify the wording of the "TianoCore Contribution
      Agreement 1.0" section

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Mark Doran <mark.doran@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15892 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-25 23:10:18 +00:00
Chen Fan a31a3b4a3e EmulatorPkg/Mpservice: Add StateLock where missing
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15730 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-31 15:45:27 +00:00
Chen Fan 0dd40e1460 EmulatorPkg/Mpservice: Remove StackLock for Info.StateFlag
Maybe we should add another lock for Info.StateFlag in the future
rather than StackLock. at here, we get rid of it first.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15729 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-31 15:45:21 +00:00
Chen Fan f9032449e8 EmulatorPkg/Mpservice: Remove addressof operator
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15728 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-31 15:45:13 +00:00
Chen Fan e143c9e30c EmulatorPkg/Mpservice: CpuCheckAllAPsStatus: ProcedureLock => StateLock
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15727 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-31 15:45:04 +00:00
Jordan Justen dc4ad1532e EmulatorPkg: Add support for GCC48 & GCC49 toolchains
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15699 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-28 17:37:25 +00:00
Chen Fan 70a2c7b11c EmulatorPkg/MpService: modify AP state should hold a mutex
Add mutex when change AP state.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15668 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-22 08:19:43 +00:00
Jordan Justen 0cecbe565a EmulatorPkg: Add structure braces { } to fix build warning
The GCC parameter -Wno-missing-braces was recently removed. This
caused build warnings where structures were instantiated without
proper brace usage.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15632 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-04 20:50:41 +00:00
Jordan Justen f58ba9ed6f EmulatorPkg/PlatformSmbiosDxe/SmbiosTable.c: Convert to CRLF (dos text)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15631 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-04 20:50:24 +00:00