]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
11 years agoARM Packages: Fixed line endings
oliviermartin [Fri, 25 Jan 2013 11:28:06 +0000 (11:28 +0000)]
ARM Packages: Fixed line endings

This large code change only modifies the line endings to be CRLF to be
compliant with the EDK2 coding convention document.

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

11 years agoCheck the input VaraibleName for db/dbx when appending variables with formatted as...
sfu5 [Fri, 25 Jan 2013 07:14:43 +0000 (07:14 +0000)]
Check the input VaraibleName for db/dbx when appending variables with formatted as EFI_SIGNATURE_LIST.

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

11 years agoCheck for NULL pointer before dereference it.
sfu5 [Fri, 25 Jan 2013 07:12:25 +0000 (07:12 +0000)]
Check for NULL pointer before dereference 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@14086 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoVariables with state VAR_ADDED&VAR_IN_DELETED_TRANSITION should be considered as...
lzeng14 [Fri, 25 Jan 2013 06:17:43 +0000 (06:17 +0000)]
Variables with state VAR_ADDED&VAR_IN_DELETED_TRANSITION should be considered as valid variables if there is no duplicated ones with VAR_ADDED state.

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

11 years agoAdd NULL pointer check.
lzeng14 [Fri, 25 Jan 2013 04:48:41 +0000 (04:48 +0000)]
Add NULL pointer check.

Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14084 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoThis revision can only work with Intel(c) UDK Debugger Tool version 1.3 or greater...
vanjeff [Fri, 25 Jan 2013 02:36:18 +0000 (02:36 +0000)]
This revision can only work with Intel(c) UDK Debugger Tool version 1.3 or greater. Detailed change log is as below:
1. Add DebugAgentPei driver to initialize Debug Agent in PEI phase.
   Add DebugAgentDxe driver to initialize Debug Agent in DXE phase.
   DebugAgentDxe driver could be loaded and unloaded in shell.
2. Update the SourceLevelDebugPkg so that the debug agent can be initialized in any phase: SEC, PEI or DXE.
3. Add an enhanced retry algorithm that provides a robust connection when data loss happens in the debug channel.
4. Clear DR7 register in exception handler.
5. Set the default serial port parameter to 0 instead of PCDs.
6. Build pointer of Mailbox in HOB instead of Mailbox itself, since HOB may be moved at DXE entry point function.
7. Raise TPL to prevent recursion from EFI timer interrupts in SerialIo.c.
8. Add one spin lock for accessing Mailbox when MP debugging supported.
9. Use more non-NULL library instances in SourceLevelDebugPkg DSC file, thus DebugAgentDxe.efi built from SourceLevelDebugPkg could work in shell.
10.Separate all operations about IDT table entry from SecDebugAgentLib.c into DebugAgent\DebugAgentCommon's arch sub-directory.
11.Enhance Debug Agent to avoid breaking by hardware SMI during DXE debugging phase.
12.Add supporting on mode switch code debugging.
13.Remove reset Host Controller operation in DebugCommunicationLibUsb.c to avoid impacting EDKII usb stack.
14.Fix debug timer interrupt missing issue after back from legacy code.

Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-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@14083 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoFix infinite loop bug in secure boot UI driver.
sfu5 [Fri, 25 Jan 2013 02:01:47 +0000 (02:01 +0000)]
Fix infinite loop bug in secure boot UI driver.

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

11 years agoFixed some alignment faults in IPF platform
ydong10 [Fri, 25 Jan 2013 02:00:22 +0000 (02:00 +0000)]
Fixed some alignment faults in IPF platform

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

11 years agoRefine code to follow coding style.
ydong10 [Thu, 24 Jan 2013 08:46:59 +0000 (08:46 +0000)]
Refine code to follow coding style.

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

11 years agoFix TPM may be locked twice issue in normal boot.
gdong1 [Thu, 24 Jan 2013 07:14:28 +0000 (07:14 +0000)]
Fix TPM may be locked twice issue in normal boot.

Signed-off-by: Dong Guo <guo.dong@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@14079 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoFix xcode tool chain assembly issue.
andrewfish [Wed, 23 Jan 2013 00:21:57 +0000 (00:21 +0000)]
Fix xcode tool chain assembly issue.

Contributed-under: TianoCore Contribution Agrement 1.0
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
signed-off-by: Andrew Fish <afish@apple.com>

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

11 years agoRefine the sample about how to convert the device path to string.
ydong10 [Tue, 22 Jan 2013 09:51:19 +0000 (09:51 +0000)]
Refine the sample about how to convert the device path to string.

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

11 years agoUpdate the code of processing device path info in browser to follow UEFI spec.
ydong10 [Tue, 22 Jan 2013 09:49:44 +0000 (09:49 +0000)]
Update the code of processing device path info in browser to follow UEFI spec.

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

11 years agoTake the highest horizontal resolution as highest video resolution.
li-elvin [Tue, 22 Jan 2013 06:37:06 +0000 (06:37 +0000)]
Take the highest horizontal resolution as highest video resolution.

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

