Commit Graph

20774 Commits

Author SHA1 Message Date
Dandan Bi c1680e885d FatPkg/EnhancedFatDxe: Make the variable name follow rule
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>
2016-12-09 11:02:08 +08:00
Dandan Bi 5d7cee9d3c FatPkg/EnhancedFatDxe: Make function prototype align with definition
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>
2016-12-09 11:02:07 +08:00
Dandan Bi 3c8b45c8ee FatPkg/EnhancedFatDxe: Use global variable replace static local variable
Create global variable "mMonthDays" to replace static local
variable "MonthDays" in FatIsValidTime() function in Misc.c.

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>
2016-12-09 11:02:07 +08:00
Dandan Bi 5163b5f8d1 FatPkg/EnhancedFatDxe: Avoid Non-Boolean type uses as Boolean
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>
2016-12-09 11:02:06 +08:00
Dandan Bi f42f22f5dd MdeModulePkg/EbcDxe: Fix incorrect Copyright format
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
2016-12-09 10:38:36 +08:00
Gary Lin 69f6787b0d ShellPkg: Assign the correct value to ShellStatus
Since the type of ShellStatus is SHELL_STATUS, we should use
SHELL_INVALID_PARAMETER instead of EFI_INVALID_PARAMETER.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Lin <glin@suse.com>
Cc: Zhang Lubo <lubo.zhang@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
2016-12-09 10:10:39 +08:00
Tapan Shah 528d74e615 ShellPkg: Add missing header line for SFO flag in 'cls' command
Adding a missing header line for 'cls -sfo' command

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hpe.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2016-12-09 09:32:51 +08:00
Chen A Chen c5c994c573 ShellPkg/Application: Fix ">v" cannot update environment variable
When ">v" is used to redirect the command output to environment
variable (e.g.: "echo xxx >v yyy"), we only called SetVariable()
to update the variable storage but forgot to update the cached
environment variables in gShellEnvVarList.
When updating the variable storage, the existing code unnecessary
saved the ending NULL character into variable storage.

The patch fixes all the above issues.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hpe.com>
2016-12-09 09:26:28 +08:00
Ruiyu Ni 8537bd7ef6 MdeModulePkg/BdsDxe: Initialize gConnectConInEvent earlier
PlatformBootManagerBeforeConsole() might want to trigger this event
to connect ConIn so BdsDxe initializes this event before
PlatformBootManagerBeforeConsole().

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Sunny Wang <sunnywang@hpe.com>
Cc: Chao B Zhang <chao.b.zhang@intel.com>
2016-12-08 10:11:01 +08:00
Michael Kinney c497dcc8e5 Vlv2TbltDevicePkg/PlatformInitPei: Better SMRAM size alignment
https://bugzilla.tianocore.org/show_bug.cgi?id=260

Update workaround to be more generic.

* Search for the largest region between 1MB and 4GB
* Find all adjacent regions to compute total size
* Minimum aligned size if 4KB
* Mark extended region to align size as EFI_ALLOCATED
* If an adjacent EFI_ALLOCATED region is present, then
  increase the size of the adjacent region.
* If adjacent EFI_ALLOCATED region is not present, then
  allocate a new HOB with one extra entry to describe
  the extended region to align the total size.  Preserve
  the last entry in the descriptor list for compatibility.

This is a workaround until the binary module that produces the
gEfiSmmPeiSmramMemoryReserveGuid HOB is updated

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: David Wei <david.wei@intel.com>
Cc: Mang Guo <mang.guo@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2016-12-07 08:57:06 -08:00
Ard Biesheuvel a42e6d448d MdeModulePkg: implement generic PCI I/O driver for non-discoverable devices
This implements support for non-discoverable PCI compatible devices, i.e,
devices that are not on a PCI bus but that can be controlled by generic PCI
drivers in EDK2.

This is implemented as a UEFI driver, which means we take full advantage
of the UEFI driver model, and only instantiate those devices that are
necessary for booting.

Care is taken to deal with DMA addressing limitations: DMA mappings and
allocations are moved below 4 GB if the PCI driver has not informed us
that the device being driven is 64-bit DMA capable. DMA is implemented as
coherent, support for non-coherent DMA is implemented by a subsequent patch.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Tested-by: Marcin Wojtas <mw@semihalf.com>
2016-12-07 09:45:56 +00:00
Ard Biesheuvel 1652dc2158 MdeModulePkg: introduce helper library to register non-discoverable devices
Non-discoverable devices need to be registered explicitly by the platform.
Introduce a helper library that takes care of this.

