]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
9 years agoShellPkg: Remove IntelFramweorkModulePkg as Shell library dependency
jaben carsey [Tue, 16 Dec 2014 17:50:57 +0000 (17:50 +0000)]
ShellPkg: Remove IntelFramweorkModulePkg as Shell library dependency

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: jaben carsey <jaben.carsey@intel.com>
Reviewed-by: Tim Lewis <tim.lewis@insyde.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hp.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16526 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoShellPkg: Code refine. Add error handling code to check pointer and remove redundant...
Qiu Shumin [Tue, 16 Dec 2014 02:52:00 +0000 (02:52 +0000)]
ShellPkg: Code refine. Add error handling code to check pointer and remove redundant 'ASSERT'.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <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@16525 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoArmPlatformPkg: Fixed build
Olivier Martin [Mon, 15 Dec 2014 11:13:44 +0000 (11:13 +0000)]
ArmPlatformPkg: Fixed build

The original patch was assuming PathLib moved to MdeModulePkg.

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

9 years agoMdePkg: Add deprecate flag for the functions which has a replace function in safe...
Eric Dong [Mon, 15 Dec 2014 10:05:42 +0000 (10:05 +0000)]
MdePkg: Add deprecate flag for the functions which has a replace function in safe c library.

Contributed-under: TianoCore Contribution Agreement 1.0
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@16521 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoMdeModulePke: PeiCore FirmwareVolmeInfoPpiNotifyCallback ()issue
Liming Gao [Mon, 15 Dec 2014 09:36:46 +0000 (09:36 +0000)]
MdeModulePke: PeiCore FirmwareVolmeInfoPpiNotifyCallback ()issue

PeiCore FirmwareVolmeInfoPpiNotifyCallback() should check FvCount when new one is added.
Now, this check is the entry of Notify function that is too early, because PeiCore will
install FvInfo and FvInfo2 both for one sub FV image and trig FvNotify function twice for the same FV images.

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

9 years agoEliminate the variable.
Laszlo Ersek [Mon, 15 Dec 2014 08:00:40 +0000 (08:00 +0000)]
Eliminate the variable.

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

9 years agoArmPkg/AsmMacroIoLib: Fixed the global variables initialization
Olivier Martin [Fri, 12 Dec 2014 19:32:50 +0000 (19:32 +0000)]
ArmPkg/AsmMacroIoLib: Fixed the global variables initialization

The top of the stack always points to 'stack_base + stack_size'.
But the stack pointer is decremented before writing to the stack.
It means the top byte of the stack is actually 'stack_base + stack_size - 1'.

The initialization should also decrement the stack pointer before
zero'ing the memory (pre-indexed addressing).

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

9 years agoArmPkg/BdsLib: Update the size of the Device Tree before booting Linux
Olivier Martin [Fri, 12 Dec 2014 19:15:37 +0000 (19:15 +0000)]
ArmPkg/BdsLib: Update the size of the Device Tree before booting Linux

The memory reserved to load the device tree is over-allocated when
UEFI loads the blob to update the device tree with additional
information such as the command line, the initrd, etc.

This change ensures the total size declared by the device tree matches
the actual data (and not the over-allocated size value).

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

9 years agoArmPkg/BdsLib: Rework TFTP boot
Ronald Cron [Fri, 12 Dec 2014 19:14:22 +0000 (19:14 +0000)]
ArmPkg/BdsLib: Rework TFTP boot

Rework the downloading of an image from a TFTP server to do not
depend on any "PXE specific" setting of the DHCP server.

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

9 years agoArmPlatformPkg/Bds: Test if OptionalData is NULL before using it
Olivier Martin [Fri, 12 Dec 2014 19:13:04 +0000 (19:13 +0000)]
ArmPlatformPkg/Bds: Test if OptionalData is NULL before using it

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

9 years agoArmPlatformPkg/Bds: Fixed memory leak
Olivier Martin [Fri, 12 Dec 2014 19:11:56 +0000 (19:11 +0000)]
ArmPlatformPkg/Bds: Fixed memory leak

Device Paths were not freed after calling
BDS_LOAD_OPTION_SUPPORT.CreateDevicePathNode()

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

9 years agoArmPkg/GenericWatchdogDxe: Set up the watchdog timeout relatively to the system counter
Ronald Cron [Fri, 12 Dec 2014 19:10:58 +0000 (19:10 +0000)]
ArmPkg/GenericWatchdogDxe: Set up the watchdog timeout relatively to the system counter

Use the system counter to compute the watchdog compare
value as the watchdog compare value is compared to the
system counter to check if the watchdog timeout expired or not.

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

9 years agoArmPlatformPkg/ArmJunoPkg: Move the watchdog generic driver to ArmPkg/Drivers
Ronald Cron [Fri, 12 Dec 2014 19:09:24 +0000 (19:09 +0000)]
ArmPlatformPkg/ArmJunoPkg: Move the watchdog generic driver to ArmPkg/Drivers

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

9 years agoArmPlatformPkg/BootMonFs: Fix the setting of information about a file
Ronald Cron [Fri, 12 Dec 2014 19:06:10 +0000 (19:06 +0000)]
ArmPlatformPkg/BootMonFs: Fix the setting of information about a file

Rework the setting of information about a file, in particular
file resizing, file renaming and the returned error codes in case
of error. This rework has implied a rework of the read, write, close
and flush functions.

To strickly separate what has been actually written to the media (flushed)
from what has not been written when a file is open, an "Info" field has
been added to the description of a file.

The field is used to store the modifications done to the file by the
means of SetInfo() like the change of the name or of the size. Such
changes are written to the media only when a flush occurs.

When a file is open, the information pointed to by the "Info" field is
always up-to-date. This is not the case of the information stored in
the "HwDescription" of the file description which from now is just a
mirror of what is written on the media.

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

9 years agoArmPlatformPkg/BootMonFs: Fix error codes returned by Open() and Read()
Ronald Cron [Fri, 12 Dec 2014 19:03:30 +0000 (19:03 +0000)]
ArmPlatformPkg/BootMonFs: Fix error codes returned by Open() and Read()

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

