]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
10 years agoShellPkg: add API for determining operation type
Jaben Carsey [Fri, 13 Dec 2013 00:13:59 +0000 (00:13 +0000)]
ShellPkg: add API for determining operation type

There are no callers for this new API yet.  They will be added in the next commits.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14975 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoShellPkg: Refactor Variable replacement into separate function
Jaben Carsey [Thu, 12 Dec 2013 21:44:23 +0000 (21:44 +0000)]
ShellPkg: Refactor Variable replacement into separate function

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14974 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoShellPkg: Refactor Alias replacement into separate function
Jaben Carsey [Thu, 12 Dec 2013 21:16:38 +0000 (21:16 +0000)]
ShellPkg: Refactor Alias replacement into separate function

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14973 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoShellPkg: refactor out leading and trailing space trimming
Jaben Carsey [Thu, 12 Dec 2013 18:42:18 +0000 (18:42 +0000)]
ShellPkg: refactor out leading and trailing space trimming

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14972 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoShellPkg: typo in the last commit.
Jaben Carsey [Thu, 12 Dec 2013 17:55:37 +0000 (17:55 +0000)]
ShellPkg: typo in the last commit.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14971 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoOvmfPkg: Virtio drivers: fix incorrect casts in init functions
Laszlo Ersek [Thu, 12 Dec 2013 17:28:05 +0000 (17:28 +0000)]
OvmfPkg: Virtio drivers: fix incorrect casts in init functions

The recent patch

  OvmfPkg: Make the VirtIo devices use the new VIRTIO_DEVICE_PROTOCOL

was fixed up at commit time, in order to silence warnings issued by the
Visual Studio compiler. Differences between the posted and committed
patch:

>  diff --git a/OvmfPkg/VirtioBlkDxe/VirtioBlk.c b/OvmfPkg/VirtioBlkDxe/VirtioBlk.c
> -index 17b9f71..96a0d9f 100644
> +index 17b9f71..f09b0d1 100644
>  --- a/OvmfPkg/VirtioBlkDxe/VirtioBlk.c
>  +++ b/OvmfPkg/VirtioBlkDxe/VirtioBlk.c
>  @@ -23,7 +23,6 @@
> @@ -994,7 +998,7 @@
>  +  // step 4c -- Report GPFN (guest-physical frame number) of queue.
>  +  //
>  +  Status = Dev->VirtIo->SetQueueAddress (Dev->VirtIo,
> -+      (UINTN) Dev->Ring.Base >> EFI_PAGE_SHIFT);
> ++      (UINT32)(UINTN) Dev->Ring.Base >> EFI_PAGE_SHIFT);
>  +  if (EFI_ERROR (Status)) {
>  +    goto ReleaseQueue;
>  +  }
> @@ -1495,7 +1499,7 @@
>         goto Exit;
>       }
>  diff --git a/OvmfPkg/VirtioNetDxe/SnpInitialize.c b/OvmfPkg/VirtioNetDxe/SnpInitialize.c
> -index 6cee014..8dcf9da 100644
> +index 6cee014..4203fbd 100644
>  --- a/OvmfPkg/VirtioNetDxe/SnpInitialize.c
>  +++ b/OvmfPkg/VirtioNetDxe/SnpInitialize.c
>  @@ -57,14 +57,15 @@ VirtioNetInitRing (
> @@ -1539,7 +1543,7 @@
>  -  Status = VIRTIO_CFG_WRITE (Dev, Generic.VhdrQueueAddress,
>  -             (UINTN) Ring->Base >> EFI_PAGE_SHIFT);
>  +  Status = Dev->VirtIo->SetQueueAddress (Dev->VirtIo,
> -+      (UINTN) Ring->Base >> EFI_PAGE_SHIFT);
> ++      (UINT32)(UINTN) Ring->Base >> EFI_PAGE_SHIFT);
>     if (EFI_ERROR (Status)) {
>  -    VirtioRingUninit (Ring);
>  +    goto ReleaseQueue;
> @@ -1721,7 +1725,7 @@
>   Exit:
>     gBS->RestoreTPL (OldTpl);
>  diff --git a/OvmfPkg/VirtioScsiDxe/VirtioScsi.c b/OvmfPkg/VirtioScsiDxe/VirtioScsi.c
> -index b836fb3..bcec676 100644
> +index b836fb3..2223c9c 100644
>  --- a/OvmfPkg/VirtioScsiDxe/VirtioScsi.c
>  +++ b/OvmfPkg/VirtioScsiDxe/VirtioScsi.c
>  @@ -38,7 +38,6 @@
> @@ -1908,7 +1912,7 @@
>  +  // step 4c -- Report GPFN (guest-physical frame number) of queue.
>  +  //
>  +  Status = Dev->VirtIo->SetQueueAddress (Dev->VirtIo,
> -+      (UINTN) Dev->Ring.Base >> EFI_PAGE_SHIFT);
> ++      (UINT32)(UINTN) Dev->Ring.Base >> EFI_PAGE_SHIFT);
>     if (EFI_ERROR (Status)) {
>       goto ReleaseQueue;
>     }

These casts are incorrect -- they throw away address bits >=32 before
shifting, which can break the drivers in guests with more than 4GB RAM.

The bug is clearly an artifact of the edk2 coding style, which requires
cast expressions to be written as

  (type) expression

rather than the usual

  (type)expression

The latter correctly reflects that casts have one of the strongest
bindings in C. The former actively obscures that fact. Cf.

  (type) expr1 >> expr2

vs.

  (type)expr1 >> expr2