11 years agoTake the highest horizontal resolution as highest video resolution.
li-elvin [Tue, 22 Jan 2013 06:35:57 +0000 (06:35 +0000)]
Take the highest horizontal resolution as highest video resolution.

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

11 years agoParse full EDID data to get all video resolutions supported by monitors.
li-elvin [Tue, 22 Jan 2013 06:18:50 +0000 (06:18 +0000)]
Parse full EDID data to get all video resolutions supported by monitors.

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

11 years agoRefine the menu display logic, support menus with more than one page of options.
ydong10 [Tue, 22 Jan 2013 06:08:24 +0000 (06:08 +0000)]
Refine the menu display logic, support menus with more than one page of options.

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

11 years agoAppPkg/Applications/Python: Add support for the pyexpat module.
darylm503 [Fri, 18 Jan 2013 20:36:27 +0000 (20:36 +0000)]
AppPkg/Applications/Python: Add support for the pyexpat module.

Add required flags to [BuildOptions] in PythonCore.inf.
Add initialization routine to Efi/config.c.
Alter #include targets if building for UEFI in expat_external.h and xmlparse.c.
Add expat modifications to PyMod-2.7.2/Modules/expat.

Contributed-under: TianoCore Contribution Agreement 1.0
Submitted-by: Duane Voth <duanev@gmail.com>
Signed-off-by: daryl.mcdaniel@intel.com
Reviewed-by: duanev@gmail.com
Reviewed-by: daryl.mcdaniel@intel.com
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14071 6f19259b-4bc3-4df7-8a09-765794883524

11 years ago1. Update the logic of UpdateVariable() for updating variable from:
lzeng14 [Fri, 18 Jan 2013 01:12:32 +0000 (01:12 +0000)]
1. Update the logic of UpdateVariable() for updating variable from:
set old variable to IN_DELETED_TRANSITION -> check if reclaim is needed(If yes, do reclaim) -> add new variable -> set old variable to DELETED if no reclaim happened.
to:
set old variable to IN_DELETED_TRANSITION -> check if reclaim is needed(If yes, do reclaim) -> add new variable -> set old variable to DELETED.
2. Update UpdateVariable() to correctly handle the case "both ADDED and IN_DELETED_TRANSITION variable are present", and delete both old ADDED and IN_DELETED_TRANSITION variable when deleting or updating variable.
3. Update VariableServiceGetNextVariableName() to return the valid IN_DELETED_TRANSITION variable if only IN_DELETED_TRANSITION variable is present.

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

11 years agoShellPkg: Fix pointer initialization error of “ShellOpt” Shell environment variable
jcarsey [Thu, 17 Jan 2013 19:04:36 +0000 (19:04 +0000)]
ShellPkg: Fix pointer initialization error of “ShellOpt” Shell environment variable

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

11 years agoShellPkg: Minor change to EDIT and HEXEDIT commands to make the title bars consistent...
jcarsey [Thu, 17 Jan 2013 19:04:02 +0000 (19:04 +0000)]
ShellPkg: Minor change to EDIT and HEXEDIT commands to make the title bars consistent and remove unnecessary “2.0” string

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

11 years agoFix ICC11(VS2005) build failure.
lzeng14 [Thu, 17 Jan 2013 03:28:05 +0000 (03:28 +0000)]
Fix ICC11(VS2005) build failure.

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

11 years agoStdLib & AppPkg: Update the list of known ISSUES.
darylm503 [Wed, 16 Jan 2013 23:58:35 +0000 (23:58 +0000)]
StdLib & AppPkg: Update the list of known ISSUES.

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

11 years agoStdLib: Correct two instances of mismatch between function declaration and definition...
darylm503 [Wed, 16 Jan 2013 23:45:54 +0000 (23:45 +0000)]
StdLib: Correct two instances of mismatch between function declaration and definition causing GCC compile errors.

StdLib\Include\Containers\Fifo.h
  Change return type of cFIFO_Truncate to size_t.  Makes declaration match definition.
  Update comment to describe what is returned.

StdLib\LibC\Uefi\InteractiveIO\IIOutilities.c
  Change return type of IIO_CursorDelta to int. Makes declaration match definition.
  Change other types from INT32 to int, for consistency.
  Update comment for returned values.

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

11 years agoAppPkg/Applications/Main/Main.c: Remove EFIAPI from the definition of the main()...
darylm503 [Wed, 16 Jan 2013 23:45:13 +0000 (23:45 +0000)]
AppPkg/Applications/Main/Main.c: Remove EFIAPI from the definition of the main() function.

The main() function should not be declared as EFIAPI.  To do so conflicts with the C specification and does not match the internal declaration of main().

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

11 years agoList of known issues with the items contained within AppPkg.
darylm503 [Wed, 16 Jan 2013 16:37:01 +0000 (16:37 +0000)]
List of known issues with the items contained within AppPkg.

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

