EmbeddedPkg: Fix crash when retrieving LAN9118 network statistics

Change-Id: I79fa52b9c55aecd22b4e2be642ebf2e2017d56b6
EmbeddedPkg/Lan9118Dxe: Fixed dereferencing optional NULL pointer

TxBuff argument is optional in SNP.GetStatus(). This argument can be NULL.

Change-Id: Iec0d3f11aef211e4497ac861e4052af3680a409a
Semihostlib: Rename semi-hosting open option

Change mnemonic SEMIHOST_FILE_MODE_CREATE with mnemonic SEMIHOST_FILE_MODE_UPDATE.
The bit referred to by this mnemonic is for the semi-hosting open mode code the
equivalent of the + in the ISO C fopen mode terminology. This allows to select the
so called update mode for which both read and write are allowed on the open file.
The mnemonic SEMIHOST_FILE_MODE_UPDATE is more in line with the ISO C fopen mode
terminology. A description of the ISO C fopen modes can be found here :
http://pubs.opengroup.org/onlinepubs/009695399/functions/fopen.html.

Change-Id: Ife787f3561f255362f8e3c9c3e4774fe4c0245f6
SemihostLib: Add library functions

Add library functions to rename a file and get a temporary name
for a file through the semi-hosting interface.

Change-Id: I282c80e50d12a04a2a12a70d55cdfb7651be6bf3
EmbeddedPkg/Lan9118Dxe: Add or fix input parameter checks

Add or fix checking of the input parameters of the functions that constitute
the EFI_SIMPLE_NETWORK_PROTOCOL interface provided by the LAN9118 driver.
In case of invalid calls, the returned error codes are now compliant with the
UEFI specificationi and the SCT tests checking for those error codes do not
fail anymore.

Change-Id: I8317e776f409bf57722d4fda39ecd5ab76e0fbcf
EmbeddedPkg/Lan9118Dxe: Switch back the driver in stopped state after shutdown

Change-Id: I6c1887b9aeebb89b71e0348f218e966d29c11fad
SemihostFs: Fix open file issues revealed by SCT

Fix return codes in case of errors.
Fix translation from EFI open mode to semi-hosting open mode to avoid the
truncate to zero length of an already existing file opened in read/write
or read/write/create mode.

Change-Id: I01ab35d64d77cdc6627d5c3e661f3c39aafe1f0f
MdeModulePkg/PartitionDxe: Fixed El Torito support when the medium is not a CDROM

El Torito format can be used on different media (eg: USB).
A ISO image can be dumped onto a USB mass-storage.

These media might not have the same block size as the CDROM media (ie: 2KB).
The El Torito code and the specification assumes a LBA 2KB.

In addition, the specification says in "12.3.4.4 CD-ROM and DVD-ROM":
UEFI code does not assume a fixed block size.

I was able to dupliacte the issue by copying a debian ISO on a USB driver.

Change-Id: I2806c92352aea4842aa0f45ddcbd13cab183b784
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
EmbeddedPkg/Lan9118Dxe: Fix interrupt's mask returned by GetStatus

Change-Id: I75297e6daa46fffd27d856fbecee446ed936f278
EmbeddedPkg/Lan9118Dxe: Rework filter init, enabling and disabling

Correct the setting of the hardware filters according to what it asked
to the driver through the ReceiveFilters() interface function.

Keep track of the hardware settings in the "ReceiveFilterSetting" field of
 the EFI_SIMPLE_NETWORK_MODE structure.

From now, after initialization, all filters are disabled and thus no packet
received.

Change-Id: I29cf00335d0b10e375ce6573a47fcc749066224e
SemihostFs: Implement SetInfo() and handle seeking past the end of a file

Implement the resizing of the file with SetInfo().
Implement the renaming of a file with SetInfo().
Allow to seek past the end of a file.

The support of file resizing implies a rework of the read, write
and close functions. So does the support of seeking past the end
of a file. That why those two changes are done in the same patch.

Change-Id: Icd57b4a4ceb439483ceb496895867dd62ff9c7fa
ArmPlatformPkg/ArmJunoPkg: Removed unused HvcLib

Change-Id: I8e96591078031b56101ba28284f07281405efbb1
ArmPlatformPkg/ArmJunoPkg: Update Juno UEFI version number

Change-Id: Ia3df74ee6bd40cf428c725230168baf094f05376
ArmPlatformPkg/ArmJunoPkg: Update Makefile script to use GCC49

Change-Id: Id069c064e76b63d5f43e6e557fd90ba32ea88c26