9 years agoArmPlatformPkg/ArmVirtualizationPkg: Removed compiler family to the AArch64 assembly...
Olivier Martin [Fri, 12 Dec 2014 19:00:37 +0000 (19:00 +0000)]
ArmPlatformPkg/ArmVirtualizationPkg: Removed compiler family to the AArch64 assembly files

LLVM/ARMCC6 supports GNU assembly language.

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

9 years agoArmPlatformPkg: The toolchain family name can be omitted if the options are common
Olivier Martin [Fri, 12 Dec 2014 18:58:47 +0000 (18:58 +0000)]
ArmPlatformPkg: The toolchain family name can be omitted if the options are common

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

9 years agoAdd TPM2 commands which might be used in field upgrade.
Yao, Jiewen [Fri, 12 Dec 2014 04:34:19 +0000 (04:34 +0000)]
Add TPM2 commands which might be used in field upgrade.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Dong, Guo" <guo.dong@intel.com>
Reviewed-by: "Long, Qin" <qin.long@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16505 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoMdeModulePkg DxeCore: Remove @retval function comments for CoreUpdateMemoryAttributes().
Star Zeng [Fri, 12 Dec 2014 03:19:47 +0000 (03:19 +0000)]
MdeModulePkg DxeCore: Remove @retval function comments for CoreUpdateMemoryAttributes().

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

9 years agoMdeModulePkg DXE FpdtStatusCodeHandler: Check Boolean value in if statement.
Liming Gao [Fri, 12 Dec 2014 03:17:55 +0000 (03:17 +0000)]
MdeModulePkg DXE FpdtStatusCodeHandler: Check Boolean value in if statement.

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

9 years agoMdeModulePkg/DxeCore: Fixed compiler error 'enumerated type mixed with another type'
Olivier Martin [Fri, 12 Dec 2014 02:01:54 +0000 (02:01 +0000)]
MdeModulePkg/DxeCore: Fixed compiler error 'enumerated type mixed with another type'

ARM Toolchain raises a warning/error when an integer is used instead
of a enum value.

Contributed-under: TianoCore Contribution Agreement 1.0

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

9 years agoRefine code to follow edkii coding style.
Dong Eric [Fri, 12 Dec 2014 00:45:05 +0000 (00:45 +0000)]
Refine code to follow edkii coding style.

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

9 years agoMdeModulePkg: Update the device path info for the storage when former drivers not...
Eric Dong [Thu, 11 Dec 2014 08:03:19 +0000 (08:03 +0000)]
MdeModulePkg: Update the device path info for the storage when former drivers not provide it.

Contributed-under: TianoCore Contribution Agreement 1.0
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@16499 6f19259b-4bc3-4df7-8a09-765794883524

9 years agocorrect a data type error.
Dong Guo [Thu, 11 Dec 2014 06:34:57 +0000 (06:34 +0000)]
correct a data type error.

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Dong Guo <guo.dong@intel.com>
Reviewed-by: Dong Eric <eric.dong@intel.com>
Reviewed-by: Long Qin <qin.long@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16498 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoMdeModulePke: DxeCore NotifyFwVolBlock() function issue
Liming Gao [Wed, 10 Dec 2014 08:45:44 +0000 (08:45 +0000)]
MdeModulePke: DxeCore NotifyFwVolBlock() function issue

Fix DxeCore NotifyFwVolBlock() function to make sure FV protocol is installed for all valid PI FV images.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Guo Dong <guo.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16496 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoFix potential NULL pointer dereference issue in TcgDxe & TreeDxe.
Chao Zhang [Wed, 10 Dec 2014 08:21:05 +0000 (08:21 +0000)]
Fix potential NULL pointer dereference  issue in TcgDxe & TreeDxe.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Guo Dong <guo.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16494 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoAdd failed image Name in the Image Execution Information Table.
Dong Guo [Wed, 10 Dec 2014 08:09:20 +0000 (08:09 +0000)]
Add failed image Name in the Image Execution Information Table.

Contributed-under: TianoCore Contribution Agreement 1.0

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

9 years agoUpdate the build option to eliminate possible build warning for IPF platform.
Qin Long [Wed, 10 Dec 2014 08:05:42 +0000 (08:05 +0000)]
Update the build option to eliminate possible build warning for IPF platform.

Contributed-under: TianoCore Contribution Agreement 1.0

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

9 years agoAdd HobLib DXE instance for SMM_CORE.
Jeff Fan [Wed, 10 Dec 2014 02:24:50 +0000 (02:24 +0000)]
Add HobLib DXE instance for SMM_CORE.

Contributed-under: TianoCore Contribution Agreement 1.0
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@16488 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoBaseTools/ECC: Fix some issues of ECC tool
Hess Chen [Tue, 9 Dec 2014 06:41:58 +0000 (06:41 +0000)]
BaseTools/ECC: Fix some issues of ECC tool

Add support for the usage which is defined in the above line for a Protocol/Ppi/Guid
Add support for “!ERROR”
Ignore issue of parsing a macro

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hess Chen <hesheng.chen@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16487 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoChecking if gSmmCorePrivate->CommunicationBuffer is in supported physical address...
Jeff Fan [Tue, 9 Dec 2014 02:20:16 +0000 (02:20 +0000)]
Checking if gSmmCorePrivate->CommunicationBuffer is in supported physical address scope.

