]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
10 years agoShellBinPkg: Upadate both MinUefiShell and UefiShell for IA32 and X64 based on ShellP...
Jaben Carsey [Wed, 12 Jun 2013 18:14:33 +0000 (18:14 +0000)]
ShellBinPkg: Upadate both MinUefiShell and UefiShell for IA32 and X64 based on ShellPkg SVN 14400

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

10 years agoShellPkg: Fix ARM build errors.
jcarsey [Tue, 11 Jun 2013 22:07:03 +0000 (22:07 +0000)]
ShellPkg: Fix ARM build errors.

submitted-by: Olivier Martin olivier.martin@arm.com>
reviewed-by: Jaben Carsey <Jaben.Carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14400 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoUpdate to new SVN URL in readme.txt
Tian, Hot [Sat, 8 Jun 2013 05:26:39 +0000 (05:26 +0000)]
Update to new SVN URL in readme.txt

Signed-off-by: Tian, Hot <hot.tian@intel.com>
Reviewed-by: Ni, Ruiyu <ruiyu.ni@intel.com>
Reviewed-by: Gao, Liming <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14399 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoUse right LBA to get the backed up WorkSpace in spare block.
Star Zeng [Fri, 7 Jun 2013 02:38:00 +0000 (02:38 +0000)]
Use right LBA to get the backed up WorkSpace in spare block.

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

10 years agoUpdate code to follow spec, add discard form action before reset.
Eric Dong [Thu, 6 Jun 2013 09:31:46 +0000 (09:31 +0000)]
Update code to follow spec, add discard form action before reset.

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

10 years agoFix overflow issue in TcgProtocol
Chao Zhang [Thu, 6 Jun 2013 00:39:41 +0000 (00:39 +0000)]
Fix overflow issue in TcgProtocol

Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by  : Yao Jiewen <jiewen.yao@intel.com>
Reviewed-by  : Dong Guo   <guo.dong@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14396 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoAdd the missing "," for the patch to fix status code print string.
Gary Ching-Pang Lin [Tue, 4 Jun 2013 08:51:30 +0000 (08:51 +0000)]
Add the missing "," for the patch to fix status code print string.

Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14395 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoShellPkg: refine the logic for cp command
Eric Dong [Tue, 4 Jun 2013 01:06:22 +0000 (01:06 +0000)]
ShellPkg: refine the logic for cp command

Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <Erik.c.Bjorge@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14394 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg/Bds: Fixed potential overflow in EditHIInputStr()
Ryan Harkin [Wed, 29 May 2013 14:56:35 +0000 (14:56 +0000)]
ArmPlatformPkg/Bds: Fixed potential overflow in EditHIInputStr()

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Signed-off: Olivier Martin <olivier.martin@arm.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14393 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoThough the comment of RandomSeed() states it should return FALSE if there is not...
tye1 [Wed, 29 May 2013 05:30:13 +0000 (05:30 +0000)]
Though the comment of RandomSeed() states it should return FALSE if there is not enough entropy for random generation, the function always returns TRUE. This commit checks the status of pseudorandom number generator to match the comment.

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
Reviewed-by: Long Qin <qin.long@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14392 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoShellPkg: make help footer string have same info as help usage information
jcarsey [Tue, 28 May 2013 20:21:51 +0000 (20:21 +0000)]
ShellPkg: make help footer string have same info as help usage information

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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14391 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoOvmfPkg/SerializeVariablesLib: ignore secure variable restore errors
jljusten [Tue, 28 May 2013 17:21:37 +0000 (17:21 +0000)]
OvmfPkg/SerializeVariablesLib: ignore secure variable restore errors

OvmfPkg's file-based NvVar storage is read back as follows at boot (all
paths under OvmfPkg/Library/):

PlatformBdsPolicyBehavior() [PlatformBdsLib/BdsPlatform.c]
  PlatformBdsRestoreNvVarsFromHardDisk()
    VisitAllInstancesOfProtocol
      for each simple file system:
        VisitingFileSystemInstance()
          ConnectNvVarsToFileSystem() [NvVarsFileLib/NvVarsFileLib.c]
            LoadNvVarsFromFs() [NvVarsFileLib/FsAccess.c]
              ReadNvVarsFile()
+-------------> SerializeVariablesSetSerializedVariables() [SerializeVariablesLib/SerializeVariablesLib.c]
|                 SerializeVariablesIterateInstanceVariables()
|   +-------------> IterateVariablesInBuffer()
|   |                 for each loaded / deserialized variable:
| +-|-----------------> IterateVariablesCallbackSetSystemVariable()
| | |                     gRT->SetVariable()
| | |
| | IterateVariablesInBuffer() stops processing variables as soon as the
| | first error is encountered from the callback function.
| |
| | In this case the callback function is
| IterateVariablesCallbackSetSystemVariable(), selected by
SerializeVariablesSetSerializedVariables().

The result is that no NvVar is restored from the file after the first
gRT->SetVariable() failure.

On my system such a failure
- never happens in an OVMF build with secure boot disabled,
- happens *immediately* with SECURE_BOOT_ENABLE, because the first
  variable to restore is "AuthVarKeyDatabase".

"AuthVarKeyDatabase" has the EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS
attribute set. Since the loop tries to restore it before any keys (PK, KEK
etc) are enrolled, gRT->SetVariable() rejects it with
EFI_SECURITY_VIOLATION. Consequently the NvVar restore loop terminates
immediately, and we never reach non-authenticated variables such as
Boot#### and BootOrder.