Make sure we shift before we truncate.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14970 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoShellPkg: Refactor out the searching for pipe characters
Jaben Carsey [Thu, 12 Dec 2013 17:27:27 +0000 (17:27 +0000)]
ShellPkg: Refactor out the searching for pipe characters

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14969 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoOvmfPkg/Virtio: Removed VirtioReadDevice() / VirtIoWriteDevice() functions
Olivier Martin [Wed, 11 Dec 2013 16:58:39 +0000 (16:58 +0000)]
OvmfPkg/Virtio: Removed VirtioReadDevice() / VirtIoWriteDevice() functions

These functions did not provide much more than the new protocol functions
VIRTIO_DEVICE_PROTOCOL.ReadDevice() / VIRTIO_DEVICE_PROTOCOL.WriteDevice().

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14968 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoOvmfPkg/Virtio.h: Removed definition of VIRTIO_HDR
Olivier Martin [Wed, 11 Dec 2013 16:58:30 +0000 (16:58 +0000)]
OvmfPkg/Virtio.h: Removed definition of VIRTIO_HDR

This definition is specific to VirtIo over PCI.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14967 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoOvmfPkg: Make the VirtIo devices use the new VIRTIO_DEVICE_PROTOCOL
Olivier Martin [Wed, 11 Dec 2013 16:58:22 +0000 (16:58 +0000)]
OvmfPkg: Make the VirtIo devices use the new VIRTIO_DEVICE_PROTOCOL

This change replaces the accesses to the PCI bus from the Block, Scsi and Net drivers by
the use of the new VIRTIO_DEVICE_PROTOCOL protocol that abstracts the transport layer.
It means these drivers can be used on PCI and MMIO transport layer.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
v5:
- VirtioFlush(): update comment block in VirtioLib.[hc]; error code is
  propagated from VirtIo->SetQueueNotify().
- VirtioBlkInit(): jump to Failed label if SetPageSize() fails
- VirtioBlkInit(): fixup comment, and add error handling, near
  SetQueueNum() call
- VirtioBlkDriverBindingStart(): remove redundant (always false) check for
  a subsystem device ID different from VIRTIO_SUBSYSTEM_BLOCK_DEVICE;
  VirtioBlkDriverBindingSupported() handles it already
- VirtioNetGetFeatures(): update stale comment block
- VirtioNetGetFeatures(): retrieve MAC address byte for byte (open-coded
  loop)
- VirtioNetDriverBindingStart(): remove redundant (always false) check for
  a subsystem device ID different from VIRTIO_SUBSYSTEM_NETWORK_CARD;
  VirtioNetDriverBindingSupported() handles it already
- VirtioNetInitRing(): call SetQueueNum() and SetQueueAlign() for proper
  MMIO operation
- VirtioNetInitialize(): fix destination error label for when
  SetPageSize() fails
- VirtioScsi.c: fix comment block of VIRTIO_CFG_WRITE()/VIRTIO_CFG_READ()
- VirtioScsiInit(): fix destination error label for when SetPageSize()
  fails
- VirtioScsiInit(): call SetQueueNum() and SetQueueAlign() for proper MMIO
  operation

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14966 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoOvmfPkg/VirtioMmioDeviceLib: Implement VIRTIO_DEVICE_PROTOCOL for VirtIo Devices...
Olivier Martin [Wed, 11 Dec 2013 16:57:59 +0000 (16:57 +0000)]
OvmfPkg/VirtioMmioDeviceLib: Implement VIRTIO_DEVICE_PROTOCOL for VirtIo Devices over MMIO

Why is the virtio-mmio implementation of the protocol a library,
instead of a driver binary?
The UEFI driver model would encourage to create a virtio-mmio driver
instead of a library. But the reasons why I created a library are:

- A virtio-mmio driver would imply an additional protocol that would
probably have a single attribute field:

typedef struct {
  PHYSICAL_ADDRESS       BaseAddress;
} VIRTIO_MMIO_DEVICE_PROTOCOL;

- There is no (easy) way to scan the available VirtIo devices on a
platform. So, the UEFI firmware for this platform would need a driver
to produce instances for every virtio devices it wants to expose in
UEFI. A single call to a helper library (ie: VirtioMmioDeviceLib)
make the porting easier.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
v5:
- typo fix in VirtioMmioInstallDevice() comment block
- plug MmioDevice leak in VirtioMmioUninstallDevice()
- return EFI_INVALID_PARAMETER in VirtioMmioGetQueueAddress() if
  QueueAddress is NULL