11 years agoList of known issues with StdLib.
darylm503 [Wed, 16 Jan 2013 16:33:26 +0000 (16:33 +0000)]
List of known issues with StdLib.

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

11 years agoFix build failure.
lzeng14 [Wed, 16 Jan 2013 10:14:36 +0000 (10:14 +0000)]
Fix build failure.

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

11 years agoOvmfPkg: Fix Xcode assembly issue
jljusten [Wed, 16 Jan 2013 06:50:35 +0000 (06:50 +0000)]
OvmfPkg: Fix Xcode assembly issue

The Xcode assembler is much pickier than GCC. Also the 64-bit
linker is not a fan of relocations so it is better to us IP
relative code, but at least it removes a relocation entry.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Andrew Fish <afish@apple.com>
[jordan.l.justen@intel.com: use .byte for retfq rather than lret]
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14055 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoOvmfPkg/build.sh: Fix compilation error on OS X
jljusten [Wed, 16 Jan 2013 06:50:21 +0000 (06:50 +0000)]
OvmfPkg/build.sh: Fix compilation error on OS X

This patch sets the default TARGET_TOOLS/PROCESSOR on Darwin/Linux platforms.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Pike R. Alpha <pikeralpha@yahoo.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14054 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoOvmfPkg: LoadLinuxLib: Use kernel's EFI entry point where available
jljusten [Wed, 16 Jan 2013 06:50:08 +0000 (06:50 +0000)]
OvmfPkg: LoadLinuxLib: Use kernel's EFI entry point where available

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

11 years agoOvmfPkg: LoadLinuxLib: Zero kernel parameters instead of passing garbage
jljusten [Wed, 16 Jan 2013 06:49:45 +0000 (06:49 +0000)]
OvmfPkg: LoadLinuxLib: Zero kernel parameters instead of passing garbage

We're supposed to zero everything in the kernel bootparams that we don't
explicitly initialise, other than the setup_header from 0x1f1 onwards
for a precisely defined length, which is copied from the bzImage.

We're *not* supposed to just pass the garbage that we happened to find
in the bzImage file surrounding the setup_header.

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

11 years agoOvmfPkg: LoadLinuxLib: Fix check for relocatable kernel
jljusten [Wed, 16 Jan 2013 06:49:27 +0000 (06:49 +0000)]
OvmfPkg: LoadLinuxLib: Fix check for relocatable kernel

Boot protocol 2.05 just means that the relocatable_kernel field is present
in the header. We should actually check that it's *set*.

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

11 years agoFix the issue that RuntimeServiceQueryVariableInfo() in VariableSmmRuntimeDxe always...
lzeng14 [Tue, 15 Jan 2013 06:43:24 +0000 (06:43 +0000)]
Fix the issue that RuntimeServiceQueryVariableInfo() in VariableSmmRuntimeDxe always return EFI_SUCCESS.

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

11 years agoFollow UEFI spec, clean the CRC32 field before calculate CRC for system table.
ydong10 [Tue, 15 Jan 2013 06:38:45 +0000 (06:38 +0000)]
Follow UEFI spec, clean the CRC32 field before calculate CRC for system table.

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

11 years agoThe unit of Duration for S3BootScriptSaveMemPoll() is us, but not ns, so update BootS...
lzeng14 [Tue, 15 Jan 2013 05:18:19 +0000 (05:18 +0000)]
The unit of Duration for S3BootScriptSaveMemPoll() is us, but not ns, so update BootScriptExecuteMemPoll() to use MicroSecondDelay() instead of NanoSecondDelay(), and update BootScriptWriteMemPoll() to use S3BootScriptSaveMemPoll() correctly with possible minimum deviation.

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

11 years agoUpdate IPv6 configuration UI: 1) keep addresses blank when enter ‘Advanced Configurat...
tye1 [Tue, 15 Jan 2013 02:19:42 +0000 (02:19 +0000)]
Update IPv6 configuration UI: 1) keep addresses blank when enter ‘Advanced Configuration’ page; 2) Save parameters in ‘Advanced Configuration’ immediately when user press ‘Commit Changes and Exit’ .

Signed-off-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ouyang Qian <qian.ouyang@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14047 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoRemove the meaningless compare code.
ydong10 [Mon, 14 Jan 2013 06:18:50 +0000 (06:18 +0000)]
Remove the meaningless compare code.

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

11 years agoOvmfPkg: LoadLinuxLib: Fix kernel entry for 64-bit OVMF
jljusten [Mon, 14 Jan 2013 03:10:57 +0000 (03:10 +0000)]
OvmfPkg: LoadLinuxLib: Fix kernel entry for 64-bit OVMF

We currently just jump to offset 0x200 in the kernel image, in 64-bit
mode. This is completely broken. If it's a 32-bit kernel, we'll be
jumping into the compressed data payload.