Until work on KVM-compatible flash emulation converges between qemu and
OvmfPkg, improve the SECURE_BOOT_ENABLE boot experience by masking
EFI_SECURITY_VIOLATION in the callback:
- authenticated variables continue to be rejected same as before, but
- at least we allow the loop to progress and restore non-authenticated
  variables, for example boot options.

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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14390 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoRefine the logic about processing options for oneof opcode.
ydong10 [Mon, 27 May 2013 07:04:09 +0000 (07:04 +0000)]
Refine the logic about processing options for oneof opcode.

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

10 years agoFix the issue that FreePool is too early in FirmwarePerformanceDxe.
lgao4 [Mon, 27 May 2013 05:45:35 +0000 (05:45 +0000)]
Fix the issue that FreePool is too early in FirmwarePerformanceDxe.

Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14388 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoWithout this fix, the "%r" format specifier prints eg. "0000001A" instead of "Securit...
lgao4 [Fri, 24 May 2013 02:48:40 +0000 (02:48 +0000)]
Without this fix, the "%r" format specifier prints eg. "0000001A" instead of "Security Violation" for EFI_SECURITY_VIOLATION.

Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14387 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoMove the memory allocation and variable set to BdsEntry, use VariableLock protocol...
lzeng14 [Thu, 23 May 2013 02:56:41 +0000 (02:56 +0000)]
Move the memory allocation and variable set to BdsEntry, use VariableLock protocol to lock the L”PerfDataMemAddr” variable and prevent malware to update it.

Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14386 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoCorrect the incorrect Copyright or License in EDKII source files.
lgao4 [Wed, 22 May 2013 02:19:16 +0000 (02:19 +0000)]
Correct the incorrect Copyright or License in EDKII source files.
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Hess Chen (hesheng.chen@intel.com)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14383 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoWhen finish using the browser storage for one formset, browser should clean the Confi...
ydong10 [Tue, 21 May 2013 05:50:23 +0000 (05:50 +0000)]
When finish using the browser storage for one formset, browser should clean the ConfigRequest string for this formset.

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

10 years agoFix the TOCTOU issue of CommBufferSize itself for SMM communicate handler input.
lzeng14 [Tue, 21 May 2013 02:22:02 +0000 (02:22 +0000)]
Fix the TOCTOU issue of CommBufferSize itself for SMM communicate handler input.

Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14379 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoAdd the EDKII_VARIABLE_LOCK_PROTOCOL implementation in SecurityPkg variable drivers.
niruiyu [Mon, 20 May 2013 07:10:10 +0000 (07:10 +0000)]
Add the EDKII_VARIABLE_LOCK_PROTOCOL implementation in SecurityPkg variable drivers.

Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14378 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoRemove the complex buffer since the _LOCK_VARIABLE won't be allowed after leaving...
niruiyu [Mon, 20 May 2013 07:04:56 +0000 (07:04 +0000)]
Remove the complex buffer since the _LOCK_VARIABLE won't be allowed after leaving DXE phase.
Add the variable name size check in the RequestToLock wrapper.

Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14377 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoFix a bug that “SecureBoot” varaible will be updated to NV+AT attribute incorrectly.
sfu5 [Fri, 17 May 2013 08:05:01 +0000 (08:05 +0000)]
Fix a bug that “SecureBoot” varaible will be updated to NV+AT attribute incorrectly.
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ni Ruiyu <ruiyu.ni@intel.com>
Reviewed-by: Dong Guo <guo.dong@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14375 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoNew EDK Shell binary(r63).
niruiyu [Fri, 17 May 2013 07:36:14 +0000 (07:36 +0000)]
New EDK Shell binary(r63).

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

10 years agoPop up error message when user tries to enroll an invalid certificate file into KEK...
sfu5 [Fri, 17 May 2013 07:03:49 +0000 (07:03 +0000)]
Pop up error message when user tries to enroll an invalid certificate file into KEK/DB/DBX.
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14373 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoAdd EDKII_VARIABLE_LOCK_PROTOCOL and the implementation in MdeModulePkg variable...
niruiyu [Fri, 17 May 2013 03:49:35 +0000 (03:49 +0000)]
Add EDKII_VARIABLE_LOCK_PROTOCOL and the implementation in MdeModulePkg variable drivers.
Add code in BdsDxe driver to call the protocol to mark the read-only variables defined in the UEFI Spec.

Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Guo Dong <guo.dong@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14372 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoUpdate the logic about get initial value for one storage.
ydong10 [Thu, 16 May 2013 08:41:39 +0000 (08:41 +0000)]
Update the logic about get initial value for one storage.

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

10 years agoSeparate memory allocation for FPDT S3 performance table and boot performance table...
lzeng14 [Thu, 16 May 2013 07:35:30 +0000 (07:35 +0000)]
Separate memory allocation for FPDT S3 performance table and boot performance table, save S3 performance table pointer to LockBox in FirmwarePerformanceDxe. Then FirmwarePerformancePei can use the pointer in LockBox.

Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14369 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoShellPkg\Library\UefiShellCEntryLib\UefiShellCEntryLib.c:
darylm503 [Wed, 15 May 2013 20:39:04 +0000 (20:39 +0000)]
ShellPkg\Library\UefiShellCEntryLib\UefiShellCEntryLib.c:
Return actual error codes instead of EFI_UNSUPPORTED for all errors.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: daryl.mcdaniel@intel.com
Reviewed-by: jaben.carsey@intel.com
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14368 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoOvmfPkg: QemuBootOrder: recognize Ethernet OFW device paths
jljusten [Wed, 15 May 2013 18:21:08 +0000 (18:21 +0000)]
OvmfPkg: QemuBootOrder: recognize Ethernet OFW device paths