This implementation currently only supports registering devices that are
covered by one or more MMIO resources. The underlying protocol allows for
more flexibility than that, but this is currently sufficient for the use
cases that we know about.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Tested-by: Marcin Wojtas <mw@semihalf.com>
2016-12-07 09:01:27 +00:00
Ard Biesheuvel 9598cdc292 MdeModulePkg: introduce non-discoverable device protocol
Introduce a protocol that can be exposed by a platform for devices that
are not discoverable, usually because they are wired straight to the
memory bus rather than to an enumerable bus like PCI or USB.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Tested-by: Marcin Wojtas <mw@semihalf.com>
2016-12-07 09:01:27 +00:00
Zhang Lubo 5a066b87bd MdeModulePkg: Fix assert in iSCSI.
The bug is caused by using already freed memory.
If there is already an attempt and execute
'reconnect -r' command, all the ConfigFormEntry structure
will be freed in IScsiDriverBindingStop, but the
mCallbackInfo->Current is not configured as null and
this pointer will be used again in IScsiFormExtractConfig.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
2016-12-07 16:13:11 +08:00
Michael Kinney 854c6b80dc UefiCpuPkg/PiSmmCpuDxeSmm: Remove MTRR field from PSD
https://bugzilla.tianocore.org/show_bug.cgi?id=277

The MTRR field was removed from PROCESS_SMM_DESCRIPTOR
structure in commit:

26ab5ac362

However, the references to the MTRR field in assembly
files were not removed.  Remove the extern reference
to gSmiMtrr and set the Reserved14 field
of PROCESS_SMM_DESCRIPTOR to 0.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
2016-12-06 23:34:16 -08:00
Michael Kinney a6b7bc7a87 UefiCpuPkg/PiSmmCpuDxeSmm: Always initialze PSD
The following commit moved the initialization of the
default PROCESSOR_SMM_DESCRIPTOR from MpService.c to
SmramSaveState.c and made this initialization
conditional on the value returned by the
SmmCpuFeaturesGetSmiHandlerSize() library function.

f12367a0b1

This changed the behavior of the PiSmmCpuDxeSmm module.
The initialization of the PROCESSOR_SMM_DESCRIPTOR is
moved before the call to SmmCpuFeaturesGetSmiHandlerSize()
to preserve the previous behavior.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
2016-12-06 23:26:31 -08:00
Jiewen Yao e4435f710c UefiCpuPkg/PiSmmCpu: Fixed #double fault on #page fault.
This patch fixes https://bugzilla.tianocore.org/show_bug.cgi?id=246

Previously, when SMM exception happens after EndOfDxe,
with StackGuard enabled on IA32, the #double fault exception
is reported instead of #page fault.

Root cause is below:

Current EDKII SMM page protection will lock GDT.
If IA32 stack guard is enabled, the page fault handler will do task switch.
This task switch need write busy flag in GDT, and write TSS.

However, the GDT and TSS is locked at that time, so the
double fault happens.

We decide to not lock GDT for IA32 StackGuard enabled.

This issue does not exist on X64, or IA32 without StackGuard.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
2016-12-07 13:13:55 +08:00
Jiewen Yao f1afa0a92d MdeModulePkg/PiSmmCore: use EfiPagesToSize to prevent build error.
EFI_PAGES_TO_SIZE only handles UINTN, so we use EfiPagesToSize
to handle UINT64.

Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
2016-12-07 13:13:54 +08:00
Jiewen Yao 92b126ae3d MdeModulePkg/PiSmmCore; Use DEBUG_WARN for non 4k aligned image.
Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
2016-12-07 13:13:53 +08:00
Jiewen Yao 026e2ca2c3 MdeModulePkg/PiSmmCore: MemoryAttributeTable need keep non-PE record.
Current memory attribute table implementation will only mark PE code
to be EfiRuntimeServicesCode, and mark rest to be EfiRuntimeServicesData.

However, there might be a case that a SMM code wants to allocate
EfiRuntimeServicesCode explicitly to let page table protect this region
to be read only. It is unsupported.

This patch enhances the current solution so that MemoryAttributeTable
does not touch non PE image record.
Only the PE image region is forced to be EfiRuntimeServicesCode for
code and EfiRuntimeServicesData for data.

Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
2016-12-07 13:13:51 +08:00
Jiewen Yao 5f4d3e1794 MdeModulePkg/PiSmmCore: AllocatePool should use MemoryType.
PiSmmCore supports page level protection based upon the Memory Type
(EfiRuntimeServicesCode/EfiRuntimeServicesData) and PE image.

However, the Memory Type information is ignored in AllocatePool().
If a caller calls AllocatePool with EfiRuntimeServicesCode,
the final memory is still allocated as EfiRuntimeServicesData.

This patch supports AllocatePool with EfiRuntimeServicesCode.

Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
2016-12-07 13:13:50 +08:00
Anthony PERARD 432f1d83f7 OvmfPkg/build.sh: Use GCC49 toolchains with GCC 6.[0-2]
The goal of the patch is to avoid using -flto with GCC 6.0 to 6.2.