If it's a 64-bit kernel, it'll work... but the 0x200 offset is
explicitly marked as 'may change in the future', has already changed
from 0x100 to 0x200 in the past with no fanfare, and bootloaders are
instructed that they should look at the ELF header to find the offset.
So although it does actually work today, it's still broken in the
"someone needs to whipped for doing it this way" sense of the word.

In fact, the same bug exists in other bootloaders so the 0x200 offset
probably *is* now set in stone. But still it's only valid to use it if
we *know* it's a 64-bit kernel. And we don't. There *is* no ELF header
that we can look at when we're booting a bzImage, and we can't rely on
it having a PE/COFF header either.

The 32-bit entry point is always guaranteed to work, and we need to
support it anyway. So let's just *always* use it, in 32-bit mode, and
then we don't have to make up some horrible heuristics for detecting
32-bit vs. 64-bit kernels.

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

11 years agoUse EFI_IFR_TYPE_VALUE type variable instead of UINT64 to avoid buffer overflow.
ydong10 [Thu, 10 Jan 2013 03:01:16 +0000 (03:01 +0000)]
Use EFI_IFR_TYPE_VALUE type variable instead of UINT64 to avoid buffer overflow.

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

11 years agoFix the bug that the device claiming too much resource cannot be rejected by the...
niruiyu [Wed, 9 Jan 2013 08:02:29 +0000 (08:02 +0000)]
Fix the bug that the device claiming too much resource cannot be rejected by the PciBus driver.

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

11 years ago1. Set the secure boot state to Standard Mode when user leaving secure boot setup...
sfu5 [Wed, 9 Jan 2013 05:19:43 +0000 (05:19 +0000)]
1. Set the secure boot state to Standard Mode when user leaving secure boot setup page.
2. Add “Current SecureBoot State” field to reflect current secure boot status of the platform.

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

11 years agoFix a bug that the invalid public key will never be removed from public key database.
sfu5 [Wed, 9 Jan 2013 05:09:39 +0000 (05:09 +0000)]
Fix a bug that the invalid public key will never be removed from public key database.

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

11 years agoAllocate temp buffer instead of change the input string to avoid crush.
ydong10 [Tue, 8 Jan 2013 08:30:51 +0000 (08:30 +0000)]
Allocate temp buffer instead of change the input string to avoid crush.

Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14040 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoFix several RFC compliance issues in DHCP6 driver as below.
sfu5 [Tue, 8 Jan 2013 08:28:11 +0000 (08:28 +0000)]
Fix several RFC compliance issues in DHCP6 driver as below.
1. Client must ignore any Advertise message that includes a Status Code option containing the value NoAddrsAvail.
2. The elapsed-time should start from the current DHCP transaction.
3. Client should not change any information about addresses the client has recorded in the IA but not included in the IA from the server.
4. Client need to update to handle the error status code UnspecFail/UseMulticast/NotOnLink/NoBinding in the Reply message from server.
5. When the client receives a Reply message in response to a Renew/ Rebind message, the client examines each IA independently. For each IA in the original Renew/ Rebind message, the client sends a Renew/ Rebind if the IA is not in the Reply message.
6. Client should uses network byte order in IANA T1/T2 option
7. Client should discard any addresses for which the preferred lifetime is greater than the valid lifetime.

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

11 years agoAdd the TPL raise/restore code for VariableSmmRuntimeDxe to avoid variable services...
lzeng14 [Tue, 8 Jan 2013 02:07:14 +0000 (02:07 +0000)]
Add the TPL raise/restore code for VariableSmmRuntimeDxe to avoid variable services reentry.

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

11 years agoCurrent Thunk16.asm implementation clears reserved bits, which does not follow IA32...
li-elvin [Mon, 7 Jan 2013 07:12:19 +0000 (07:12 +0000)]
Current Thunk16.asm implementation clears reserved bits, which does not follow IA32 SDM. Now the fix is to only clear PAE and PSE bit of CR4 for real mode.

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

11 years agoBase on the type field to get the width of value field for option opcode.
ydong10 [Sun, 6 Jan 2013 06:12:50 +0000 (06:12 +0000)]
Base on the type field to get the width of value field for option 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@14036 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoBase on the type field to generate oneof opcode.
ydong10 [Sun, 6 Jan 2013 06:09:43 +0000 (06:09 +0000)]
Base on the type field to generate 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@14035 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoBase on the type field to generate numeric opcode.
ydong10 [Sun, 6 Jan 2013 06:07:38 +0000 (06:07 +0000)]
Base on the type field to generate numeric 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@14034 6f19259b-4bc3-4df7-8a09-765794883524

11 years ago1. Don't assume that flush the HOB variable to flash must be successful.
lzeng14 [Fri, 4 Jan 2013 12:21:59 +0000 (12:21 +0000)]
1. Don't assume that flush the HOB variable to flash must be successful.
2. When no DELETED variable found, no variable space could be reclaimed, so just give some debug info and return EFI_SUCCESS.

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