Tested with the e1000, ne2k_pci, pcnet, rtl8139, and virtio iPXE UEFI
oprom drivers distributed with qemu-1.5.0-rc1. Also tested with Intel's
e1000 driver.

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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14367 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoOvmfPkg: enable the generic network stack by default
jljusten [Wed, 15 May 2013 18:20:39 +0000 (18:20 +0000)]
OvmfPkg: enable the generic network stack by default

DHCP, PXE, and StdLib socket apps are enabled in OVMF by the sum of:
(a) a UEFI NIC driver,
(b) the generic network stack.

The only choice for (a) used to be the proprietary Intel E1000 driver,
which is cumbersome to obtain and enable.

The iPXE UEFI NIC drivers packaged with qemu-1.5 cover (a) for each NIC
type supported by qemu, and are easy to obtain & configure, even for
earlier qemu versions. Therefore enable (b) per default as well.

This doesn't take up much space; the binaries (b) adds to the firmware
don't seem to need -D FD_SIZE_2MB.

Intel's e1000 driver remains an option, requested by the -D E1000_ENABLE
build flag.

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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14366 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoEmbeddedPkg/SerialPortExtLib.h: Changed SerialPortSetAttributes() prototype to return...
oliviermartin [Wed, 15 May 2013 08:44:59 +0000 (08:44 +0000)]
EmbeddedPkg/SerialPortExtLib.h: Changed SerialPortSetAttributes() prototype to return the set value(s)

To be compliant with the UEFI specification it is required to update SERIAL_IO_MODE with the values set.
This prototype change allows to get the value used inside SerialPortSetAttributes().

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

10 years agoOvmfPkg: describe debug messages in the README file
jljusten [Wed, 15 May 2013 08:09:29 +0000 (08:09 +0000)]
OvmfPkg: describe debug messages in the README file

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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14364 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoOvmfPkg: adapt VirtioFlush()'s leading comment to the coding style
jljusten [Wed, 15 May 2013 06:23:22 +0000 (06:23 +0000)]
OvmfPkg: adapt VirtioFlush()'s leading comment to the coding style

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14362 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoOvmfPkg: adapt VirtioAppendDesc()'s leading comment to the coding style
jljusten [Wed, 15 May 2013 06:22:50 +0000 (06:22 +0000)]
OvmfPkg: adapt VirtioAppendDesc()'s leading comment to the coding style

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14361 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoOvmfPkg: adapt VirtioPrepare()'s leading comment to the coding style
jljusten [Wed, 15 May 2013 06:22:15 +0000 (06:22 +0000)]
OvmfPkg: adapt VirtioPrepare()'s leading comment to the coding style

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14360 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoEmulatorPkg: Add SerialPortExtLib library class mapping
jljusten [Wed, 15 May 2013 05:18:49 +0000 (05:18 +0000)]
EmulatorPkg: Add SerialPortExtLib library class mapping

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

10 years agoStdLib/LibC/Locale/multibyte_Utf8.c: Fix obscure corner cases in wide to multibyte...
darylm503 [Wed, 15 May 2013 01:59:11 +0000 (01:59 +0000)]
StdLib/LibC/Locale/multibyte_Utf8.c: Fix obscure corner cases in wide to multibyte and multibyte to wide character conversions.  The majority of problems center around the interpretation of the Length or Limit parameter when the Destination parameter is NULL.

DecodeOneStateful: Properly handle combinations of Src, Dest, or Len being NULL or 0.

EncodeUtf8: Do not zero-terminate the result string in this worker function.

mbsrtowcs: Remove test for **src == '\0', as per ISO/IEC 9899:199409.  Allows "".

wcsrtombs:  The C Language standard, ISO/IEC 9899:199409, states that the wcsrtombs() function will stop before encountering the terminating NUL character only if Dest is NOT NULL.  This implies that if Dest is NULL, the Limit parameter will be ignored.  In order to avoid system hangs, if Dest is NULL a Limit value of ASCII_STRING_MAX is automatically used.  Also fixed a typo in the function header comment.

With these changes, StdLib now passes all of the C Language Standards Compliance Tests for ISO/IEC 9899:199409 (C95).

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: daryl.mcdaniel@intel.com
Reviewed-by: erik.c.bjorge@intel.com
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14358 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoEmulatorPkg/(Pei|Dxe)EmuSerialPortLib: Remove the SerialPortExtLib functions from...
oliviermartin [Tue, 14 May 2013 23:50:33 +0000 (23:50 +0000)]
EmulatorPkg/(Pei|Dxe)EmuSerialPortLib: Remove the SerialPortExtLib functions from SerialPortLib

SerialPortSetControl, SerialPortGetControl and SerialPortSetAttributes are functions
of the SerialPortExtLib library interface. They should not be implemented by the
SerialPortLib library.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <Olivier.martin@arm.com>
Reviewed-by: Andrew Fish <afish@apple.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14357 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoOvmfPkg: VirtioLib: populate the Available Ring correctly
jljusten [Tue, 14 May 2013 15:57:55 +0000 (15:57 +0000)]
OvmfPkg: VirtioLib: populate the Available Ring correctly

The descriptor table (also known as "queue") consists of descriptors. (The
corresponding type in the code is VRING_DESC.)

An individual descriptor describes a contiguous buffer, to be transferred
uni-directionally between host and guest.