If CommunicationBuffer is not in valid address scope, return EFI_INVALID_PARAMETER.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <Jeff.fan@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16486 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoMove EndOfPei signal earlier before giving control back to FspInitDone.
Yao, Jiewen [Sat, 6 Dec 2014 01:05:19 +0000 (01:05 +0000)]
Move EndOfPei signal earlier before giving control back to FspInitDone.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Rangarajan, Ravi P" <ravi.p.rangarajan@intel.com>
Reviewed-by: "Ma, Maurice" <maurice.ma@intel.com>
Reviewed-by: "Mudusuru, Giri P" <giri.p.mudusuru@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16480 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoAdded missing gFspBootLoaderTemporaryMemoryGuid to the FspPlatformLib.inf.
Yao, Jiewen [Sat, 6 Dec 2014 00:31:40 +0000 (00:31 +0000)]
Added missing gFspBootLoaderTemporaryMemoryGuid to the FspPlatformLib.inf.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Rangarajan, Ravi P" <ravi.p.rangarajan@intel.com>
Reviewed-by: "Ma, Maurice" <maurice.ma@intel.com>
Reviewed-by: "Mudusuru, Giri P" <giri.p.mudusuru@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16479 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoUpdated FspApiEntry.asm/.s to auto detect the size of the MCU region.
Yao, Jiewen [Sat, 6 Dec 2014 00:29:04 +0000 (00:29 +0000)]
Updated FspApiEntry.asm/.s to auto detect the size of the MCU region.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Rangarajan, Ravi P" <ravi.p.rangarajan@intel.com>
Reviewed-by: "Ma, Maurice" <maurice.ma@intel.com>
Reviewed-by: "Mudusuru, Giri P" <giri.p.mudusuru@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16478 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoShellBinPkg: Ia32/X64 Shell binary update.
Qiu Shumin [Fri, 5 Dec 2014 02:33:45 +0000 (02:33 +0000)]
ShellBinPkg: Ia32/X64 Shell binary update.

The binaries of ShellBinPkg are generated with ShellPkg project 16473. The binaries are built with no debug information by building with "RELEASE" target.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16477 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoSpecify little-endian, and then use the “Standard size” from the chart.
Yao, Jiewen [Fri, 5 Dec 2014 00:28:11 +0000 (00:28 +0000)]
Specify little-endian, and then use the “Standard size” from the chart.

Enhance python tool.
The default being native size (and alignment) means by default the standard sizes are not used, which might cause different behavior on difference compiler.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Andrew Fish" <afish@apple.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16476 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoFix typo.
Yao, Jiewen [Thu, 4 Dec 2014 06:03:58 +0000 (06:03 +0000)]
Fix typo.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Rangarajan, Ravi P" <ravi.p.rangarajan@intel.com>
Reviewed-by: "Ma, Maurice" <maurice.ma@intel.com>
Reviewed-by: "Mudusuru, Giri P" <giri.p.mudusuru@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16475 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoproperly support GCC - pass 'I' (int) rather than 'L' (long) to struct.unpack.
Yao, Jiewen [Thu, 4 Dec 2014 06:01:15 +0000 (06:01 +0000)]
properly support GCC - pass 'I' (int) rather than 'L' (long) to struct.unpack.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Rangarajan, Ravi P" <ravi.p.rangarajan@intel.com>
Reviewed-by: "Ma, Maurice" <maurice.ma@intel.com>
Reviewed-by: "Mudusuru, Giri P" <giri.p.mudusuru@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16474 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoShellPkg: Connect all the consoles in "reconnect -r".
Qiu Shumin [Thu, 4 Dec 2014 01:18:04 +0000 (01:18 +0000)]
ShellPkg: Connect all the consoles in "reconnect -r".

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <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@16473 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoNetworkPkg: Source fixes and cleanup for ARMGCC compiles
Randy Pawell [Thu, 4 Dec 2014 00:55:50 +0000 (00:55 +0000)]
NetworkPkg: Source fixes and cleanup for ARMGCC compiles

- Fix EFI_IPv4_ADDRESS usages to use a macro to copy the structure
   instead of direct assignment, to avoid runtime alignment errors.
- Delete excess local variables that are initialized but otherwise unused.
- Add LibraryClasses.ARM & AARCH64 section in NetworkPkg.dsc file,
   containing a CompilerIntrinsicsLib null-library, required for successful
  standalone package builds (copied from MdeModulePkg.dsc).

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Randy Pawell <randy_pawell@hp.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16472 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoMdeModulePkg: Source fixes and cleanup for ARMGCC compiles
Randy Pawell [Thu, 4 Dec 2014 00:32:24 +0000 (00:32 +0000)]
MdeModulePkg: Source fixes and cleanup for ARMGCC compiles

- Fix EFI_IPv4_ADDRESS usages to use a macro to copy the structure
  instead of direct assignment, to avoid runtime alignment errors.
- Fix a EFI_INPUT_KEY usage in TerminalDxe to use CopyMem()  to copy the
   structure instead of direct assignment, to avoid runtime alignment error.
- Delete excess local variables that are initialized but otherwise unused.
- CompilerIntrinsicsLib library now imported for AARCH64, as well as ARM.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Randy Pawell <randy_pawell@hp.com>
Reviewed-by: Olivier Martin <Olivier.Martin@arm.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16471 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoMdeModulePkg: Unregister DXE FpdtStatusCodeHandler.
Liming Gao [Wed, 3 Dec 2014 15:34:08 +0000 (15:34 +0000)]
MdeModulePkg: Unregister DXE FpdtStatusCodeHandler.

DXE FpdtStatusCodeHandler is required to be unregistered even if StatusCodeReport is disabled. This change makes sure FpdtStatusCodeHandler be always unregistered.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Vincent Zimmer <vincent.zimmer@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16470 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoFix a regression bug to uni parser.
Yingke Liu [Wed, 3 Dec 2014 08:30:56 +0000 (08:30 +0000)]
Fix a regression bug to uni parser.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <yingke.d.liu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16469 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoCode clean-up to eliminate potential "dereferenced pointer" warning.
Qin Long [Wed, 3 Dec 2014 07:40:32 +0000 (07:40 +0000)]
Code clean-up to eliminate potential "dereferenced pointer" warning.

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Qin Long <qin.long@intel.com>
Reviewed-by: Guo Dong <guo.dong@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16468 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoStdLib/BsdSocketLib: Fix function declaration mismatch with definition.
Bruce Cran [Tue, 2 Dec 2014 21:30:41 +0000 (21:30 +0000)]
StdLib/BsdSocketLib: Fix function declaration mismatch with definition.

Replace the existing old-style function declarations for Field, cvtbase and spectHex in BsdSocketLib with real prototypes.  This allows StdLib to build using the GCC48 toolchain.

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