11 years agoMdeModulePkg/AtaBus&ScsiBus: Dynamically calculate how long shall we wait for the...
erictian [Fri, 4 Jan 2013 06:03:52 +0000 (06:03 +0000)]
MdeModulePkg/AtaBus&ScsiBus: Dynamically calculate how long shall we wait for the finish of a read/write operation according to the actual transfer length

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

11 years agoMdeModulePkg/AtaAtapiPassThru: Not set AhciCmdC bit of CommandList when doing transac...
erictian [Fri, 4 Jan 2013 05:58:24 +0000 (05:58 +0000)]
MdeModulePkg/AtaAtapiPassThru: Not set AhciCmdC bit of CommandList when doing transaction as AHCI spec say this bit is only used to do soft reset

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

11 years ago1. Enable the whole X509v3 extension checking.
sfu5 [Fri, 28 Dec 2012 01:20:57 +0000 (01:20 +0000)]
1. Enable the whole X509v3 extension checking.
2. Replace d2i_X509_bio with d2i_X509.

Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ling Qin <qin.long@intel.com>
Reviewed-by: Ouyang Qian <qian.ouyang@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14026 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoChecks the TE image before use it.
ydong10 [Wed, 26 Dec 2012 04:33:15 +0000 (04:33 +0000)]
Checks the TE image before use it.

Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Yao, Jiewen <jiewen.yao@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14024 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoSet graphic mode if graphic mode is not same with the one which GraphicsConsole drive...
li-elvin [Tue, 25 Dec 2012 08:21:01 +0000 (08:21 +0000)]
Set graphic mode if graphic mode is not same with the one which GraphicsConsole driver find by itself.

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

11 years agoMdeMdeModulePkg/Ehci: Add logic to dispatch OHCI driver first if the companion contro...
erictian [Tue, 25 Dec 2012 06:35:11 +0000 (06:35 +0000)]
MdeMdeModulePkg/Ehci: Add logic to dispatch OHCI driver first if the companion controller is OHCI.

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

11 years agoMdeMdeModulePkg/Xhci: Fix a wrong conditional judgment which bring assertion with...
erictian [Tue, 25 Dec 2012 06:31:41 +0000 (06:31 +0000)]
MdeMdeModulePkg/Xhci: Fix a wrong conditional judgment which bring assertion with 1.0 hub.

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

11 years agoAdd ASSERT() for BitField operations to make sure the input value is valid.
lgao4 [Tue, 25 Dec 2012 02:29:46 +0000 (02:29 +0000)]
Add ASSERT() for BitField operations to make sure the input value is valid.
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Kinney, Michael D <Michael.D.Kinney@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14020 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoAdd ASSERT() for BitField operations to make sure the input value is valid.
lgao4 [Tue, 25 Dec 2012 02:25:50 +0000 (02:25 +0000)]
Add ASSERT() for BitField operations to make sure the input value is valid.
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Kinney, Michael D <Michael.D.Kinney@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14019 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoDetect some unsupported cases when save boot script, then return error early.
lzeng14 [Mon, 24 Dec 2012 06:58:13 +0000 (06:58 +0000)]
Detect some unsupported cases when save boot script, then return error early.
1. PciCfg Read/Write doesn't support UINT64 width.
2. PciCfg2 Segment must be zero.

Move CheckParameters () to BootScriptSave.c to check parameter early.
Add code for EfiSmbusBWBRProcessCall operation, and let the SmbusLib instance to decide if it is supported or not.

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

11 years ago1. Fix buffer overflow bugs in SNP, MNP and IP6 driver.
sfu5 [Mon, 24 Dec 2012 02:52:27 +0000 (02:52 +0000)]
1. Fix buffer overflow bugs in SNP, MNP and IP6 driver.
2. Fix GCC build fail issue in DxeNetLib.

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

11 years agoUpdate to build with 10.8 OS X Frameworks. This is a Mac only change.
andrewfish [Sat, 22 Dec 2012 00:47:17 +0000 (00:47 +0000)]
Update to build with 10.8 OS X Frameworks. This is a Mac only change.

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

11 years agoSync with EmulatorPkg changes.
andrewfish [Sat, 22 Dec 2012 00:45:55 +0000 (00:45 +0000)]
Sync with EmulatorPkg changes.

signed-off-by:afish@apple.com

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

11 years agoFix structure init issues.
andrewfish [Sat, 22 Dec 2012 00:44:04 +0000 (00:44 +0000)]
Fix structure init issues.

signed-off-by:afish@apple.com

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

11 years agoStdLib: Fix issue with Canonical output expansion of NL to CR NL and similar expansions.
darylm503 [Fri, 21 Dec 2012 18:19:41 +0000 (18:19 +0000)]
StdLib: Fix issue with Canonical output expansion of NL to CR NL and similar expansions.

SysCalls.c: Add IGNSPEC to the "sane" termios settings so that, by default, function keys and other special keys are ignored.

fvwrite.c:
  Line 109: Change test to less-than zero since zero is a valid value.
  Line 113: Change test to greater-than zero since we only want to loop when there are characters available.
  Line 114: Force uio_resid to zero since it might have become negative on line 113.

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