This is to workaround a GCC bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70955

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
2016-12-06 18:00:56 +01:00
Anthony PERARD 6ad157c3fa OvmfPkg/XenHypercallLib: Add EFIAPI
Because EFIAPI is necessary for functions declared in library class header
files.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Build-tested-by: Laszlo Ersek <lersek@redhat.com>
2016-12-06 18:00:32 +01:00
Dandan Bi 919278054f MdeModulePkg/SetupBrowserDxe: Fix incorrect local variable used
https://bugzilla.tianocore.org/show_bug.cgi?id=280

Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
2016-12-06 18:41:43 +08:00
Dandan Bi d138a2e987 MdeModulePkg/EbcDxe: Add comments for functions
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Pete Batard <pete@akeo.ie>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jiewen.yao@intel.com
2016-12-06 18:40:19 +08:00
Dandan Bi 532daaed0d MdeModulePkg/EbcDxe: Avoid Non-Boolean type used as Boolean
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Pete Batard <pete@akeo.ie>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jiewen.yao@intel.com
2016-12-06 18:40:19 +08:00
Dandan Bi 3e118ea87d MdeModulePkg/EbcDxe: Make the variable name follow rules
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Pete Batard <pete@akeo.ie>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jiewen.yao@intel.com
2016-12-06 18:40:15 +08:00
Dandan Bi 8fd543c77a MdeModulePkg/EbcDxe: Initialize variable after declaration
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Pete Batard <pete@akeo.ie>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jiewen.yao@intel.com
2016-12-06 18:40:14 +08:00
Dandan Bi e8a5ac7c49 MdeModulePkg/EbcDxe: Make the comments align with EDKII coding style
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Pete Batard <pete@akeo.ie>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jiewen.yao@intel.com
2016-12-06 18:40:13 +08:00
Zhang Lubo 445d200762 ShellPkg: Add error prompt message in Ifconfig6 command.
v2: update the prompt message more readable.

It should display error prompt message when Ifconfig6 can
not configure correctly.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed by : Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
2016-12-06 18:37:50 +08:00
Jiaxin Wu aa63a86601 NetworkPkg/IpSecDxe: correct one comment and remove the unused buf
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Zhang Lubo <lubo.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
2016-12-06 18:37:25 +08:00
Leif Lindholm 46d4b181bb Vlv2TbltDevicePkg: 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 Vlv2TbltDevicePkg to use the
MdeModulePkg versions instead.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: David Wei <david.wei@intel.com>
2016-12-06 09:18:51 +00:00
Ruiyu Ni 77557b7642 MdeModulePkg/PciSioSerial: Fix bad EOL
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
2016-12-06 17:08:07 +08:00
Ruiyu Ni ea99ba10ff PcAtChipsetPkg/PcRtc: Fix bad EOL
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
2016-12-06 17:07:47 +08:00
Michael Kinney e2df7a3d39 Vlv2TbltDevicePkg: Update PlatformPkgGccX64.dsc
Update PlatformPkgGccX64.dsc to align with PlatformPkgX64.dsc
on library mappings and PCD settings.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: David Wei <david.wei@intel.com>
Cc: Mang Guo <mang.guo@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2016-12-05 13:48:22 -08:00
Michael Kinney ed5b911049 Vlv2TbltDevicePkg/PlatformBdsLib: Add DebugAgent Console
https://bugzilla.tianocore.org/show_bug.cgi?id=276

Add the UART console produced by the DebugAgent when
SOURCE_DEBUG_ENABLE is TRUE.  Without this change, the
debugger connects but the Boot Manager and the UEFI
Shell do not have an active console because the Boot
Manager does not know about the DebugAgent UART
Console device path and the Debug Agent is using the
UART device.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: David Wei <david.wei@intel.com>
Cc: Mang Guo <mang.guo@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2016-12-05 13:48:14 -08:00
Michael Kinney 75c9d31c71 Vlv2TbltDevicePkg: Fix SOURCE_DEBUG_ENABLE feature
https://bugzilla.tianocore.org/show_bug.cgi?id=276

Fix library mapping and PCD settings required to use
the SOURCE_DEBUG_ENABLE feature in PEI, DXE, and SMM.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: David Wei <david.wei@intel.com>
Cc: Mang Guo <mang.guo@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2016-12-05 13:48:09 -08:00
Michael Kinney 3d2b3be0b7 Vlv2TbltDevicePkg: Make !if statement usage consistent
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: David Wei <david.wei@intel.com>
Cc: Mang Guo <mang.guo@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2016-12-05 13:48:02 -08:00
Laszlo Ersek 2c8dcbc65a OvmfPkg/QemuFwCfgLib: support QEMU's DMA-like fw_cfg access method
The benefits of the DMA-like access method are (a) speed, (b) write
support in QEMU 2.9+.