9 years agoFix memory leak in Ip4Config.
Samer El-Haj-Mahmoud [Tue, 2 Dec 2014 01:51:37 +0000 (01:51 +0000)]
Fix memory leak in Ip4Config.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hp.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Tian Feng <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16465 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoFix ARM build failure with gcc 4.6.
Scott Duplichan [Tue, 2 Dec 2014 00:44:04 +0000 (00:44 +0000)]
Fix ARM build failure with gcc 4.6.

Gcc option -mno-unaligned-access is supported by gcc 4.7 and newer, so it shouldn't be used with gcc 4.6.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Scott Duplichan <scott@notabs.org>
Reviewed-by: Yingke Liu <yingke.d.liu@intel.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16464 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoEnhance error handling for external tool.
Yingke Liu [Mon, 1 Dec 2014 08:22:07 +0000 (08:22 +0000)]
Enhance error handling for external tool.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <yingke.d.liu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16458 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoPerformancePkg: Update comments on TscTimerLib
Liming Gao [Mon, 1 Dec 2014 08:17:51 +0000 (08:17 +0000)]
PerformancePkg: Update comments on TscTimerLib

TscTimerLib is a sample implementation that depends on chipset ACPI timer.

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

9 years agoCorrected slash and quote handling in the strings of UNI files.
Cecil Sheng [Mon, 1 Dec 2014 01:05:05 +0000 (01:05 +0000)]
Corrected slash and quote handling in the strings of UNI files.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cecil Sheng <cecil.sheng@hp.com>
Reviewed-by: Yingke Liu <yingke.d.liu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16456 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoMdePkg: UefiScsiLib: do not encode LUN in CDB for other SCSI commands
Laszlo Ersek [Fri, 28 Nov 2014 10:24:56 +0000 (10:24 +0000)]
MdePkg: UefiScsiLib: do not encode LUN in CDB for other SCSI commands

The TEST UNIT READY, INQUIRY, MODE SENSE, REQUEST SENSE and READ CAPACITY
commands define bits [7:5] of Cdb[1] as Reserved (potentially as part of a
larger Reserved bitfield):

  Command             Reserved bitfield in Cdb[1]  SCSI spec reference
  ------------------  ---------------------------  -------------------
  TEST UNIT READY     all bits                     SPC-4 6.37
  INQUIRY             bits [7:2]                   SPC-4 6.4.1
  MODE SENSE (6)      bits [7:4]                   SPC-4 6.11.1
  MODE SENSE (10)     bits [7:5]                   SPC-4 6.12
  REQUEST SENSE       bits [7:1]                   SPC-4 6.29
  READ CAPACITY (10)  bits [7:1]                   SBC-3 5.16
  READ CAPACITY (16)  bits [7:5]                   SBC-3 5.17

Update the UefiScsiLib functions accordingly.

(In ScsiReadCapacity16Command() the LUN has not been encoded, so there we
just remove the useless ScsiIo->GetDeviceLocation() call, with its
auxiliary local variables.)

The EFI_SCSI_TARGET_MAX_BYTES and EFI_SCSI_LOGICAL_UNIT_NUMBER_MASK macros
become unused with this patch, remove them too.

Suggested-by: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0

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

9 years agoMdePkg: UefiScsiLib: do not encode LUN in CDB for READ and WRITE
Laszlo Ersek [Fri, 28 Nov 2014 10:24:41 +0000 (10:24 +0000)]
MdePkg: UefiScsiLib: do not encode LUN in CDB for READ and WRITE

The "SCSI Block Commands - 2" (SBC-2) standard defines bits [7:5] of the
CDB byte 1 as Reserved, for the READ and WRITE commands.

The updated "SCSI Block Commands - 3" (SBC-3) standard defines the same
bitfield as RDPROTECT and WRPROTECT, respectively.

After reviewing the above standards, and the following commits:
- SVN r8331 (git 676e2a32),
- SVN r8334 (git 6b3ecf5c),
we've determined that UefiScsiLib is incorrect in encoding the LUN in this
bitfield for the READ and WRITE commands.

Encoding a nonzero LUN there creates unintended RDPROTECT and WRPROTECT
values, which the recipient device is required to reject if it does not
support protection information, with CHECK CONDITION, ILLEGAL REQUEST,
INVALID FIELD IN CDB:

  ScsiDiskRead10: Check Condition happened!
  ScsiDisk: Sense Key = 0x5 ASC = 0x24!
  ScsiDiskRead10: Check Condition happened!
  ScsiDisk: Sense Key = 0x5 ASC = 0x24!
  ScsiDiskRead10: Check Condition happened!
  ScsiDisk: Sense Key = 0x5 ASC = 0x24!
  ScsiDiskRead10: Check Condition happened!
  ScsiDisk: Sense Key = 0x5 ASC = 0x24!
  FatOpenDevice: read of part_lba failed Device Error

In practice this flaw breaks UefiScsiLib minimally on SCSI disks with
nonzero LUNs that are emulated by QEMU (after QEMU commit 96bdbbab, part
of v1.2.0).

RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1166971

Reported-by: Cole Robinson <crobinso@redhat.com>
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Suggested-by: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0

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

9 years agoMdeModulePkg DxeCore: Check pointer AllocInfoData before dereferencing.
Star Zeng [Thu, 27 Nov 2014 02:51:04 +0000 (02:51 +0000)]
MdeModulePkg DxeCore: Check pointer AllocInfoData before dereferencing.

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

9 years agoAdded PlatformNotification to ACPI 5.0 PCCT structure.
Samer El-Haj-Mahmoud [Thu, 27 Nov 2014 02:17:28 +0000 (02:17 +0000)]
Added PlatformNotification to ACPI 5.0 PCCT structure.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hp.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16452 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoFix build fail for VS2005 tool chain.
Eric Dong [Thu, 27 Nov 2014 02:14:14 +0000 (02:14 +0000)]
Fix build fail for VS2005 tool chain.