Several descriptors in the descriptor table can be linked into a
descriptor chain, specifying a bi-directional scatter-gather transfer
between host and guest. Such a descriptor chain is also known as "virtio
request".

(The descriptor table can host sereval descriptor chains (in-flight virtio
requests) in parallel, but the OVMF driver supports at most one chain, at
any point in time.)

The first descriptor in any descriptor chain is called "head descriptor".
In order to submit a number of parallel requests (= a set of independent
descriptor chains) from the guest to the host, the guest must put *only*
the head descriptor of each separate chain onto the Available Ring.

VirtioLib currently places the head of its one descriptor chain onto the
Available Ring repeatedly, once for each single (head *or* dependent)
descriptor in said descriptor chain. If the descriptor chain comprises N
descriptors, this error amounts to submitting the same entire chain N
times in parallel.

  Available Ring    Descriptor table
    Ptr to head ----> Desc#0     (head of chain)
    Ptr to head --/   Desc#1     (next in same chain)
    ...          /    ...
    Ptr to head /     Desc#(N-1) (last in same chain)

Anatomy of a single virtio-blk READ request (a descriptor chain with three
descriptors):

  virtio-blk request header, prepared by guest:
    VirtioAppendDesc PhysAddr=3FBC6050 Size=16 Flags=1 Head=1232 Next=1232

  payload to be filled in by host:
    VirtioAppendDesc PhysAddr=3B934C00 Size=32768 Flags=3 Head=1232 Next=1233

  host status, to be filled in by host:
    VirtioAppendDesc PhysAddr=3FBC604F Size=1 Flags=2 Head=1232 Next=1234

Processing on the host side -- the descriptor chain is processed three
times in parallel (its head is available to virtqueue_pop() thrice); the
same chain is submitted/collected separately to/from AIO three times:

  virtio_queue_notify vdev VDEV vq VQ#0

  virtqueue_pop vq VQ#0 elem EL#0 in_num 2 out_num 1
  bdrv_aio_readv bs BDRV sector_num 585792 nb_sectors 64 opaque REQ#0

  virtqueue_pop vq VQ#0 elem EL#1 in_num 2 out_num 1
  bdrv_aio_readv bs BDRV sector_num 585792 nb_sectors 64 opaque REQ#1

  virtqueue_pop vq VQ#0 elem EL#2 in_num 2 out_num 1
  bdrv_aio_readv bs BDRV sector_num 585792 nb_sectors 64 opaque REQ#2

  virtio_blk_rw_complete req REQ#0 ret 0
  virtio_blk_req_complete req REQ#0 status 0

  virtio_blk_rw_complete req REQ#1 ret 0
  virtio_blk_req_complete req REQ#1 status 0

  virtio_blk_rw_complete req REQ#2 ret 0
  virtio_blk_req_complete req REQ#2 status 0

On my Thinkpad T510 laptop with RHEL-6 as host, this probably leads to
simultaneous DMA transfers targeting the same RAM area. Even though the
source of each transfer is identical, the data is corrupted in the
destination buffer -- the CRC32 calculated over the buffer varies, even
though the origin of the transfers is the same, never rewritten LBA.

  SynchronousRequest Lba=585792 BufSiz=32768 ReqIsWrite=0 Crc32=BF68A44D

The problem is invisible on my HP Z400 workstation.

Fix the request submission by:
- building the only one descriptor chain supported by VirtioLib always at
  the beginning of the descriptor table,
- ensuring the head descriptor of this chain is put on the Available Ring
  only once,
- requesting the virtio spec's language to be cleaned up
  <http://lists.linuxfoundation.org/pipermail/virtualization/2013-April/024032.html>.

  Available Ring    Descriptor table
    Ptr to head ----> Desc#0     (head of chain)
                      Desc#1     (next in same chain)
                      ...
                      Desc#(N-1) (last in same chain)

  VirtioAppendDesc PhysAddr=3FBC6040 Size=16 Flags=1 Head=0 Next=0
  VirtioAppendDesc PhysAddr=3B934C00 Size=32768 Flags=3 Head=0 Next=1
  VirtioAppendDesc PhysAddr=3FBC603F Size=1 Flags=2 Head=0 Next=2

    virtio_queue_notify vdev VDEV vq VQ#0

    virtqueue_pop vq VQ#0 elem EL#0 in_num 2 out_num 1
    bdrv_aio_readv bs BDRV sector_num 585792 nb_sectors 64 opaque REQ#0

    virtio_blk_rw_complete req REQ#0 ret 0
    virtio_blk_req_complete req REQ#0 status 0

  SynchronousRequest Lba=585792 BufSiz=32768 ReqIsWrite=0 Crc32=1EEB2B07

(The Crc32 was double-checked with edk2's and Linux's guest IDE driver.)

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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14356 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoAdd Copyright notices and comments for Red Hat contributor.
sfu5 [Tue, 14 May 2013 06:25:39 +0000 (06:25 +0000)]
Add Copyright notices and comments for Red Hat contributor.
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14355 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoFix bug in PXE driver: memory may be freed before use.
sfu5 [Tue, 14 May 2013 03:01:51 +0000 (03:01 +0000)]
Fix bug in PXE driver: memory may be freed before use.
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Ouyang Qian <qian.ouyang@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14354 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoShellPkg: remove unused enum
jcarsey [Mon, 13 May 2013 17:22:30 +0000 (17:22 +0000)]
ShellPkg: remove unused enum

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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14353 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoUpdate Code to pass EBC compiler.
lgao4 [Mon, 13 May 2013 02:36:09 +0000 (02:36 +0000)]
Update Code to pass EBC compiler.
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14352 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPkg/BdsLinuxFdt.c: Fix creation of 'cpu' and 'psci' device tree nodes.
oliviermartin [Sun, 12 May 2013 23:56:35 +0000 (23:56 +0000)]
ArmPkg/BdsLinuxFdt.c: Fix creation of 'cpu' and 'psci' device tree nodes.