11 years agoInitialize a local work space header to be used by IsValidWorkSpace() and InitWorkSpa...
lzeng14 [Fri, 21 Dec 2012 00:52:57 +0000 (00:52 +0000)]
Initialize a local work space header to be used by IsValidWorkSpace() and InitWorkSpaceHeader() to avoid executing code(gBS->CalculateCrc32 ()) outside SMRAM while inside SMM.

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

11 years agoCheck status before reporting error status code.
li-elvin [Thu, 20 Dec 2012 03:21:14 +0000 (03:21 +0000)]
Check status before reporting error status code.

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

11 years agoShellPkg: Updates to DumpHex() and ‘dmem’ command for correct output format
jcarsey [Wed, 19 Dec 2012 16:47:06 +0000 (16:47 +0000)]
ShellPkg: Updates to DumpHex() and ‘dmem’ command for correct output format

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

11 years agoAdd PI1.2.1 EndOfDxe support.
jyao1 [Tue, 18 Dec 2012 05:07:35 +0000 (05:07 +0000)]
Add PI1.2.1 EndOfDxe support.

Signed-off-by: jiewen.yao@intel.com
Reviewed-by: michael.d.kinney@intel.com
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14009 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoRefine code to follow coding style.
ydong10 [Mon, 17 Dec 2012 11:16:16 +0000 (11:16 +0000)]
Refine code to follow coding style.

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

11 years agoFix GCC build fail issue for MdeModulePkg and NetworkPkg.
sfu5 [Mon, 17 Dec 2012 06:48:35 +0000 (06:48 +0000)]
Fix GCC build fail issue for MdeModulePkg and NetworkPkg.

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

11 years agoBase on the value type to get the value for default opcode.
ydong10 [Mon, 17 Dec 2012 03:30:43 +0000 (03:30 +0000)]
Base on the value type to get the value for default 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@14006 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoReclaim work space when the remaining space size is even not enough to contain one...
lzeng14 [Mon, 17 Dec 2012 03:18:16 +0000 (03:18 +0000)]
Reclaim work space when the remaining space size is even not enough to contain one header + one record.

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

11 years agoAdd boot mode BOOT_WITH_MFG_MODE_SETTINGS.
lgao4 [Mon, 17 Dec 2012 03:17:36 +0000 (03:17 +0000)]
Add boot mode BOOT_WITH_MFG_MODE_SETTINGS.
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14004 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoOvmfPkg: create \_S3 and \_S4 packages dynamically
jljusten [Mon, 17 Dec 2012 02:13:14 +0000 (02:13 +0000)]
OvmfPkg: create \_S3 and \_S4 packages dynamically

Move these states from the DSDT to the SSDT. Override the default
configuration if the host has the following qemu commit:

    commit 459ae5ea5ad682c2b3220beb244d4102c1a4e332
    Author: Gleb Natapov <gleb@redhat.com>
    Date:   Mon Jun 4 14:31:55 2012 +0300

        Add PIIX4 properties to control PM system states.

        This patch adds two things. First it allows QEMU to distinguish
        between regular powerdown and S4 powerdown. Later separate QMP
        notification will be added for S4 powerdown. Second it allows
        S3/S4 states to be disabled from QEMU command line. Some guests
        known to be broken with regards to power management, but allow to
        use it anyway. Using new properties management will be able to
        disable S3/S4 for such guests.

        Supported system state are passed to a firmware using new fw_cfg
        file. The file contains  6 byte array. Each byte represents one
        system state. If byte at offset X has its MSB set it means that
        system state X is supported and to enter it guest should use the
        value from lowest 3 bits.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14003 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoOvmfPkg: report S3 state in DSDT
jljusten [Mon, 17 Dec 2012 02:13:00 +0000 (02:13 +0000)]
OvmfPkg: report S3 state in DSDT

The ACPI 5.0 specification says:

  7.3.4.4 System \_S3 State

  [...]
  * Dynamic RAM context is maintained.
  [...]

This corresponds to the following in the PIIX4 spec:

  PMCNTRL -- POWER MANAGEMENT CONTROL REGISTER (IO)
  [...]
  Bits[12:10]  Suspend Type
  [...]
          001  STR (Suspend To RAM)

Also, this (ie. decimal 1) is the suspend type value that qemu recognizes
as an S3 (suspend to ram) request.

