Commit Graph

139 Commits

Author SHA1 Message Date
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