* Fix name of 'device_type' and 'migrate' properties.
* Fix 'reg' property. It is supposed to contain the CPU MPIDR of the
  CPU being described.
* Fix byte ordering of data in 'psci' node.
* Fix some problems regarding the size of data. In a number of places
  it was assumed data would be 32-bits wide.

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

10 years agoArmPkg/BdsLinuxFdt.c: Introduce cpu_to_fdtn() function.
oliviermartin [Sun, 12 May 2013 23:55:22 +0000 (23:55 +0000)]
ArmPkg/BdsLinuxFdt.c: Introduce cpu_to_fdtn() function.

Introduce cpu_to_fdtn() function which will call the appropriate 32-bit
or 64-bit version based on the size of a native integer.

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

10 years agoArmPkg/BdsLinuxFdt.c: Split PrepareFdt() into several functions.
oliviermartin [Sun, 12 May 2013 23:54:16 +0000 (23:54 +0000)]
ArmPkg/BdsLinuxFdt.c: Split PrepareFdt() into several functions.

PrepareFdt() function was getting pretty fat and big functions are more
complex to understand and find the information one is looking for.

This patch extracts some code from PrepareFdt() function and put it
in some new functions.

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

10 years agoArmPlatformPkg/ArmVExpressPkg: Switch from ATAG to FDT for VExpress RTSM
oliviermartin [Sun, 12 May 2013 23:46:47 +0000 (23:46 +0000)]
ArmPlatformPkg/ArmVExpressPkg: Switch from ATAG to FDT for VExpress RTSM

The FDT name are the one from Linaro release.

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

10 years agoArmPlatform/ArmPlatformLib: Introduced ArmPlatformPeiBootAction()
oliviermartin [Fri, 10 May 2013 12:49:10 +0000 (12:49 +0000)]
ArmPlatform/ArmPlatformLib: Introduced ArmPlatformPeiBootAction()

This function allows platform to do any specific actions prior to
the start the PEI phase.
For instance, this function could be used by some platforms to initialize clocks that
are required at the early stage of the PEI phase.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Acked-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14347 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoARM Packages: Replaced the macro GetCorePositionFromMpId() by the ArmPlatformGetCoreP...
oliviermartin [Fri, 10 May 2013 12:46:11 +0000 (12:46 +0000)]
ARM Packages: Replaced the macro GetCorePositionFromMpId() by the ArmPlatformGetCorePosition()

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Acked-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14346 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg/ArmPlatformLib: Added ArmPlatformGetPrimaryCoreMpId()
oliviermartin [Fri, 10 May 2013 12:44:30 +0000 (12:44 +0000)]
ArmPlatformPkg/ArmPlatformLib: Added ArmPlatformGetPrimaryCoreMpId()

ArmPlatformGetPrimaryCoreMpId returns the MPID of the primary core.
The primary core might not be known at build time (eg: the platform allows
the boot CPU to be changed through board config).

This function is used during the secondary core stack initialization to know
the position of the secondary core in the SoC.
A secondary core that is at the position N, with N greater than the primary
core position, will be at the position N-1 in the list of secondary stacks
(the primary core has its own separate bigger stack).

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Acked-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14345 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg/ArmPlatformLib: Added support for ArmPlatformIsPrimaryCore()
oliviermartin [Fri, 10 May 2013 12:41:27 +0000 (12:41 +0000)]
ArmPlatformPkg/ArmPlatformLib: Added support for ArmPlatformIsPrimaryCore()

Checking if a core if the primary/boot core used to be done with the macro
IS_PRIMARY_CORE().
Some platforms exposes configuration registers to change the primary core.
Replacing the macro IS_PRIMARY_CORE() by ArmPlatformIsPrimaryCore() allows
some flexibility in the way to check the primary core.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Acked-by: Ryan Harkin <ryan.harkin@linaro.org>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14344 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg/ArmPlatformLib.h: Removed non-required header file
oliviermartin [Fri, 10 May 2013 12:34:36 +0000 (12:34 +0000)]
ArmPlatformPkg/ArmPlatformLib.h: Removed non-required header file

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14343 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg/Sec: Replaced non-required 'blx' by 'bl'
oliviermartin [Fri, 10 May 2013 12:33:26 +0000 (12:33 +0000)]
ArmPlatformPkg/Sec: Replaced non-required 'blx' by 'bl'

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14342 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoMdeMdeModulePkg/Xhci: Clear BIOS_OWN semaphore before halting XHCI controller
erictian [Fri, 10 May 2013 05:23:39 +0000 (05:23 +0000)]
MdeMdeModulePkg/Xhci: Clear BIOS_OWN semaphore before halting XHCI controller

Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Steven Shi <steven.shi@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14339 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoMdeMdeModulePkg/UsbBusDxe: Break device enumeration process if the device descriptor...
erictian [Fri, 10 May 2013 05:19:30 +0000 (05:19 +0000)]
MdeMdeModulePkg/UsbBusDxe: Break device enumeration process if the device descriptor includes 0 configuration.

Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Mike Wu <mike.wu@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14338 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoShellPkg: Update behavior for GetTime() errors.
jcarsey [Thu, 9 May 2013 16:18:58 +0000 (16:18 +0000)]
ShellPkg: Update behavior for GetTime() errors.