- VirtioMmioSetQueueSize(): fix return value (it's a status code)
- VirtioMmioSetPageSize(): check against EFI_PAGE_SIZE with "if" plus
  EFI_UNSUPPORTED, rather than ASSERT()
- VirtioMmioDeviceWrite(), VirtioMmioDeviceRead(): remove redundant
  (FieldSize > 8) checks
- VirtioMmioDeviceLib.inf: drop UefiDriverEntryPoint library dependency

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14965 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoOvmfPkg/VirtioPciDeviceDxe: Implement VIRTIO_DEVICE_PROTOCOL for VirtIo Devices over PCI
Olivier Martin [Wed, 11 Dec 2013 16:57:49 +0000 (16:57 +0000)]
OvmfPkg/VirtioPciDeviceDxe: Implement VIRTIO_DEVICE_PROTOCOL for VirtIo Devices over PCI

This change implements the VIRTIO_DEVICE_PROTOCOL for the PCI transport
layer.
The VirtIo device drivers will interact with the PCI-based VirtIo devices
through this protocol implementation.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
v5:
- updated comment block on VirtioPciDeviceRead()
- return EFI_UNSUPPORTED instead of failed ASSERT() in
  VirtioPciSetPageSize()
- VirtioPciIoRead(): restore the original requirement that FieldSize equal
  BufferSize exactly (not only divide it). The looping added in v4 did not
  match the comment block, and the only place that used it in v4 (ie.
  VirtioNetGetFeatures()) needs an open-coded loop anyway (will be done in
  a later part of v5).

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14964 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoOvmfPkg/VirtioDevice.h: Introduced VIRTIO_DEVICE_PROTOCOL protocol
Olivier Martin [Wed, 11 Dec 2013 16:57:40 +0000 (16:57 +0000)]
OvmfPkg/VirtioDevice.h: Introduced VIRTIO_DEVICE_PROTOCOL protocol

This protocol introduces an abstraction to access the VirtIo
Configuration and Device spaces.
The registers in these spaces are located at a different offset and have
a different width whether the transport layer is either PCI or MMIO. This
protocol would also allow to support VirtIo PCI devices with MSI-X
capability in a transparent way (Device space is at a different offset
when a PCIe device has MSI-X capability).

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
v5:
- add disclaimer (two instances) about the protocol being work in progress

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14963 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoAdd additional check mRuntimeSmbiosEntryPoint == NULL to avoid K9 error.
Elvin Li [Wed, 11 Dec 2013 08:53:19 +0000 (08:53 +0000)]
Add additional check mRuntimeSmbiosEntryPoint == NULL to avoid K9 error.

Signed-off-by: Elvin Li <elvin.li@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14962 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoCorrect INF file to make module pass ICC compiler.
Liming Gao [Wed, 11 Dec 2013 08:22:43 +0000 (08:22 +0000)]
Correct INF file to make module pass ICC compiler.

Signed-off-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14961 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoStdLib: Update Copyright Notices.
Daryl McDaniel [Tue, 10 Dec 2013 22:16:57 +0000 (22:16 +0000)]
StdLib: Update Copyright Notices.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <daryl.mcdaniel@intel.com>
Reviewed-by: Matthew Stanbro <Matthew.A.Stanbro@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14960 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoStdLib: Remove an unnecessary dependency from LibWchar.
Daryl McDaniel [Tue, 10 Dec 2013 21:42:59 +0000 (21:42 +0000)]
StdLib: Remove an unnecessary dependency from LibWchar.

LibWchar is now a standalone library which can be used independent of the rest of StdLib.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <daryl.mcdaniel@intel.com>
Reviewed-by: Matthew Stanbro <Matthew.A.Stanbro@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14959 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoShellPkg: Refactor Pipe handling
Jaben Carsey [Tue, 10 Dec 2013 18:41:35 +0000 (18:41 +0000)]
ShellPkg: Refactor Pipe handling

This moves some logic for handling command lines with pipe ‘|’ into a separate function.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14958 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoARM Packages: Removed 'inline' keyword
Olivier Martin [Tue, 10 Dec 2013 16:39:54 +0000 (16:39 +0000)]
ARM Packages: Removed 'inline' keyword

'inline' keyword is not supported by the C89 (version used by EDK2).

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14957 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPkg/AArch64Mmu.h: Fix 'Shift is >= width of type'
Olivier Martin [Tue, 10 Dec 2013 16:39:04 +0000 (16:39 +0000)]
ArmPkg/AArch64Mmu.h: Fix 'Shift is >= width of type'

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14956 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPkg/ArmDisassemblerLib: Fixed logical/bitwise operator confusion
Olivier Martin [Tue, 10 Dec 2013 16:38:17 +0000 (16:38 +0000)]
ArmPkg/ArmDisassemblerLib: Fixed logical/bitwise operator confusion

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14955 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPkg/ArmMpCoreInfo.h: Fixed macro definition
Olivier Martin [Tue, 10 Dec 2013 16:37:10 +0000 (16:37 +0000)]
ArmPkg/ArmMpCoreInfo.h: Fixed macro definition

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14954 6f19259b-4bc3-4df7-8a09-765794883524

10 years ago1. Add ISCSI iBFT CHAP types to IScsiBootFirmwareTable.h.
Fu Siyuan [Tue, 10 Dec 2013 09:14:39 +0000 (09:14 +0000)]
1. Add ISCSI iBFT CHAP types to IScsiBootFirmwareTable.h.
2. Fix ISCSI iBFT's CHAP type mismatch bug caused by 14918.

Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Dong, Guo <guo.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14953 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoPer PI 1.3 spec, when Reserved bit set in the SlaveAddress parameter, EFI_NOT_FOUND...
Elvin Li [Tue, 10 Dec 2013 01:42:56 +0000 (01:42 +0000)]
Per PI 1.3 spec, when Reserved bit set in the SlaveAddress parameter, EFI_NOT_FOUND should be returned in EFI_I2C_HOST_PROTOCOL.QueueRequest().

Signed-off-by: Elvin Li <elvin.li@intel.com>
Reviewed-by: Leahy Leroy P <leroy.p.leahy@intel.com>
Reviewed-by: Lin Jie <jie.lin@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14952 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoShellPkg: Remove invalid ASSERT
Jaben Carsey [Mon, 9 Dec 2013 23:00:21 +0000 (23:00 +0000)]
ShellPkg: Remove invalid ASSERT

There was an assumption that this API would never fail.  That is not true and the return value is checked just a few lines later.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14951 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoShellPkg: Add support for CTRL-C within shell user prompting
Jaben Carsey [Mon, 9 Dec 2013 22:55:13 +0000 (22:55 +0000)]
ShellPkg: Add support for CTRL-C within shell user prompting

This allows for the user to get out of answering a question with CTRL-C

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14950 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoRefine code to fix potential code bug.
Eric Dong [Mon, 9 Dec 2013 03:22:36 +0000 (03:22 +0000)]
Refine code to fix potential code bug.

Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14949 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoRefine code to fix potential code bug.
Eric Dong [Mon, 9 Dec 2013 03:21:29 +0000 (03:21 +0000)]
Refine code to fix potential code bug.

Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14948 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoFollow Shell specification to make sure the “command.man” file is always used no...
Shumin Qiu [Mon, 9 Dec 2013 02:24:39 +0000 (02:24 +0000)]
Follow Shell specification to make sure the “command.man” file is always used no matter “command.efi -?” or  “command -?” is typed.

Signed-off-by: Shumin Qiu <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14947 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoOvmfPkg: enable Xen specific path
Wei Liu [Sun, 8 Dec 2013 01:36:25 +0000 (01:36 +0000)]
OvmfPkg: enable Xen specific path

This patch sets PcdPciDisableBusEnumeration to true then makes use of
PublishPeiMemory and XenMemMapInitialization to construct memory map for
Xen guest.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14946 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoOvmfPkg: introduce XenMemMapInitialization
Wei Liu [Sun, 8 Dec 2013 01:36:15 +0000 (01:36 +0000)]
OvmfPkg: introduce XenMemMapInitialization

This function parses E820 map provided by Xen and arrange memory maps
accordingly.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
[jordan.l.justen@intel.com: XenGetE820Map: VS2010 compat; add assert]
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@14945 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoOvmfPkg: introduce PublishPeiMemory
Wei Liu [Sun, 8 Dec 2013 01:36:07 +0000 (01:36 +0000)]
OvmfPkg: introduce PublishPeiMemory

MemDetect actully does too many things, the underlying platform might
want to have more control over memory layout.

Extract the functionality of publishing PEI memory to a dedicated
function.

Also fixed wrong comment while I was there.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14944 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoOvmfPkg: detect Xen earlier
Wei Liu [Sun, 8 Dec 2013 01:36:00 +0000 (01:36 +0000)]
OvmfPkg: detect Xen earlier

This is useful for initializing memory map.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14943 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoOvmfPkg: define EFI_XEN_OVMF_INFO
Wei Liu [Sun, 8 Dec 2013 01:35:52 +0000 (01:35 +0000)]
OvmfPkg: define EFI_XEN_OVMF_INFO

EFI_XEN_OVMF_INFO is defined to accept configurations from hvmloader. It
must match the definition on Xen side.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14942 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoOvmfPkg: introduce E820.h
Wei Liu [Sun, 8 Dec 2013 01:35:44 +0000 (01:35 +0000)]
OvmfPkg: introduce E820.h

E820 definitions copied from IntelFrameworkModulePkg/Csm/
LegacyBiosDxe/LegacyBiosInterface.h.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14941 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoMdeModulePkg: introduce PcdPciDisableBusEnumeration
Wei Liu [Sun, 8 Dec 2013 01:35:32 +0000 (01:35 +0000)]
MdeModulePkg: introduce PcdPciDisableBusEnumeration

Platforms such as Xen already enumerates PCI bridges and devices. Use
this PCD to control EDK2 behavior.

PcdPciDisableBusEnumeration is placed under [PcdsFixedAtBuild,
PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx], so that it is
possible to alter it during runtime.

The default setting of this PCD is false (allow full PCI enumeration) to
preserve the same behavior before this change.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-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@14940 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg/ArmVExpress-RTSM-AEMv8Ax4-foundation.dsc: Remove the Monitor stacks...
Olivier Martin [Fri, 6 Dec 2013 16:13:13 +0000 (16:13 +0000)]
ArmPlatformPkg/ArmVExpress-RTSM-AEMv8Ax4-foundation.dsc: Remove the Monitor stacks PCDs

We do not have (Secure) Monitor mode on AArch64.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14939 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg/ArmPlatformStackLib: Do not directly use PcdArmPrimaryCore
Olivier Martin [Fri, 6 Dec 2013 16:12:24 +0000 (16:12 +0000)]
ArmPlatformPkg/ArmPlatformStackLib: Do not directly use PcdArmPrimaryCore

To make the code platform independent we should not use PcdArmPrimaryCore
in libraries other than the platform specific libraries.
Some platforms allow to change the primary core with external registers.
These platforms do not use PcdArmPrimaryCore to identify the primary CPU.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14938 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg: Fix and Implement ArmPlatformGetPrimaryCoreMpId
Olivier Martin [Fri, 6 Dec 2013 16:11:34 +0000 (16:11 +0000)]
ArmPlatformPkg: Fix and Implement ArmPlatformGetPrimaryCoreMpId

- Used correct PCD
- Implement the function for AArch64, BeagleBoard, CTA15A7

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14937 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoMdeModulePkg Pcd(DXE): Use correct TokenNumber to call GetPtrTypeSize () when SKU...
Star Zeng [Fri, 6 Dec 2013 09:24:47 +0000 (09:24 +0000)]
MdeModulePkg Pcd(DXE): Use correct TokenNumber to call GetPtrTypeSize () when SKU ID enabled.

In GetLocalTokenNumber () of Service.c(DXE), the TokenNumber is wrong to call GetPtrTypeSize ().
GetPtrTypeSize need the original TokenNumber.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob C Feng <bob.c.feng@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14936 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoFixes a build issue (build error 'Statement is unreachable').
Olivier Martin olivier.martin [Fri, 6 Dec 2013 02:48:51 +0000 (02:48 +0000)]
Fixes a build issue (build error 'Statement is unreachable').

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin olivier.martin@arm.com
Reviewed-by: Eric Dong <eric.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14935 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoFix comments format issue.
Jeff Fan [Fri, 6 Dec 2013 01:13:11 +0000 (01:13 +0000)]
Fix comments format issue.

Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14934 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoMdeModulePkg/Xhci: Coding style update to follow EDKII C Coding Standards Spec.
Feng Tian [Fri, 6 Dec 2013 01:12:06 +0000 (01:12 +0000)]
MdeModulePkg/Xhci: Coding style update to follow EDKII C Coding Standards Spec.

Signed-off-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14933 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoFollowing UEFI spec, update SmbiosDxe to use EfiRuntimeServicesData to put SMBIOS...
Elvin Li [Thu, 5 Dec 2013 05:30:27 +0000 (05:30 +0000)]
Following UEFI spec, update SmbiosDxe to use EfiRuntimeServicesData to put SMBIOS table. Update LegacyBiosDxe to move SMBIOS table to reserved memory for backward compatibility.

Signed-off-by: Elvin Li <elvin.li@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14932 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoCorrect file header comments for DiskIo2.h.
Ruiyu Ni [Wed, 4 Dec 2013 08:25:46 +0000 (08:25 +0000)]
Correct file header comments for DiskIo2.h.

Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14931 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoMdeModulePkg: SmmLockBox: remove wrong DepEx
Laszlo Ersek [Wed, 4 Dec 2013 08:19:02 +0000 (08:19 +0000)]
MdeModulePkg: SmmLockBox: remove wrong DepEx

The SmmLockBox driver in
"MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf" currently
specifies a DepEx on EFI_SMM_SW_DISPATCH2_PROTOCOL.

However, the driver doesn't use this protocol at all, either directly or
indirectly. It calls SmiHandlerRegister()
[MdeModulePkg/Core/PiSmmCore/Smi.c] to register SmmLockBoxHandler()
(which serves LockBox requests).

In turn, the SMM Core function SmiHandlerRegister() is also implemented
without EFI_SMM_SW_DISPATCH2_PROTOCOL.

The DepEx has been present since the initial commit of the SmmLockBox
driver (SVN r12029); it is probably superfluous. Let's remove it.

(Alternatively, we could extend OvmfPkg/EmuSmmDxe to fake this protocol,
and return EFI_UNSUPPORTED when any member is called.)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14930 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoAdd InitFlag member in DEBUG_AGENT_PHASE2_CONTEXT to pass into InitializeDebugAgentPh...
Jeff Fan [Wed, 4 Dec 2013 07:07:10 +0000 (07:07 +0000)]
Add InitFlag member in DEBUG_AGENT_PHASE2_CONTEXT to pass into InitializeDebugAgentPhase2().

Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14929 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoMdeModulePkg/AtaAtapiPassThru: Error handling enhancement for uninstalling protocol...
Feng Tian [Tue, 3 Dec 2013 07:10:56 +0000 (07:10 +0000)]
MdeModulePkg/AtaAtapiPassThru: Error handling enhancement for uninstalling protocol interface failure case

Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14928 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoMdeModulePkg/Usb: All h/w related stop operation at DriverBindingStop() should be...
Feng Tian [Tue, 3 Dec 2013 07:04:08 +0000 (07:04 +0000)]
MdeModulePkg/Usb: All h/w related stop operation at DriverBindingStop() should be behind s/w related stop operation, which could avoid h/w not working if s/w stop operation fails.

Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Elvin Li <elvin.li@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14927 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoShellPkg: Fix pci command to parse seg, bus, dev, and func arguments as hex
Chris Phillips [Mon, 2 Dec 2013 21:45:28 +0000 (21:45 +0000)]
ShellPkg: Fix pci command to parse seg, bus, dev, and func arguments as hex
- Added STR_GEN_PARAM_INV_HEX string

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chris Phillips <chrisp@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14926 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoShellPkg: Unregister all registrations
Jaben Carsey [Mon, 2 Dec 2013 19:27:45 +0000 (19:27 +0000)]
ShellPkg: Unregister all registrations

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14925 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoMdeModulePkg Pcd: Refine the code to avoid error report.
Star Zeng [Mon, 2 Dec 2013 10:18:59 +0000 (10:18 +0000)]
MdeModulePkg Pcd: Refine the code to avoid error report.

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@14924 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoUpdate DEC file and DxeImageVerificationLib to note user that ALLOW_EXECUTE_ON_SECURI...
Fu Siyuan [Mon, 2 Dec 2013 07:52:35 +0000 (07:52 +0000)]
Update DEC file and DxeImageVerificationLib to note user that ALLOW_EXECUTE_ON_SECURITY_VIOLATION is no longer supported.

Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Dong, Guo <guo.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14923 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoAdd missing ASM_PFX for HookAfterStubHeaderEnd.
Jeff Fan [Sat, 30 Nov 2013 06:33:08 +0000 (06:33 +0000)]
Add missing ASM_PFX for HookAfterStubHeaderEnd.

Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14922 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoFixed typo: HookAfterStubEnd should be HookAfterStubHeaderEnd. It will make UINIXGCC...
Jeff Fan [Fri, 29 Nov 2013 08:37:23 +0000 (08:37 +0000)]
Fixed typo: HookAfterStubEnd should be HookAfterStubHeaderEnd. It will make UINIXGCC IA32 build issue:

Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14921 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoUefiCpuPkg: Using the "movabsq" instruction to read global variable mDoFarReturnFlag...
Laszlo Ersek [Fri, 29 Nov 2013 04:44:22 +0000 (04:44 +0000)]
UefiCpuPkg: Using the "movabsq" instruction to read global variable mDoFarReturnFlag and mErrorCodeFlag to avoid page fault with big RAM sizes (> 2GB).

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14920 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoUpgrade TPM SSDT version from ACPI version 1 (ACPI 1.0 compatible) to version 2 ...
Dong Guo [Fri, 29 Nov 2013 03:39:13 +0000 (03:39 +0000)]
Upgrade TPM SSDT version from ACPI version 1 (ACPI 1.0 compatible) to version 2 (ACPI 5.0 compatible).

Signed-off-by: Dong Guo <guo.dong@intel.com>
Reviewed-by: Yao, Jiewen <jiewen.yao@intel.com>
Reviewed-by: Fu, Siyuan <siyuan.fu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14919 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoFix a bug that iSCSI UI can Not Change Authentication Type from None to CHAP.
Fu Siyuan [Fri, 29 Nov 2013 03:37:32 +0000 (03:37 +0000)]
Fix a bug that iSCSI UI can Not Change Authentication Type from None to CHAP.

Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Dong, Eric <eric.dong@intel.com>
Reviewed-by: Dong, Guo <guo.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14918 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoFix a bug in Fat driver that it asserts when OpenEx/ReadEx/WriteEx is about to return...
Ruiyu Ni [Fri, 29 Nov 2013 03:04:16 +0000 (03:04 +0000)]
Fix a bug in Fat driver that it asserts when OpenEx/ReadEx/WriteEx is about to return failure.

Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14917 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoFix input config header string error, should not always input the full config header...
Eric Dong [Fri, 29 Nov 2013 02:30:44 +0000 (02:30 +0000)]
Fix input config header string error, should not always input the full config header string.

Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14916 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPkg/BdsLib: Fixed the alignment of the relocated Device Tree
Olivier Martin [Thu, 28 Nov 2013 21:40:48 +0000 (21:40 +0000)]
ArmPkg/BdsLib: Fixed the alignment of the relocated Device Tree

When the Device Tree was loaded above the 32bit address space the operation:
*RelocatedFdt = ALIGN ((UINT64)*RelocatedFdt, (UINT32)FdtAlignment);
was returning an incorrect address.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14915 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoEmbeddedPkg/EmbeddedPkg.dec: Defined default values for PcdPrePiCpuMemorySize & PcdPr...
Olivier Martin [Thu, 28 Nov 2013 21:40:14 +0000 (21:40 +0000)]
EmbeddedPkg/EmbeddedPkg.dec: Defined default values for PcdPrePiCpuMemorySize & PcdPrePiCpuIoSize

This change introduces default values for the PCDs PcdPrePiCpuMemorySize & PcdPrePiCpuIoSize.
These values are for the architectures ARM, AARCH64, IA32 and X64.

The redefinition of these PCDs (with the same default values) have been removed from the DSC files.

Note: the default value for AARCH64 was 32. It was preventing to allocate buffer above the 32bit
address space.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14914 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPkg/DebugPeCoffExtraActionLib: Fixed the printing of the location of the EFI modules
Olivier Martin [Thu, 28 Nov 2013 21:39:46 +0000 (21:39 +0000)]
ArmPkg/DebugPeCoffExtraActionLib: Fixed the printing of the location of the EFI modules

When loaded above the 32-bit address space the address requires more than 8 characters.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14913 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg/Ds5: Update script to support System Memory above the 32bit space...
Olivier Martin [Thu, 28 Nov 2013 21:39:23 +0000 (21:39 +0000)]
ArmPlatformPkg/Ds5: Update script to support System Memory above the 32bit space on AArch64

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14912 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPkg/CpuDxe: Removed LR adjustement for SVC call
Olivier Martin [Thu, 28 Nov 2013 21:38:56 +0000 (21:38 +0000)]
ArmPkg/CpuDxe: Removed LR adjustement for SVC call

The Link Register (LR) does not need adjustement when receiving a Supervisor Call (SVC).
Note: SVC might be generated by debuggers.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14911 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg/ArmVExpressLibCTA9x4: Fixed the initial secondary core bringup when...
Olivier Martin [Thu, 28 Nov 2013 21:38:32 +0000 (21:38 +0000)]
ArmPlatformPkg/ArmVExpressLibCTA9x4: Fixed the initial secondary core bringup when remapping DRAM at 0x0

If the DRAM is remapped at 0x0 then we need to wake up the secondary cores from wfe
(waiting for the memory to be initialized) as the instruction is still in the remapped
flash region at 0x0 to make them jumping into the C-code which lives in the NOR1 at 0x44000000 before
the region 0x0 is remapped as DRAM.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14910 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoARM Packages: Removed 'Chipset/ArmV7.h' inclusion from the non-ARMv7 specific files
Olivier Martin [Thu, 28 Nov 2013 21:38:06 +0000 (21:38 +0000)]
ARM Packages: Removed 'Chipset/ArmV7.h' inclusion from the non-ARMv7 specific files

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14909 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPkg: Move definition of ArmIsArchTimerImplemented / ArmReadIdPfrN to ArmLib
Olivier Martin [Thu, 28 Nov 2013 21:37:36 +0000 (21:37 +0000)]
ArmPkg: Move definition of ArmIsArchTimerImplemented / ArmReadIdPfrN to ArmLib

These functions are not chipset specific.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14908 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg/ArmVExpressPkg: Removed unused PCDs declaration from INF file
Olivier Martin [Thu, 28 Nov 2013 21:37:10 +0000 (21:37 +0000)]
ArmPlatformPkg/ArmVExpressPkg: Removed unused PCDs declaration from INF file

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14907 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg/ArmVExpressPkg: Fixed when EDK2_ARMVE_STANDALONE is set to zero
Olivier Martin [Thu, 28 Nov 2013 21:36:17 +0000 (21:36 +0000)]
ArmPlatformPkg/ArmVExpressPkg: Fixed when EDK2_ARMVE_STANDALONE is set to zero

If EDK2_ARMVE_STANDALONE is not defined then the value is set to 1.
The developer has to explicit set the macro to zero to build a non standalone build.
It means this macro is always defined.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14906 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoMakes DxeDeferImageLoadLib not depend on
Dong Guo [Wed, 27 Nov 2013 09:08:29 +0000 (09:08 +0000)]
Makes DxeDeferImageLoadLib not depend on

Signed-off-by: Dong Guo <guo.dong@intel.com>
Reviewed-by: Ni, Ruiyu <ruiyu.ni@intel.com>
Reviewed-by: Ouyang, Qian <qian.ouyang@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14905 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoUpdate NetLibGetMacAddress() to handle the case correctly when SNP is absent.
Fu Siyuan [Wed, 27 Nov 2013 08:57:11 +0000 (08:57 +0000)]
Update NetLibGetMacAddress() to handle the case correctly when SNP is absent.

Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ni, Ruiyu <ruiyu.ni@intel.com>
Reviewed-by: Jin, Eric <eric.jin@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14904 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoFix X64 build fail.
Eric Dong [Wed, 27 Nov 2013 03:13:15 +0000 (03:13 +0000)]
Fix X64 build fail.

Signed-off-by: Eric Dong <eric.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14903 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoUpdate the logic in browser core, use config routine protocol instead of config acces...
Eric Dong [Wed, 27 Nov 2013 02:29:01 +0000 (02:29 +0000)]
Update the logic in browser core, use config routine protocol instead of config access protocol to get/set data with hii drivers.

Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14902 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoRefine the logic, keep highlight on the selectable menu, and base on priority order...
Eric Dong [Wed, 27 Nov 2013 02:27:16 +0000 (02:27 +0000)]
Refine the logic, keep highlight on the selectable menu, and base on priority order of option string/ prompt string/ text two string to highlight for a statement.

Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14901 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoFollow UEFI spec to add the definition for EFI_SPECIFICATION_VERSION, and update...
Shumin Qiu [Tue, 26 Nov 2013 07:36:29 +0000 (07:36 +0000)]
Follow UEFI spec to add the definition for EFI_SPECIFICATION_VERSION, and update other table version to refer to it. Remove the “/D TIANO_RELEASE_VERSION=0x00080006” option in Nt32Pkg DSC file, since it’s not used in source code.

Signed-off-by: Shumin Qiu <shumin.qiu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14900 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoFix Duet hang/reboot issue due to the NULL instance of CpuExceptionHandlerLib is...
Ruiyu Ni [Tue, 26 Nov 2013 05:41:34 +0000 (05:41 +0000)]
Fix Duet hang/reboot issue due to the NULL instance of CpuExceptionHandlerLib is used.

Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14899 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoCleanup unused ReportStatusCodeLib reference.
Jeff Fan [Tue, 26 Nov 2013 00:46:37 +0000 (00:46 +0000)]
Cleanup unused ReportStatusCodeLib reference.

Signed-off-by: Jeff Fan <jeff.fan@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14898 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoRefine the Secure Boot UI driver to input the GUID and varstroe name when using HiiSe...
Fu Siyuan [Mon, 25 Nov 2013 06:40:34 +0000 (06:40 +0000)]
Refine the Secure Boot UI driver to input the GUID and varstroe name when using HiiSetBrowserData/HiiGetBrowserData.

Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Dong, Eric <eric.dong@intel.com>
Reviewed-by: Dong, Guo <guo.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14897 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoMdeModulePkg BootScriptExecutorDxe: Fix S3 failure When PcdUse1GPageTable defined...
Star Zeng [Mon, 25 Nov 2013 06:20:18 +0000 (06:20 +0000)]
MdeModulePkg BootScriptExecutorDxe: Fix S3 failure When PcdUse1GPageTable defined as dynamic.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14896 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoWhen need to find varstore in the storage list, based on the extra HiiHandle to find...
Eric Dong [Mon, 25 Nov 2013 02:55:45 +0000 (02:55 +0000)]
When need to find varstore in the storage list, based on the extra HiiHandle to find the storage.

Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14895 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoRefine data copy and data compare logic.
Eric Dong [Mon, 25 Nov 2013 02:38:03 +0000 (02:38 +0000)]
Refine data copy and data compare logic.

Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14894 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoShellPkg: Add ShellHexStrToUintn to allow for simple conversion of hex numbers.
Jaben Carsey [Fri, 22 Nov 2013 21:37:34 +0000 (21:37 +0000)]
ShellPkg: Add ShellHexStrToUintn to allow for simple conversion of hex numbers.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14893 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoShellPkg: Fix pci command output of Max and Current Link Speed, and ASPM Support...
Chris Phillips [Fri, 22 Nov 2013 21:17:25 +0000 (21:17 +0000)]
ShellPkg: Fix pci command output of Max and Current Link Speed, and ASPM Support values to match PCIe Base Spec rev 3.0

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chris Phillips <chrisp@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14892 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoShellPkg: Remove trailing \r\n when redirect to env variable (EX: use ">v")
Chris Phillips [Fri, 22 Nov 2013 21:15:19 +0000 (21:15 +0000)]
ShellPkg: Remove trailing \r\n when redirect to env variable (EX: use ">v")

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chris Phillips <chrisp@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14891 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoCheck in Fat release (EBC, IA32, X64, IPF) binaries built from MdePkg and BaseTools...
Ruiyu Ni [Fri, 22 Nov 2013 08:33:17 +0000 (08:33 +0000)]
Check in Fat release (EBC, IA32, X64, IPF) binaries built from MdePkg and BaseTools (r14889), FatPkg (r80).

Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14890 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoMdeModulePkg/UsbBus&XhciDxe: Solve a bug that 2 or more tiers SS hubs with SS devices...
Feng Tian [Fri, 22 Nov 2013 07:46:00 +0000 (07:46 +0000)]
MdeModulePkg/UsbBus&XhciDxe: Solve a bug that 2 or more tiers SS hubs with SS devices may have no response.
1.Port reset process may not be proper for some vendor's SS hubs. If the corresponding port shows the reset has been done by C_RESET bit we have to skip the whole reset process for attached devices.
2.Clean C_BH_RESET bit immediately to avoid usb timer entering too many times when 5 tiers hubs are connected.
3.Stop checking URB if there is an error happened.
4.Better error handling for fast hot-plug.

Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Elvin Li <elvin.li@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14889 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoAdjust skip value when paint text two string for text opcode.
Eric Dong [Fri, 22 Nov 2013 07:14:53 +0000 (07:14 +0000)]
Adjust skip value when paint text two string for text opcode.

Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14888 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoUpdated OvmfPkg to use suitable CPU Exception Handler Library instances.
Jeff Fan [Fri, 22 Nov 2013 06:31:18 +0000 (06:31 +0000)]
Updated OvmfPkg to use suitable CPU Exception Handler Library instances.

Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14887 6f19259b-4bc3-4df7-8a09-765794883524

10 years ago1. DebugAgentLib will install reserved vector table to persist vectors.
Jeff Fan [Fri, 22 Nov 2013 06:30:01 +0000 (06:30 +0000)]
1. DebugAgentLib will install reserved vector table to persist vectors.
2. Update PeCoffExtraActionLib to detect if debug agent initialized or not by checking each IDT entry instead of whole IDT table.

Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14886 6f19259b-4bc3-4df7-8a09-765794883524

10 years ago1. Separated DxeSmmCpuExceptionHandlerLib.inf into 2 instance DxeCpuExceptionHandlerL...
Jeff Fan [Fri, 22 Nov 2013 06:24:41 +0000 (06:24 +0000)]
1. Separated DxeSmmCpuExceptionHandlerLib.inf into 2 instance DxeCpuExceptionHandlerLib.inf and SmmCpuExceptionHandlerLib.inf.
2. Updated CPU Exception Handler Library instance according to the new CPU Exception Handler Library class definitions.
3. Updated CPU Exception Handler Library instance to handle the vector attributes defined in PI 1.2.1.

Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Hot Tian <hot.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14885 6f19259b-4bc3-4df7-8a09-765794883524

10 years ago1. DxeIplPeim will locate Vector Handoff Table PPI and build GUIDed HOB if it has.
Jeff Fan [Fri, 22 Nov 2013 06:15:51 +0000 (06:15 +0000)]
1. DxeIplPeim will locate Vector Handoff Table PPI and build GUIDed HOB if it has.
2. DxeMain will get Vector Handoff Table GUIDed HOB to install configuration table if it has.
3. Updated CPU Exception Handler Library to provide 3 new APIs to replace original one API and updated NULL instance accordingly.
4. Updated DxeMain/CapsuleX64/BootSriptExectorDxe to use the new API in CPU Exception Handler Lib.

Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14884 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoTempRam Done PPI definition in PI1.2.1
Liming Gao [Fri, 22 Nov 2013 06:13:03 +0000 (06:13 +0000)]
TempRam Done PPI definition in PI1.2.1

Signed-off-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14883 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoAdd Reserve Interrupt and Exception Vectors definition defined in PI 1.2.1.
Jeff Fan [Fri, 22 Nov 2013 06:02:20 +0000 (06:02 +0000)]
Add Reserve Interrupt and Exception Vectors definition defined in PI 1.2.1.

Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14882 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoShellPkg: Correctly support "map -c"
Jaben Carsey [Thu, 21 Nov 2013 22:51:52 +0000 (22:51 +0000)]
ShellPkg: Correctly support "map -c"
When “map –c” is run, the mapped items should be displayed with the consistent name as the one listed to the left and all other names listed as “alias(s)”

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Chris Phillips <chrisp@hp.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14881 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoShellPkg: Update pci command to use ShellPrintEx()
Chris Phillips [Thu, 21 Nov 2013 17:21:59 +0000 (17:21 +0000)]
ShellPkg: Update pci command to use ShellPrintEx()
- Also minor simplification to the PciPrintClassCode() function.
- Remove invalid duplicate gShellDebug1HiiHandle argument in STR_PCI_NO_FIND print.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chris Phillips <chrisp@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14880 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoMdeModulePkg Pcd: Refine the code to avoid error report.
Star Zeng [Thu, 21 Nov 2013 09:31:28 +0000 (09:31 +0000)]
MdeModulePkg Pcd: Refine the code to avoid error report.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14879 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoFix coding style problem in RngDxe driver.
Long, Qin [Thu, 21 Nov 2013 09:02:33 +0000 (09:02 +0000)]
Fix coding style problem in RngDxe driver.

Signed-off-by: Long, Qin <qin.long@intel.com>
Reviewed-by: Fu, Siyuan <siyuan.fu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14878 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoOvmfPkg/QemuVideoDxe: don't leak descriptors returned by GetBarAttributes
Laszlo Ersek [Wed, 20 Nov 2013 22:31:14 +0000 (22:31 +0000)]
OvmfPkg/QemuVideoDxe: don't leak descriptors returned by GetBarAttributes

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14877 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoFix GCC build errors
Lee Leahy [Wed, 20 Nov 2013 19:07:31 +0000 (19:07 +0000)]
Fix GCC build errors

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14876 6f19259b-4bc3-4df7-8a09-765794883524