Contributed-under: TianoCore Contribution Agreement 1.0
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@16451 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoMdeModulePkg: Misc comments and DEBUG messages
Samer El-Haj-Mahmoud [Thu, 27 Nov 2014 01:01:43 +0000 (01:01 +0000)]
MdeModulePkg: Misc comments and DEBUG messages

Fixed some spelling typos in some comments. Added a couple of useful DEBUG messages

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hp.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16450 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoCorrect the alignment calculation of PE/COFF attribute certificate entry.
Qin Long [Wed, 26 Nov 2014 08:21:54 +0000 (08:21 +0000)]
Correct the alignment calculation of PE/COFF attribute certificate entry.

This is to resolve the possible certificate entry retrieving issue caused by un-aligned (8-bytes) VirtualAddress in some PE/COFF image, which may break secure boot.

Contributed-under: TianoCore Contribution Agreement 1.0

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

9 years agoFix an issue in the PCD service to prevent potential out of bound array access
Samer El-Haj-Mahmoud [Wed, 26 Nov 2014 07:17:31 +0000 (07:17 +0000)]
Fix an issue in the PCD service to prevent potential out of bound array access

that can cause an exception. mPeiExMapppingTableSize is the table size, but the
code needs to check the entry number.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hp.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16448 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoFixed user input arrow down/ page down caused form display highlight menu error.
Eric Dong [Wed, 26 Nov 2014 02:44:06 +0000 (02:44 +0000)]
Fixed user input arrow down/ page down caused form display highlight menu error.

When scroll menu to the one not shows in current form, and this menu has option mismatch error, current display engine will not highlight this menu.

Contributed-under: TianoCore Contribution Agreement 1.0
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@16447 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoEdkCompatibilityPkg: Make this field name match the name in the spec.
Peter Jones [Wed, 26 Nov 2014 01:22:15 +0000 (01:22 +0000)]
EdkCompatibilityPkg: Make this field name match the name in the spec.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Peter Jones <pjones@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16446 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoShellPkg: Update Shell DH command to display more info.
Samer El-Haj-Mahmoud [Tue, 25 Nov 2014 22:41:30 +0000 (22:41 +0000)]
ShellPkg: Update Shell DH command to display more info.

Decode for gEfiAdapterInformationProtocolGuid and added GUIDs for gEfiIsaIoProtocolGuid and gEfiIsaAcpiProtocolGuid protocols.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hp.com>
Reviewed-by: jaben carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16445 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoChange NT32 and DUET to use UEFI Shell by default. Use "-D USE_OLD_SHELL" for NT32...
Ruiyu Ni [Tue, 25 Nov 2014 08:53:33 +0000 (08:53 +0000)]
Change NT32 and DUET to use UEFI Shell by default. Use "-D USE_OLD_SHELL" for NT32 to use EDK Shell.

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

9 years agoBaseTools/UPT: Fix an issue of storing wrong PCD into XML file.
Hess Chen [Tue, 25 Nov 2014 04:58:17 +0000 (04:58 +0000)]
BaseTools/UPT: Fix an issue of storing wrong PCD into XML file.

Fix an issue of storing wrong PCD into XML file to only store PcdEx for AsBuilt sections

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hess Chen <hesheng.chen@intel.com>
Reviewed-by: Yingke Liu <yingke.d.liu@Intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16426 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoInitialize alarm register in PcRtc module entrypoint to make UEFI SCT GetWakeupTime...
Elvin Li [Tue, 25 Nov 2014 03:38:20 +0000 (03:38 +0000)]
Initialize alarm register in PcRtc module entrypoint to make UEFI SCT GetWakeupTime pass.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Elvin Li <elvin.li@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Eric Jin <eric.jin@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16425 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoShellPkg: Add extended USB decoding for consistent device names
jaben carsey [Mon, 24 Nov 2014 14:58:33 +0000 (14:58 +0000)]
ShellPkg: Add extended USB decoding for consistent device names

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: jaben carsey <jaben.carsey@intel.com>
Reviewed-by: Joe Peterson <joe.peterson@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16423 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoMdePkg Add USB Spec constants to Usb.h
jaben carsey [Mon, 24 Nov 2014 14:53:53 +0000 (14:53 +0000)]
MdePkg Add USB Spec constants to Usb.h

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: jaben carsey <jaben.carsey@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16422 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoMdeModulePkg: remove usb defined info
jaben carsey [Mon, 24 Nov 2014 14:52:50 +0000 (14:52 +0000)]
MdeModulePkg: remove usb defined info

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: jaben carsey <jaben.carsey@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16421 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoShellPkg: Add optional extended decode for Vendor Device Nodes for consistent map...
jaben carsey [Mon, 24 Nov 2014 14:50:14 +0000 (14:50 +0000)]
ShellPkg: Add optional extended decode for Vendor Device Nodes for consistent map names

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: jaben carsey <jaben.carsey@intel.com>
Reviewed-by: Joe Peterson <joe.peterson@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16420 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoAdd typecast to fix VS2005 build issue.
Jeff Fan [Mon, 24 Nov 2014 04:57:40 +0000 (04:57 +0000)]
Add typecast to fix VS2005 build issue.

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

9 years agoBaseTools: Extend support for Windows hosted gcc to versions 4.4-4.7.
Scott Duplichan [Mon, 24 Nov 2014 02:43:17 +0000 (02:43 +0000)]
BaseTools: Extend support for Windows hosted gcc to versions 4.4-4.7.

Revision 16400 adds support for Windows hosted gcc versions 4.8 and 4.9.
With this change, all of the GCCXX tool chains can be used from Windows.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Scott Duplichan <scott@notabs.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16418 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoEmulatorPkg/MpService: add enabled processor check for startupThisAP
Chen Fan [Fri, 21 Nov 2014 22:46:49 +0000 (22:46 +0000)]
EmulatorPkg/MpService: add enabled processor check for startupThisAP

if processor number is the one of disabled processor, startupThisAP
should return invalid prameter.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16417 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoEmulatorPkg/MpService: StartupAllAPs should verify processor state before setting...
Chen Fan [Fri, 21 Nov 2014 22:46:36 +0000 (22:46 +0000)]
EmulatorPkg/MpService: StartupAllAPs should verify processor state before setting state