Please find the attached patch that fixes the ShellPkg when gRT->GetTime() returns an error (eg: early UEFI platform bringup with a RTC controller that is not supported).
On some platforms, gRT->GetTime() might not return EFI_SUCCESS. The Shell must check the return status before to assume the returned time is valid.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <Olivier.Martin@arm.com>
Reviewed-by: Jaben Carsey <Jaben.Carsey@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14337 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoShellPkg: Return an error when it happens
jcarsey [Thu, 9 May 2013 16:16:21 +0000 (16:16 +0000)]
ShellPkg: Return an error when it happens

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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14336 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoCheck if video device exists before trying to install Video OpROM.
li-elvin [Thu, 9 May 2013 08:47:09 +0000 (08:47 +0000)]
Check if video device exists before trying to install Video OpROM.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14335 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoSkip PXE prompt/menu/discover if PXE_DISCOVERY_CONTROL tag bit 3 set.
sfu5 [Thu, 9 May 2013 05:28:27 +0000 (05:28 +0000)]
Skip PXE prompt/menu/discover if PXE_DISCOVERY_CONTROL tag bit 3 set.
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14332 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoUpdated connecting HOST version information from 1.3 to 1.3.1.
vanjeff [Wed, 8 May 2013 08:29:11 +0000 (08:29 +0000)]
Updated connecting HOST version information from 1.3 to 1.3.1.

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

10 years agoShellPkg: Fixed build error 'variable set but not used'
jcarsey [Tue, 7 May 2013 17:57:58 +0000 (17:57 +0000)]
ShellPkg: Fixed build error 'variable set but not used'

GCC toolchain cannot build ShellPkg.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
Signed-off-by: Olivier Martin <Olivier.Martin@arm.com>
Reviewed-by: Jaben Carsey <Jaben.Carsey@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14326 6f19259b-4bc3-4df7-8a09-765794883524

10 years ago1. Fix TOCTOU issue in VariableSmm, FtwSmm, FpdtSmm, SmmCorePerformance SMM handler...
lzeng14 [Tue, 7 May 2013 05:38:32 +0000 (05:38 +0000)]
1. Fix TOCTOU issue in VariableSmm, FtwSmm, FpdtSmm, SmmCorePerformance SMM handler. For VariableSmm, pre-allocate a mVariableBufferPayload buffer with mVariableBufferPayloadSize(match with mVariableBufferPayloadSize in VariableSmmRuntimeDxe) to hold communicate buffer payload to avoid TOCTOU issue.
2. Add check to ensure CommBufferPayloadSize not exceed mVariableBufferPayloadSize or is enough to hold function structure in VariableSmm and FtwSmm.
3. Align FtwGetLastWrite() in FaultTolerantWriteSmmDxe.c to FtwGetLastWrite() in FaultTolerantWrite.c.

Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14325 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoRead/Write memory space including MMIO range with the width requested from HOST.
vanjeff [Mon, 6 May 2013 07:36:32 +0000 (07:36 +0000)]
Read/Write memory space including MMIO range with the width requested from HOST.

Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Kinney, Michael D <michael.d.kinney@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14324 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoFix memory overflow & VariableSize check issue for SetVariable append write.
czhang46 [Thu, 2 May 2013 01:42:39 +0000 (01:42 +0000)]
Fix memory overflow & VariableSize check issue for SetVariable append write.

Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by  : Fu Siyuan  <siyuan.fu@intel.com>
Reviewed-by  : Dong Guo   <guo.dong@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14323 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoFix the bug which incorrectly programs the 64bit base address register in the PCI...
niruiyu [Sat, 27 Apr 2013 02:03:58 +0000 (02:03 +0000)]
Fix the bug which incorrectly programs the 64bit base address register in the PCI to PCI bridge.

Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Elvin Li <elvin.li@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14318 6f19259b-4bc3-4df7-8a09-765794883524