Only the value for PM1a_CNT.SLP_TYP is set (PM1b_CNT.SLP_TYP is left at
zero), since in OVMF we don't report the optional PM1b_EVT_BLK register
block to OSPM. (PM1b_EVT_BLK is defined as 0 in "Platform.h"; see "4.8.1.1
PM1 Event Registers" in the ACPI 5.0 specification.)

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

11 years agoOvmfPkg: fix PIIX4 SUS_TYP value in \_S4 package
jljusten [Mon, 17 Dec 2012 02:12:44 +0000 (02:12 +0000)]
OvmfPkg: fix PIIX4 SUS_TYP value in \_S4 package

The ACPI 5.0 specification says:

  7.3.4.5 System \_S4 State

  [...]
  * DRAM context is not maintained.
  [...]

This corresponds to the following in the PIIX4 spec:

  PMCNTRL -- POWER MANAGEMENT CONTROL REGISTER (IO)
  [...]
  Bits[12:10]  Suspend Type
  [...]
          010  POSCL (Powered On Suspend, Context Lost)

Also, this (ie. decimal 2) is the default suspend type value that qemu
recognizes as an S4 (suspend to disk) request.

Only the value for PM1a_CNT.SLP_TYP is corrected (PM1b_CNT.SLP_TYP is left
at zero), since in OVMF we don't report the optional PM1b_EVT_BLK register
block to OSPM. (PM1b_EVT_BLK is defined as 0 in "Platform.h"; see "4.8.1.1
PM1 Event Registers" in the ACPI 5.0 specification.)

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

11 years agoOvmfPkg: add comments to existing \_Sx packages in DSDT
jljusten [Mon, 17 Dec 2012 02:12:30 +0000 (02:12 +0000)]
OvmfPkg: add comments to existing \_Sx packages in DSDT

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

11 years agoOvmfPkg/README: Update required QEMU & OS boot status
jljusten [Mon, 17 Dec 2012 02:12:11 +0000 (02:12 +0000)]
OvmfPkg/README: Update required QEMU & OS boot status

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

11 years agoInitialize Data.
lzeng14 [Fri, 14 Dec 2012 06:03:25 +0000 (06:03 +0000)]
Initialize Data.

Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13998 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoShellPkg: Updates to 'help' command
jcarsey [Thu, 13 Dec 2012 21:26:22 +0000 (21:26 +0000)]
ShellPkg: Updates to 'help' command

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

11 years agoShellPkg: Updates to 'smbiosview' command
jcarsey [Thu, 13 Dec 2012 21:11:21 +0000 (21:11 +0000)]
ShellPkg: Updates to 'smbiosview' command

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

11 years ago1. Add EFI_COMPONENT_NAME2_PROTOCOL.GetControllerName() support.
sfu5 [Thu, 13 Dec 2012 06:47:06 +0000 (06:47 +0000)]
1. Add EFI_COMPONENT_NAME2_PROTOCOL.GetControllerName() support.
2. Fix the driver binding Stop() hang issue in the network stack.
3. Add Ip4 raw data support.
4. Add iSCSI Dhcp option 60 support.

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

11 years ago1. Add EFI_COMPONENT_NAME2_PROTOCOL support for UNDI driver.
sfu5 [Thu, 13 Dec 2012 06:41:07 +0000 (06:41 +0000)]
1. Add EFI_COMPONENT_NAME2_PROTOCOL support for UNDI 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@13994 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoUse SMM_VARIABLE_COMMUNICATE_HEADER_SIZE instead of OFFSET_OF (SMM_VARIABLE_COMMUNICA...
lzeng14 [Wed, 12 Dec 2012 14:12:49 +0000 (14:12 +0000)]
Use SMM_VARIABLE_COMMUNICATE_HEADER_SIZE instead of OFFSET_OF (SMM_VARIABLE_COMMUNICATE_HEADER, Data).

Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ting Ye <ting.ye@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13993 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoUpdate PCD description.
li-elvin [Wed, 12 Dec 2012 08:25:05 +0000 (08:25 +0000)]
Update PCD description.

Signed-off-by: Li Elvin <elvin.li@intel.com>
Reviewed-by: Fan Jeff <jeff.fan@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13992 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoRemove hard code value and create new PCDs for OpROM reserved range in CSM module.
li-elvin [Wed, 12 Dec 2012 07:47:33 +0000 (07:47 +0000)]
Remove hard code value and create new PCDs for OpROM reserved range in CSM module.

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

11 years agoAdd a NULL string to the Image Execution Information Table if the Name is NULL in...
sfu5 [Wed, 12 Dec 2012 03:03:07 +0000 (03:03 +0000)]
Add a NULL string to the Image Execution Information Table if the Name is NULL in function AddImageExeInfo().

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

11 years agoStdLib: Add terminal type line editing (Interactive IO) for console devices.
darylm503 [Tue, 11 Dec 2012 21:19:14 +0000 (21:19 +0000)]
StdLib: Add terminal type line editing (Interactive IO) for console devices.

Adds a subset of the terminal I/O capabilities described in the Single Unix Specification, V4.
Supports:
    Erase previous character.  Default is Backspace or ^H
    Erase line.  Default is ^U
TAB characters are supported and, by default, are rendered as 8 spaces.  They will still be read as a single TAB character.
Both Canonical and Non-Canonical modes are supported.
If a terminal device is opened with O_TTY_INIT in the mode, the device will be initialized to "sane" values for interactive use.  It will be in Canonical mode, Enter will be translated to NewLine and on output, a NewLine is translated to CRLF.  Echoing will be on, control characters are output as ^X, and TABs are expanded.
See the new <sys/termios.h> file for more information.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: daryl.mcdaniel@intel.com
Reviewed-by: erik.c.bjorge@intel.com
Reviewed-by: leroy.p.leahy@intel.com
Reviewed-by: lee.g.rosenbaum@intel.com
Reviewed-by: jaben.carsey@intel.com
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13989 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoStdLib: Add internal use only header for interactive I/O.
darylm503 [Tue, 11 Dec 2012 21:03:57 +0000 (21:03 +0000)]
StdLib:  Add internal use only header for interactive I/O.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: daryl.mcdaniel@intel.com
Reviewed-by: erik.c.bjorge@intel.com
Reviewed-by: leroy.p.leahy@intel.com
Reviewed-by: lee.g.rosenbaum@intel.com
Reviewed-by: jaben.carsey@intel.com
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13988 6f19259b-4bc3-4df7-8a09-765794883524

11 years ago1. Update IoRead to support UINT64 also.
lzeng14 [Mon, 10 Dec 2012 12:54:02 +0000 (12:54 +0000)]
1. Update IoRead to support UINT64 also.
2. To be consistent, update PciCfgRead to support full S3BootScriptWidth(Uint8, FifoUint8 and FullUint8) like PciCfgWrite.
3. Use BuildLoopData() to get the addressStride and BufferStride to do PCI CFG operations.
4. Correct, refine and enhance some comments and debug messages.

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

11 years ago1. Duplicate the original boot script data copy, because it may have INSERT boot...
lzeng14 [Fri, 7 Dec 2012 07:56:59 +0000 (07:56 +0000)]
1. Duplicate the original boot script data copy, because it may have INSERT boot script at runtime in SMM. If so, we should use original copy to restore data after OS rewrites the ACPINvs region. Or the data inserted may cause some original boot script data lost.
2. Sync the change into LockBox for S3BootScriptMoveLastOpcode() at runtime in SMM.

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

11 years agoRemove the ASSERT (FALSE) code, just return unsupported.
ydong10 [Thu, 6 Dec 2012 09:10:44 +0000 (09:10 +0000)]
Remove the ASSERT (FALSE) code, just return unsupported.

Signed-off-by: Dong Eric <eric.dong@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13985 6f19259b-4bc3-4df7-8a09-765794883524

11 years agoMulti-SMM drivers couldn't save their boot script successfully all at runtime in...
lzeng14 [Thu, 6 Dec 2012 01:15:40 +0000 (01:15 +0000)]
Multi-SMM drivers couldn't save their boot script successfully all at runtime in SMM, one module's boot script will overwrite another module's.
Allocate a SMM copy for private data structure, and use a new PCD PcdS3BootScriptTablePrivateSmmDataPtr to transfer and share data between multi-SMM drivers.

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

11 years agoUpdate the HiiConfigToBlock to follow spec.
ydong10 [Wed, 5 Dec 2012 09:27:15 +0000 (09:27 +0000)]
Update the HiiConfigToBlock to follow spec.

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

11 years agoShellPkg: Remove “2.0” prefix text from shell prompt.
jcarsey [Mon, 3 Dec 2012 16:40:55 +0000 (16:40 +0000)]
ShellPkg: Remove “2.0” prefix text from shell prompt.

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

11 years agoFix build error.
jyao1 [Mon, 3 Dec 2012 01:06:28 +0000 (01:06 +0000)]
Fix build error.

ACPI4.0/5.0 have clear description:
FIRMWARE_CTRL: If the X_FIRMWARE_CTRL field contains a non zero value then this field must be zero.
X_FIRMWARE_CTRL: This field is used when the physical address of the FACS is above 4GB. If the FIRMWARE_CTRL field contains a non zero value then this field must be zero.

Update code in AcpiSupport/AcpiTable when it produces this field to set one only.
Update code in AcpiS3Save when it consumes this field, check 0 value.

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

11 years agoACPI4.0/5.0 have clear description:
jyao1 [Fri, 30 Nov 2012 09:03:15 +0000 (09:03 +0000)]
ACPI4.0/5.0 have clear description:
FIRMWARE_CTRL: If the X_FIRMWARE_CTRL field contains a non zero value then this field must be zero.
X_FIRMWARE_CTRL: This field is used when the physical address of the FACS is above 4GB. If the FIRMWARE_CTRL field contains a non zero value then this field must be zero.

Update code in AcpiSupport/AcpiTable when it produces this field to set one only.
Update code in AcpiS3Save when it consumes this field, check 0 value.

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

11 years agoFix the issue that S3BootScriptLabel() does not work to insert label when the specifi...
lzeng14 [Thu, 29 Nov 2012 05:41:51 +0000 (05:41 +0000)]
Fix the issue that S3BootScriptLabel() does not work to insert label when the specified position is not at the end of table.

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