(IOPort-based write support was discontinued in QEMU 2.4, and the
DMA-based one is being added to QEMU 2.9. Write support needs no separate
feature detection because writeability is governed on the level of
individual fw_cfg files -- if a file meant to be written by the firmware
exists in the directory, then it is writeable with the DMA method.)

We don't enable this feature for the SEC library instance, because:
- the SEC instance remains without clients (I've checked that it builds
  though),
- in SEC, any possible fw_cfg use is expected to be small and read-only.

Cc: 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>
2016-12-05 19:44:56 +01:00
Laszlo Ersek d61a5f45a9 ArmVirtPkg/QemuFwCfgLib: rebase lib instance to updated lib class header
Put the FW_CFG_F_DMA constant, introduced in the last patch, to use.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2016-12-05 19:44:52 +01:00
Laszlo Ersek be0eaf42ef OvmfPkg/QemuFwCfgLib: extend lib class header with more definitions
The last patch consists purely of code movement; going forward, we should
use a few more symbolic constants.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2016-12-05 19:44:44 +01:00
Laszlo Ersek de01f72cc7 ArmVirtPkg, OvmfPkg: QemuFwCfgLib: move DMA-related defs to lib class
Move the type and macro definitions related to QEMU's DMA-like fw_cfg
access method to the library class header.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2016-12-05 19:44:36 +01:00
Laszlo Ersek 5297c0bf83 OvmfPkg/QemuFwCfgLib: move InternalQemuFwCfgIsAvailable() to lib instances
InternalQemuFwCfgIsAvailable() is an API that is incorrectly exposed by
the "OvmfPkg/Include/Library/QemuFwCfgLib.h" library class header; the API
is meant to be used internally to library instances (if it's needed at
all).

In OvmfPkg, we have two lib instances (for SEC and PEI/DXE); they provide
different implementations of InternalQemuFwCfgIsAvailable(), for the
shared file "OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c". Move the API
declaration to a new internal header called "QemuFwCfgLibInternal.h", and
drop EFIAPI in the process.

Cc: 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>
2016-12-05 19:44:34 +01:00
Laszlo Ersek 1cb33be961 ArmVirtPkg/QemuFwCfgLib: remove superfluous InternalQemuFwCfgIsAvailable()
InternalQemuFwCfgIsAvailable() is an API that is incorrectly exposed by
the "OvmfPkg/Include/Library/QemuFwCfgLib.h" library class header; the API
is meant to be used internally to library instances (if it's needed at
all). ArmVirtPkg's instance has no use for it actually, so simplify the
code and remove the function definition.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
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: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2016-12-05 19:44:15 +01:00
Leif Lindholm 209b8f3c27 Omap35xxPkg, BeagleBoardPkg: Use Pcd for INTERRUPT_BASE
The base address for the interrupt controller is hard-coded in
Omap3530Interrupt.h, although Omap35xxPkg/InterruptDxe appears to
have initially intended to make use of PcdInterruptBaseAddress from
EmbeddedPkg. Move it to use said Pcd, and also declare use of it in
BeagleBoardLib, which makes a direct access.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2016-12-05 17:21:40 +00:00
Leif Lindholm 2c1cc12931 EmbeddedPkg: 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 EmbeddedPkg to use the
MdeModulePkg versions instead.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2016-12-05 15:53:30 +00:00
Leif Lindholm 532e7cf44f BeagleBoardPkg: 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 BeagleBoardPkg to use the
MdeModulePkg versions instead.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2016-12-05 15:53:11 +00:00
Liming Gao bb34cc8c38 MdeModulePkg PiSmmCore: Update comments in InitializeMemoryServices
Add the comments to describe Free and Allocated SMRAM are added separately.

Cc: Star Zeng <star.zeng@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2016-12-05 15:14:34 +08:00
Zeng, Star 60131098f3 IntelFsp2Pkg: 41d739e breaks flat tree build
There may be no environment variable PACKAGES_PATH defined
in flat tree, then 41d739e breaks flat tree build.
This patch is to update GenCfgOpt.py to be compatible with
both flat tree and package path build.

Cc: Richard Thomaiyar <richard.marian.thomaiyar@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Richard Thomaiyar <richard.marian.thomaiyar@intel.com>
Tested-by: Richard Thomaiyar <richard.marian.thomaiyar@intel.com>
2016-12-05 14:17:23 +08:00
Hao Wu 3883e2cb52 BaseTools/VolInfo: Fix printf issue using '%ls' in format string
https://bugzilla.tianocore.org/show_bug.cgi?id=257

For GCC compilers, when building with option '-fshort-wchar', wide char
string format '%ls' does not work properly for printf() function. The
string specified by '%ls' will not be printed.

This commit avoids using '%ls' for printf() function and converts the wide
char string to char string for printing.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-12-05 09:48:28 +08:00