10 years ago1. Use the check IsAddressValid() to prevent SMM communication buffer overflow in...
lzeng14 [Thu, 25 Apr 2013 10:49:45 +0000 (10:49 +0000)]
1. Use the check IsAddressValid() to prevent SMM communication buffer overflow in SmmVariable, FtwSmm, FpdtSmm, SmmCorePerformance and SmmBaseHelper, and add check to prevent InfoSize overflows in SmmVariableHandler.
2. Refine the debug message.
3. Add check to make sure the input VariableName is A Null-terminated string.
4. Use local variable to hold StrSize (VariableName) to avoid duplicated StrSize calculation.

Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14317 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoCheck for NULL pointer before free it.
sfu5 [Thu, 25 Apr 2013 01:38:06 +0000 (01:38 +0000)]
Check for NULL pointer before free it.
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Dong Guo <guo.dong@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14316 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoUpdate dual network stack drivers to produce multiple Driver Binding Protocol.
sfu5 [Thu, 25 Apr 2013 01:33:43 +0000 (01:33 +0000)]
Update dual network stack drivers to produce multiple Driver Binding Protocol.
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Ouyang Qian <qian.ouyang@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14315 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoFix ping command issue in IP4 driver.
sfu5 [Thu, 25 Apr 2013 01:25:49 +0000 (01:25 +0000)]
Fix ping command issue in IP4 driver.
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Ouyang Qian <qian.ouyang@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14314 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoGet ParentDevicePath by using attribute EFI_OPEN_PROTOCOL_GET_PROTOCOL instead of...
sfu5 [Thu, 25 Apr 2013 01:18:58 +0000 (01:18 +0000)]
Get ParentDevicePath by using attribute EFI_OPEN_PROTOCOL_GET_PROTOCOL instead of BY_CHILD.
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Ouyang Qian <qian.ouyang@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14313 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoMallicious code may use SmmFaultTolerantWriteHandler() to update some flash area...
lzeng14 [Wed, 24 Apr 2013 09:33:48 +0000 (09:33 +0000)]
Mallicious code may use SmmFaultTolerantWriteHandler() to update some flash area directly, like Variable region, so return EFI_ACCESS_DENIED after End Of Dxe in SmmFaultTolerantWriteHandler().
And add code to prevent InfoSize overflow.

Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14312 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoRemove the blank line between InitializeLangVariable() and it's function header.
lzeng14 [Tue, 23 Apr 2013 12:48:07 +0000 (12:48 +0000)]
Remove the blank line between InitializeLangVariable() and it's function header.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14311 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoRemove unused [Guids] section from PXE inf file.
sfu5 [Tue, 23 Apr 2013 05:50:55 +0000 (05:50 +0000)]
Remove unused [Guids] section from PXE inf file.
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Ouyang Qian <qian.ouyang@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14310 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoThe openssl API RSA_public_decrypt() and RSA_private_encrypt() are deprecated, use...
sfu5 [Tue, 23 Apr 2013 01:52:17 +0000 (01:52 +0000)]
The openssl API RSA_public_decrypt() and RSA_private_encrypt() are deprecated, use RSA_sign(), RSA_verify() instead.
Signed-off-by: Long Qin < qin.long@intel.com >
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Dong Guo <guo.dong@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14309 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoFix GCC build failure caused by R14307.
lzeng14 [Tue, 23 Apr 2013 01:42:35 +0000 (01:42 +0000)]
Fix GCC build failure caused by R14307.

Signed-off-by: Signed-off-by: Isakov S.L. <isakov-sl@bk.ru>
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14308 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoEnhance InitializeLanguage() to set PcdUefiVariableDefaultPlatformLang to PlatformLan...
lzeng14 [Mon, 22 Apr 2013 09:51:19 +0000 (09:51 +0000)]
Enhance InitializeLanguage() to set PcdUefiVariableDefaultPlatformLang to PlatformLang variable if the value of PlatformLang variable has been set an unsupported value(not one of PlatformLangCodes variable), and assert when default (Platform)Lang PCD value is not set to one of (Platform)LangCodes PCD value.

Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14307 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoAdd security check.
vanjeff [Mon, 22 Apr 2013 08:58:27 +0000 (08:58 +0000)]
Add security check.

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

10 years agoFix potential overflow for SetVariable interface
czhang46 [Mon, 22 Apr 2013 08:52:58 +0000 (08:52 +0000)]
Fix potential overflow for SetVariable interface

Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by  : Guo Dong   <dong.guo@intel.com>
Reviewed-by  : Siyuan Fu  <siyuan.fu@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14305 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoCheck-in missing part at r14302.
vanjeff [Sat, 20 Apr 2013 04:25:58 +0000 (04:25 +0000)]
Check-in missing part at r14302.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14303 6f19259b-4bc3-4df7-8a09-765794883524

10 years ago1. Add CPU arch type in Mailbox, debug agent will not access HOB if CPU arch changed.
vanjeff [Sat, 20 Apr 2013 03:34:16 +0000 (03:34 +0000)]
1. Add CPU arch type in Mailbox, debug agent will not access HOB if CPU arch changed.
2. Updated DxeDebugAgentLib instance to copy DebugPortHandler buffer into allocated ACPIMemoryNVS besides the mailbox.
3. Remove deprecated SendingPacket from mailbox.

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

10 years agoAdd transit bit check for detecting partial response in iSCSI stack.
tye1 [Fri, 19 Apr 2013 06:39:30 +0000 (06:39 +0000)]
Add transit bit check for detecting partial response in iSCSI stack.

Signed-off-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Tian Feng <feng.tian@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14296 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoAdd transit bit check for detecting partial response in iSCSI stack.
tye1 [Fri, 19 Apr 2013 06:19:40 +0000 (06:19 +0000)]
Add transit bit check for detecting partial response in iSCSI stack.

Signed-off-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Tian Feng <feng.tian@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14294 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoFix a potential SMM memory dump issue. If pass communication buffer with DataBuffer...
czhang46 [Fri, 19 Apr 2013 01:35:02 +0000 (01:35 +0000)]
Fix a potential SMM memory dump issue. If pass communication buffer with DataBuffer to SMM SetVariable which is big enough to cover SMM range. Then GetVariable can dump SMM memory contents. Add more range check for SetVariable

Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by  : Dong Guo   <guo.dong@intel.com>
Reviewed-by  : Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14292 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoShellPkg: explicitly prevent dereferencing pointer
jcarsey [Thu, 18 Apr 2013 16:05:59 +0000 (16:05 +0000)]
ShellPkg: explicitly prevent dereferencing pointer

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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14291 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoEnhance DebugCommunicationLibUsb to reset the debug port when the PORT_ENABLE bit...
niruiyu [Thu, 18 Apr 2013 05:56:04 +0000 (05:56 +0000)]
Enhance DebugCommunicationLibUsb to reset the debug port when the PORT_ENABLE bit is not set.

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