if any enabled APs are not in idle state, StartupAllAPs() should return immediately,
and must not change the other idled processor state. so we checked the state before
changed them.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16416 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoEmulatorPkg/MpService: fix wrong unsigned to signed variable transition
Chen Fan [Fri, 21 Nov 2014 22:46:26 +0000 (22:46 +0000)]
EmulatorPkg/MpService: fix wrong unsigned to signed variable transition

Because TimeoutInMicrosecsond is a unsigned value, converting it to
signed value will cause the data region changed. so this patch fix
that.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16415 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoOvmfPkg: CsmSupportLib: depend on OvmfPkg.dec explicitly
Laszlo Ersek [Fri, 21 Nov 2014 09:40:47 +0000 (09:40 +0000)]
OvmfPkg: CsmSupportLib: depend on OvmfPkg.dec explicitly

SVN r16375 (git commit 72a11001, "OvmfPkg: CsmSupportLib: Set/use platform
specific legacy interrupt device") added the

  gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId

PCD to CsmSupportLib. Since that "namespace" GUID is declared in
OvmfPkg/OvmfPkg.dec, and we've not used anything from OvmfPkg/OvmfPkg.dec
in CsmSupportLib.inf thus far, this is a new [Packages] dependency and
must be named.

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

9 years agoMdeModulePkg: Refine the get default value logic.
Eric Dong [Fri, 21 Nov 2014 01:23:09 +0000 (01:23 +0000)]
MdeModulePkg: Refine the get default value logic.

Based on the input request to get default value for questions.

Contributed-under: TianoCore Contribution Agreement 1.0
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@16413 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoShellPkg: Fix 'parse' command to use ," for SFO column delimiter
Chris Phillips [Thu, 20 Nov 2014 23:08:00 +0000 (23:08 +0000)]
ShellPkg: Fix 'parse' command to use ," for SFO column delimiter

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

9 years agoOvmfPkg: AcpiPlatformDxe: make dependency on PCI enumeration explicit
Laszlo Ersek [Thu, 20 Nov 2014 09:58:28 +0000 (09:58 +0000)]
OvmfPkg: AcpiPlatformDxe: make dependency on PCI enumeration explicit

The ACPI payload that OVMF downloads from QEMU via fw_cfg depends on the
PCI enumaration and resource assignment performed by
MdeModulePkg/Bus/Pci/PciBusDxe.

Namely, although the ACPI payload is pre-generated in qemu during machine
initialization, in

  main()                                            [vl.c]
    qemu_run_machine_init_done_notifiers()
      pc_guest_info_machine_done()                  [hw/i386/pc.c]
        acpi_setup()                                [hw/i386/acpi-build.c]
          acpi_build()
          acpi_add_rom_blob()
            rom_add_blob(... acpi_build_update ...) [hw/core/loader.c]
              fw_cfg_add_file_callback()            [hw/nvram/fw_cfg.c]

the ACPI data is rebuilt at the first time any of the related fw_cfg files
are read, through the acpi_build_update() fw_cfg read-callback function:

  fw_cfg_read()                                     [hw/nvram/fw_cfg.c]
    acpi_build_update()                             [hw/i386/acpi-build.c]
      acpi_build()

(See qemu commit d87072ceeccf4f84a64d4bc59124bcd64286c070 and its
containing series.)

For this reason we must not dispatch AcpiPlatformDxe before PciBusDxe
completes the enumeration.

Luckily, the PI Specification 1.3 defines
EFI_PCI_ENUMERATION_COMPLETE_GUID in Volume 5, "10.9 End of PCI
Enumeration Overview", as an indicia to inform the platform when the PCI
enumeration process has completed. PciBusDxe installs this protocol at the
end of the PciEnumerator() function.

Let's add this GUID to the Depex section of AcpiPlatformDxe, in order to
state the dependency explicitly.

On Xen, and on older QEMU where the linker/loader fw_cfg interface is
unavailable, this introduces a harmless ordering constraint -- we'll
always include PciBusDxe in OVMF, so the dependency will always be
satisfied.

I tested this change as follows:

- I dumped the ACPI tables in a Fedora 20 guest, before and after the
  change, and compared them. The only thing that actually changed was the
  FACS address. (Which I promptly tested with S3 suspend/resume.) Plus, of
  course, the FACP checksum changed, because the FACP links the FACS.

- Tested S3 in my Windows Server 2008 R2 and Windows Server 2012 R2 guests.

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

9 years agoShellPkg: Code refine to avoid potential dereference of pointer.
Qiu Shumin [Thu, 20 Nov 2014 01:31:36 +0000 (01:31 +0000)]
ShellPkg: Code refine to avoid potential dereference of pointer.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <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@16410 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoMdePkg/MdeModulePkg: Implement the missing SetMemorySpaceCapabilities function.
Eugene Cohen [Thu, 20 Nov 2014 01:23:49 +0000 (01:23 +0000)]
MdePkg/MdeModulePkg: Implement the missing SetMemorySpaceCapabilities function.

It is defined in the PI Specification version 1.3.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eugene Cohen <eugene@hp.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16409 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoOvmfPkg: Fix build failure with gcc44, gcc45
Scott Duplichan [Wed, 19 Nov 2014 18:21:37 +0000 (18:21 +0000)]
OvmfPkg: Fix build failure with gcc44, gcc45

OvmfPkg/XenBusDxe/XenHypercall.h:19:31: error: redefinition of typedef 'XENBUS_DEVICE'
OvmfPkg/XenBusDxe/XenBusDxe.h:86:31: note: previous declaration of 'XENBUS_DEVICE' was here

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Scott Duplichan <scott@notabs.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16408 6f19259b-4bc3-4df7-8a09-765794883524

9 years ago[PATCH] MdeModulePkg: update poor wording in MdeModulePkg DEC/UNI file
jaben carsey [Wed, 19 Nov 2014 16:18:40 +0000 (16:18 +0000)]
[PATCH] MdeModulePkg: update poor wording in MdeModulePkg DEC/UNI file

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

9 years agoMdeModulePkg/SecurityPkg VariablePei: Fix VS2013 build failure.
Star Zeng [Wed, 19 Nov 2014 07:13:35 +0000 (07:13 +0000)]
MdeModulePkg/SecurityPkg VariablePei: Fix VS2013 build failure.

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

9 years agoMdeModulePkg DxeCore: Fix VS2013 build failure.
Star Zeng [Wed, 19 Nov 2014 07:11:59 +0000 (07:11 +0000)]
MdeModulePkg DxeCore: Fix VS2013 build failure.

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

9 years agoUefiCpuPkg : Fix CpuDxe build issue with VS2005 tool chain
Jeff Fan [Wed, 19 Nov 2014 05:15:06 +0000 (05:15 +0000)]
UefiCpuPkg : Fix CpuDxe build issue with VS2005 tool chain

!!() cannot pass VS2005 build.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16404 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoMdePkg DxePcdLib: Updates DxePcdLib instance comments.
Liming Gao [Wed, 19 Nov 2014 02:47:02 +0000 (02:47 +0000)]
MdePkg DxePcdLib: Updates DxePcdLib instance comments.

Describe PCD service can’t be used at Runtime phase.

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

9 years agoMdeModulePkg BaseSerialPortLib16550: Correct MemoryLimit and MemoryBase offset.
Liming Gao [Wed, 19 Nov 2014 02:30:21 +0000 (02:30 +0000)]
MdeModulePkg BaseSerialPortLib16550: Correct MemoryLimit and MemoryBase offset.

Their offset in PCI-to-PCI Bridge Configuration Space.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Guo Dong <guo.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16402 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoMdeModulePkg Variable: Add missing warning annotation.
Star Zeng [Wed, 19 Nov 2014 01:08:23 +0000 (01:08 +0000)]
MdeModulePkg Variable: Add missing warning annotation.

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

9 years agoBaseTools: Modify gcc 4.8 and 4.9 tool chain definition to support building from...
Scott Duplichan [Tue, 18 Nov 2014 02:38:20 +0000 (02:38 +0000)]
BaseTools: Modify gcc 4.8 and 4.9 tool chain definition to support building from Windows.

Here is a new patch that adds Windows support for both gcc 4.8.x and gcc 4.9.x.
This time testing is more thorough: boot testing using Duet for all 4 combinations of
IA32/X64 and gcc 4.8.2 and gcc 4.9.1 passes. A Windows hosted gcc 4.8.2 has been added here:
http://sourceforge.net/projects/edk2developertoolsforwindows/

The environment variable settings for Windows look like:

set UEFI_BUILD_TOOLS=%cd%\tools
set NASM_PREFIX=%UEFI_BUILD_TOOLS%\nasm211\
set GCC48_BIN=%UEFI_BUILD_TOOLS%\gcc482-x86\bin\
set GCC48_DLL=%UEFI_BUILD_TOOLS%\gcc482-x86\dll\;%GCC48_BIN%
set GCC48_ARM_PREFIX=%UEFI_BUILD_TOOLS%\gcc482-arm\bin\
set GCC48_AARCH64_PREFIX=%UEFI_BUILD_TOOLS%\gcc482-aarch64\bin\
set GCC49_BIN=%UEFI_BUILD_TOOLS%\gcc491-x86\bin\
set GCC49_DLL=%UEFI_BUILD_TOOLS%\gcc491-x86\dll\;%GCC49_BIN%
set GCC49_ARM_PREFIX=%UEFI_BUILD_TOOLS%\gcc491-arm\bin\
set GCC49_AARCH64_PREFIX=%UEFI_BUILD_TOOLS%\gcc491-aarch64\bin\

No change is needed for building from Linux.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Scott Duplichan <scott@notabs.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16400 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoBaseTools: Correct NASM output file type for UNIXGCC and CYGGCC.
Liming Gao [Tue, 18 Nov 2014 02:19:47 +0000 (02:19 +0000)]
BaseTools: Correct NASM output file type for UNIXGCC and CYGGCC.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Yingke Liu <yingke.d.liu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16399 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoOvmfPkg: PlatformBdsLib: Dynamic PCI Interrupt Line register setup
Gabriel Somlo [Mon, 17 Nov 2014 19:09:12 +0000 (19:09 +0000)]
OvmfPkg: PlatformBdsLib: Dynamic PCI Interrupt Line register setup

Remove hard-coded list of PCI devices for which the Interrupt Line
register is initialized. Instead, provide a "visitor" function to
initialize the register only for present and applicable PCI devices.

At this time, we match the behavior of SeaBIOS (file src/fw/pciinit.c,
functions *_pci_slot_get_irq() and "map the interrupt" block from
pci_bios_init_device()).

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16398 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoUefiCpuPkg/CpuDxe: Put APs in wait for SIPI state at ExitBootServices
Chen Fan [Mon, 17 Nov 2014 14:54:09 +0000 (14:54 +0000)]
UefiCpuPkg/CpuDxe: Put APs in wait for SIPI state at ExitBootServices

when gBS->ExitBootServices() is called, the APs should avoid to access
the unsafed buff datas which were allocated by boot services.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
Tested-by: Gabriel Somlo <somlo@cmu.edu>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16397 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoMdeModulePkg DxeCore/PiSmmCore/MemoryProfileInfo: Fix EBC and VS2013 build failure.
Star Zeng [Mon, 17 Nov 2014 02:30:44 +0000 (02:30 +0000)]
MdeModulePkg DxeCore/PiSmmCore/MemoryProfileInfo: Fix EBC and VS2013 build failure.

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

9 years agoMdePkg Base.h: Fix EBC build failure and add comments for RETURN_ADDRESS macro.
Star Zeng [Mon, 17 Nov 2014 01:53:41 +0000 (01:53 +0000)]
MdePkg Base.h: Fix EBC build failure and add comments for RETURN_ADDRESS macro.

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

9 years agoOvmfPkg/XenBusDxe: Fix a nasm warning about instruction not lockable.
Anthony PERARD [Fri, 14 Nov 2014 17:35:49 +0000 (17:35 +0000)]
OvmfPkg/XenBusDxe: Fix a nasm warning about instruction not lockable.

The fix, having "lock" and the locked instruction on the same line in
the source.

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Build-tested-by: Scott Duplichan <scott@notabs.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16394 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoOvmfPkg/XenPvBlkDxe: fix VS2010 build failures
Scott Duplichan [Fri, 14 Nov 2014 17:35:42 +0000 (17:35 +0000)]
OvmfPkg/XenPvBlkDxe: fix VS2010 build failures

This patch contain type casts and replace one * operation by a
MultU64x32() call.

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Scott Duplichan <scott@notabs.org>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Build-tested-by: Scott Duplichan <scott@notabs.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16393 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoOvmfPkg/XenBusDxe: fix VS2010 build failures
Scott Duplichan [Fri, 14 Nov 2014 17:35:35 +0000 (17:35 +0000)]
OvmfPkg/XenBusDxe: fix VS2010 build failures

This patch contain only type cast.

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Scott Duplichan <scott@notabs.org>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Build-tested-by: Scott Duplichan <scott@notabs.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16392 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoOvmfPkg/XenBusDxe: Fix some types.
Anthony PERARD [Fri, 14 Nov 2014 17:35:29 +0000 (17:35 +0000)]
OvmfPkg/XenBusDxe: Fix some types.

This patch replace some types in GrantTable and the argument Index of
XenHypercallHvmGetParam to what the types should be.

This avoid to have type cast in code.

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Build-tested-by: Scott Duplichan <scott@notabs.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16391 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoOvmfPkg/XenBusDxe: In XenStore, replace type of Len from UINTN to UINT32.
Anthony PERARD [Fri, 14 Nov 2014 17:35:21 +0000 (17:35 +0000)]
OvmfPkg/XenBusDxe: In XenStore, replace type of Len from UINTN to UINT32.

Since a message to XenStore have a lenght of type UINT32, have
XenStore.c deal only with UINT32 instead of a mixmatch with UINTN.

This patch replaces the type of Len in WRITE_REQUEST and the type of the
argument Len of XenStoreWriteStore and XenStoreReadStore.

This patch should avoid to have type cast were it does not make sense to
have them.

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Build-tested-by: Scott Duplichan <scott@notabs.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16390 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoSecurityPkg: VariableServiceSetVariable(): fix dbt <-> GUID association
Laszlo Ersek [Fri, 14 Nov 2014 13:47:14 +0000 (13:47 +0000)]
SecurityPkg: VariableServiceSetVariable(): fix dbt <-> GUID association

SVN r16380 ("UEFI 2.4 X509 Certificate Hash and RFC3161 Timestamp
Verification support for Secure Boot") broke the "dbt" variable's
association with its expected namespace GUID.

According to "MdePkg/Include/Guid/ImageAuthentication.h", *all* of the
"db", "dbx", and "dbt" (== EFI_IMAGE_SECURITY_DATABASE2) variables have
their special meanings in the EFI_IMAGE_SECURITY_DATABASE_GUID namespace.

However, the above commit introduced the following expression in
VariableServiceSetVariable():

> -  } else if (CompareGuid (VendorGuid, &gEfiImageSecurityDatabaseGuid) &&
> -          ((StrCmp (VariableName, EFI_IMAGE_SECURITY_DATABASE) == 0) || (StrCmp (VariableName, EFI_IMAGE_SECURITY_DATABASE1) == 0))) {
> +  } else if (CompareGuid (VendorGuid, &gEfiImageSecurityDatabaseGuid) &&
> +          ((StrCmp (VariableName, EFI_IMAGE_SECURITY_DATABASE) == 0) || (StrCmp (VariableName, EFI_IMAGE_SECURITY_DATABASE1) == 0))
> +           || (StrCmp (VariableName, EFI_IMAGE_SECURITY_DATABASE2)) == 0) {

Simply replacing the individual expressions with the predicates
"GuidMatch", "DbMatch", "DbxMatch", and "DbtMatch", the above
transformation becomes:

> -  } else if (GuidMatch &&
> -          ((DbMatch) || (DbxMatch))) {
> +  } else if (GuidMatch &&
> +          ((DbMatch) || (DbxMatch))
> +           || DbtMatch) {

In shorter form, we change

  GuidMatch && (DbMatch || DbxMatch)

into

  GuidMatch && (DbMatch || DbxMatch) || DbtMatch

which is incorrect, because this way "dbt" will match outside of the
intended namespace / GUID.

The error was caught by gcc:

> SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c: In function
> 'VariableServiceSetVariable':
>
> SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c:3188:71: error:
> suggest parentheses around '&&' within '||' [-Werror=parentheses]
>
>    } else if (CompareGuid (VendorGuid, &gEfiImageSecurityDatabaseGuid) &&
>                                                                        ^
> cc1: all warnings being treated as errors

Fix the parentheses.

This change may have security implications.

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Qin Long <qin.long@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16389 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoCryptoPkg: OpenSslSupport.h: edk2-ize offsetof() macro for gcc-4.8 / X64
Laszlo Ersek [Fri, 14 Nov 2014 10:24:33 +0000 (10:24 +0000)]
CryptoPkg: OpenSslSupport.h: edk2-ize offsetof() macro for gcc-4.8 / X64

Code added in SVN r16339 ("CryptoPkg Updates to support RFC3161 timestamp
signature verification.") introduced many new uses of the offsetof()
macro. Since the offsetof() macro in "OpenSslSupport.h" casts a pointer to
an "int", it triggers a large number of

  error: cast from pointer to integer of different size
  [-Werror=pointer-to-int-cast]

errors when building CryptoPkg with gcc-4.8 for X64.

Remedy this by directing offsetof() to the OFFSET_OF() macro in
"MdePkg/Include/Base.h" (which matches how "OpenSslSupport.h" resolves the
va_*() macros too).

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Build-tested-by: Scott Duplichan <scott@notabs.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Qin Long <qin.long@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16388 6f19259b-4bc3-4df7-8a09-765794883524