11 years agoAllocate ACPImemoryNVS type memory to save mailbox and debug port handle buffer since...
vanjeff [Thu, 18 Apr 2013 05:08:50 +0000 (05:08 +0000)]
Allocate ACPImemoryNVS type memory to save mailbox and debug port handle buffer since original allocated pool memory may be marked as free by DXE Core.

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

11 years agoMdeModulePkg/AtaBus: AtaBusDxe module would ignore ATA Pass Thru Protocol instances...
erictian [Thu, 18 Apr 2013 02:08:51 +0000 (02:08 +0000)]
MdeModulePkg/AtaBus: AtaBusDxe module would ignore ATA Pass Thru Protocol instances that do not have the LOGICAL attribute set

Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14284 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoUpdate code not to block application/driver load when event log is full.
gdong1 [Thu, 18 Apr 2013 01:47:34 +0000 (01:47 +0000)]
Update code not to block application/driver load when event log is full.

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

11 years agoRevert change 14281, should not check in here.
ydong10 [Wed, 17 Apr 2013 01:35:45 +0000 (01:35 +0000)]
Revert change 14281, should not check in here.

Signed-off-by: Eric Dong
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14282 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoSplit browser with browser core and display engine.
ydong10 [Wed, 17 Apr 2013 01:32:33 +0000 (01:32 +0000)]
Split browser with browser core and display engine.
First Version, goal:
  1.Display Engine has the framework.
  2.Browser core ready.(PasswordCheck, ValidateQuestionV not ready)

Signed-off-by: Eric Dong
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14281 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoUpdate the browser logic, make the storage as browser level instead of form set level.
ydong10 [Tue, 16 Apr 2013 10:53:22 +0000 (10:53 +0000)]
Update the browser logic, make the storage as browser level instead of form set level.

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

11 years agoMdeMdeModulePkg/BootScriptExecutorDxe: Replaces absolute addressing that requires...
erictian [Tue, 16 Apr 2013 02:45:36 +0000 (02:45 +0000)]
MdeMdeModulePkg/BootScriptExecutorDxe: Replaces absolute addressing that requires a relocation entry with PC relative addressing that does not require a relocation entry. This patch is required to make this file assemble and link with Xcode

Signed-off-by: Andrew Fish <afish@apple.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14279 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoFix SMM Variable driver stack GetVariable return INVALID_PARAMETER when DataSize...
czhang46 [Mon, 15 Apr 2013 01:56:31 +0000 (01:56 +0000)]
Fix SMM Variable driver stack GetVariable return INVALID_PARAMETER when DataSize is bigger than SMM communication buffer.

Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by  : Dong Guo   <guo.dong@intel.com>
Reviewed-by  : Fu Siyuan  <siyuan.fu@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14276 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoArmPkg/BdsLib: Added support for FDT alignment through PcdArmLinuxFdtAlignment
oliviermartin [Sun, 14 Apr 2013 09:36:41 +0000 (09:36 +0000)]
ArmPkg/BdsLib: Added support for FDT alignment through PcdArmLinuxFdtAlignment

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

11 years agoArmPkg: Delete PCD value PcdArmLinuxKernelFixedOffset.
oliviermartin [Sun, 14 Apr 2013 09:35:44 +0000 (09:35 +0000)]
ArmPkg: Delete PCD value PcdArmLinuxKernelFixedOffset.

PcdArmLinuxKernelFixedOffset is supposed to indicate the offset from
the beginning of the system memory at which the kernel will be loaded.

However, this PCD value is not used at all. Instead the kernel is loaded
just below a certain limit indicated by PCD value PcdArmLinuxKernelMaxOffset.

This patch deletes PCD value PcdArmLinuxKernelFixedOffset to avoid any
confusion.

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

11 years agoArmPkg/BdsLib: Fix uInitrd detection
oliviermartin [Sun, 14 Apr 2013 09:34:48 +0000 (09:34 +0000)]
ArmPkg/BdsLib: Fix uInitrd detection

This patch corrects a problem detecting uInitrd signature when booting
with FDT.

BdsBootLinuxFdt was attempting to read the signature from InitrdImage which
is zero at this point in the code.  The code now reads the signature from
InitrdImageBase.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14272 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoArmPkg/BdsLib: Do not create additional 'cpu' nodes if the 'cpus' node already exist
oliviermartin [Sun, 14 Apr 2013 09:33:35 +0000 (09:33 +0000)]
ArmPkg/BdsLib: Do not create additional 'cpu' nodes if the 'cpus' node already exist

UEFI must not add additional 'cpu' nodes if the 'cpus' node was already present.

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

11 years agoArmPlatformPkg: Remove an unused function.
oliviermartin [Sun, 14 Apr 2013 09:32:45 +0000 (09:32 +0000)]
ArmPlatformPkg: Remove an unused function.

ArmPlatformGetAdditionalSystemMemory() function wasn't used anywhere in UEFI.
This patch deletes it.

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

11 years agoRemove unused L2 controller PCD from platform files.
oliviermartin [Sun, 14 Apr 2013 09:31:47 +0000 (09:31 +0000)]
Remove unused L2 controller PCD from platform files.

Only the Cortex A9 based platforms have an external L2 controller.

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

11 years agoArmPkg/BdsLib: Replace ARM magic value by a proper defined value.
oliviermartin [Sun, 14 Apr 2013 09:30:46 +0000 (09:30 +0000)]
ArmPkg/BdsLib: Replace ARM magic value by a proper defined value.

"ARMH" is the Four-Letter unique identifier used by ARM in the context
of the fast SMC identification interface.

This patch properly defines this value in a header file instead
of using the numeric value directly in the code.

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