Commit Graph

765 Commits

Author SHA1 Message Date
Ruiyu Ni b3535ab4ef MdeModulePkg/BmpImageDecoderLib: Support ImageFormatUnknown type
Enhance the library to handle unknown image format.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18774 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-12 07:14:40 +00:00
Ruiyu Ni 8dfe7fd239 MdeModulePkg: Add BootLogoLib to provide interfaces about logo display.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18772 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-12 05:23:25 +00:00
Ruiyu Ni 328de7ae41 MdeModulePkg: Add BmpImageDecoderLib to provide BMP decoding capability
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18771 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-12 05:22:21 +00:00
Ruiyu Ni 345c2b0713 MdeModulePkg: Add ImageDecoderLib to provide image decoding service.
The library itself doesn't provide any image decoding capabilities but
manages the different image decoders.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18770 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-12 05:21:38 +00:00
Dandan Bi d6cc284e6f MdeModulePkg:Modify the pointer type.
Previously the pointer type is EFI_IFR_FORM_SET, it is incorrect when
do pointer addition without conversion.Now change it to UINT8 type.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18768 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-11 08:34:04 +00:00
Zhang Lubo e91cc29dd7 MdeModulePkg:Fix a bug that HttpLib can not parse Ipv6 address correctly.
When parsing the authority component of the input URL, it can not distinguish 
the ":" is the flag that indicates the port or the separator between 
the ipv6 address.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Gary Ching-Pang Lin <glin@suse.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18744 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-09 03:45:23 +00:00
Sunny Wang fad21b7c57 MdeModulePkg: Fix memory leak issues
Fix memory leak issues

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Sunny Wang <sunnywang@hpe.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18722 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-03 02:58:30 +00:00
Samer El-Haj-Mahmoud 32c8c88df5 MdeModulePkg: Add DEBUG statement when reaching max perf log entries
Add a DEBUG statement when the number of PEI perf log entries
exceeds PcdMaxPeiPerformanceLogEntries

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hpe.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18714 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-02 02:38:24 +00:00
Dandan Bi 8a4582838b MdeModulePkg:Add new API HiiGetFormSetFromHiiHandle into UefiHiiLib
This function is mainly through the Hii handle to get the formset opcode.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18684 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-27 10:19:29 +00:00
Sunny Wang 5d3a9896f0 MdeModulePkg: Make the BmFindLoadOption function public
Make the BmFindLoadOption function public

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Sunny Wang <sunnywang@hpe.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18662 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-26 04:49:08 +00:00
Star Zeng d2dbe5b70b MdeModulePkg VarCheckLib: R18611 was thoughtless for property set
R18611 only updated the logic to return correct property
when no property set to variable with wildcard name.
But VariablePropertySet needs the pointer of property data for set.
So roll back the change in VariablePropertyGetWithWildcardName at R18611,
and check the property revision first in VariablePropertyGet and
SetVariableCheck before using the property data.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18626 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-19 06:41:28 +00:00
Star Zeng 1cce53d384 MdeModulepkg VarCheckLib: Return NULL when no property set
to variable with wildcard name.

VarCheckLib has zeroed property for variable with wildcard name
and is waiting for property set. The code should return NULL
when no property set to variable with wildcard name, but not
return the zeroed property that will impact the functionality of
SetVariableCheck.

The issue does not appear with VarCheckUefiLib linked as the library
just has the expected property set.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18611 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-16 01:31:56 +00:00
Star Zeng ca49b6f9bf MdeModulePkg PiDxeS3BootScriptLib: Use PcdSet64S to instead of PcdSet64
PcdSet## has no error status returned, then the caller has no idea about whether the set operation is successful or not.
PcdSet##S were added to return error status and PcdSet## APIs were put in ifndef DISABLE_NEW_DEPRECATED_INTERFACES condition.
To adopt PcdSet##S and further code development with DISABLE_NEW_DEPRECATED_INTERFACES defined, we need to Replace PcdSet## usage with PcdSet##S.

Normally, DynamicDefault PCD set is expected to be success, but DynamicHii PCD set failure is a legal case.
For this case, PcdS3BootScriptTablePrivateDataPtr and PcdS3BootScriptTablePrivateSmmDataPtr are expected to be DynamicDefault,
so use PcdSet64S to instead of PcdSet64 and assert when set failure.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18599 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-10 02:53:41 +00:00
Star Zeng 2f931dda52 MdeModulePkg UefiBootManagerLib: Do not assume perf entry count has no change
Current implementation assumes the performance entry count has no change from
multiple GetPerformanceMeasurement() while loops, it may cause the allocated buffer
for PerfEntriesAsDxeHandle at the first loop to be overflowed if the following loop has
the count changed.

This patch is also to sync the change at
commit R17851 "IntelFrameworkModulePkg GenericBdsLib: Resolve array size mismatch".

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18561 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-30 04:29:50 +00:00
Samer El-Haj-Mahmoud 33ecfa8af9 MdeModulePkg: Add SMBIOS 3.0 support in NetLibGetSystemGuid.
NetLibGetSystemGuid gets the UUID from SMBIOS table to use as the System GUID
(in DHCP and other network use cases). This change adds support to get the
UUID from either SMBIOS 2.x or 3.0, since SMBIOS 3.0 uses a different GUID in
the System Configuration Table.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hpe.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18559 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-30 01:06:57 +00:00
Dandan Bi 2d3e4cd167 MdeModulePkg:Fix the bug the incorrect change of StrCpyS function
The pointer to the destination string changed,the max length also changed.Previous change neglect this point.
And base on the code logic,we can use StrCatS to replace StrCpyS.Now this patch is to fix this bug.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18497 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-17 07:21:22 +00:00
Star Zeng 960f2d533b MdeModulePkg PiDxeS3BootScriptLib: Remove a hidden assumption.
What to do:
1. Remove a hidden assumption "No SMM driver writes BootScript between
SmmReadyToLock and S3SleepEntryCallback".
 1.1. Use SmmExitBootServices and SmmLegacyBoot notification to record
      AtRuntime flag.
 1.2. Use mBootScriptDataBootTimeGuid LockBox to save boot time boot
      script data to handle potential INSERT boot script at runtime in SMM.
2. Do not depend on OS to help restore ACPINvs data and use
EfiReservedMemoryType instead of EfiACPIMemoryNVS.
 2.1. Use mBootScriptSmmPrivateDataGuid LockBox to save boot script
      SMM private data with BackFromS3 = TRUE at runtime. S3 resume
      will help restore it to tell the Library the system is back
      from S3.

Why to do:
1. The hidden assumption "No SMM driver writes BootScript between
SmmReadyToLock and S3SleepEntryCallback" will cause confusion to
the library's consumer and block the usage of "SMM driver writes
BootScript after SmmReadyToLock". So Remove the assumption.
2. In original code, there might be a corner case that malicious
code patch ACPINvs boot TableLength field same as SMM boot script.
So that it can skip the table restore. The impact is that BootScript
in SMM may be overridden by malicious code.
--------------------
    CopyMem ((VOID*)&TableHeader, (VOID*)mS3BootScriptTablePtr->TableBase, sizeof(EFI_BOOT_SCRIPT_TABLE_HEADER));
    if (mS3BootScriptTablePtr->TableLength + sizeof(EFI_BOOT_SCRIPT_TERMINATE) != TableHeader.TableLength) { // TableLength is in NVS
      ......
      //
      // NOTE: We should NOT use TableHeader.TableLength, because it is already updated to be whole length.
      //
      mS3BootScriptTablePtr->TableLength = (UINT32)(mLockBoxLength - sizeof(EFI_BOOT_SCRIPT_TERMINATE)); ? This line can be skipped.
--------------------
So use EfiReservedMemoryType instead of EfiACPIMemoryNVS as the code
has been updated to not depend on OS to help restore ACPINvs data.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18467 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-15 07:49:12 +00:00
Ruiyu Ni 88cbb6be4e MdeModulePkg: Fix a performance data buffer overrun issue
The mBmPerfHeader.Count isn't reset to 0 in BmWriteBootToOsPerformanceData()
so when the actual performance data entry count exceeds the LimitCount,
the performance data collection breaks on condition
if (mBmPerfHeader.Count == LimitCount), but 2nd time calling this function
will not break on condition if (mBmPerfHeader.Count == LimitCount) because
the mBmPerfHeader.Count always bigger than LimitCount, which results buffer
overrun.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18417 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-09 05:43:44 +00:00
Sunny Wang 4982ea57d9 MdeModulePkg: Remove unused variables from both UefiBootManagerLib and BdsDxe to fix GCC build.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Sunny Wang <sunnywang@hpe.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18350 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-28 05:41:06 +00:00
Liming Gao d6a55a12c0 MdeModulePkg: Add the missing module UNI files.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18342 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-28 02:46:46 +00:00
Eric Dong cf34f86bc2 MdeModulePkg: Replace deprecated function.
Replace GetEfiGlobalVariable with GetEfiGlobalVariable2.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18332 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-27 04:52:24 +00:00
Jiaxin Wu f9a149164a MdeModulePkg: Convert the UNIX to DOS end of line format
Convert the UNIX to DOS end of line format.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
 

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18324 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-27 01:04:59 +00:00
Ruiyu Ni 5e8df1ba6d MdeModulePkg: Fix UefiBootManagerLib.inf license header.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18298 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-25 06:27:01 +00:00
Star Zeng c95d9ab81a MdeModulePkg: Add PlatformVarCleanupLib library
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18295 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-25 03:11:06 +00:00
Star Zeng a2918326ac MdeModulePkg: Add VarCheckPcdLib NULL class library
The check will be based on PcdVarCheck binary that generated
by BaseTools.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18294 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-25 03:10:32 +00:00
Star Zeng 1241af9510 MdeModulePkg: Add VarCheckHiiLib NULL class library
The check will be based on VarCheckHiiBin that generated
from FV and Hii Database.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18293 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-25 03:10:04 +00:00
Star Zeng b85488b396 MdeModulePkg: Add VarCheckUefiLib NULL class library
What to do: Implement VarCheckUefiLib NULL class library instance.
The code logic are separated from Variable driver, and it will consume VarCheckLib
to register var check handler and variable property set for UEFI defined variables.

Why to do: Share code.
Separate variable check UEFI code from Variable driver in MdeModulePkg.
We are going to separate generic software logic code from Variable Driver
to benefit other variable driver implementation. Auth services has been done
to be AuthVariableLib, now to cover variable check service.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18279 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-25 02:58:36 +00:00
Star Zeng 31b183bcf9 MdeModulePkg: Add VarCheckLib library
What to do:
1. Add VarCheckLib LibraryClass definitions.
2. Implement VarCheckLib library instance.
The code logic are separated from Variable driver.

Why to do: Share code.
Separate variable check service from Variable driver in MdeModulePkg.
We are going to separate generic software logic code from Variable Driver
to benefit other variable driver implementation. Auth services has been done
to be AuthVariableLib, now to cover variable check service.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18278 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-25 02:58:09 +00:00
Zhang Lubo 0cd1ecea67 MdeModulePkg: Add codes to support trailer parse in HttpLib.
In HttpLib, the Event BodyParseComplete should return to the
callback function when the whole message body has been parsed
including the trailer if it has.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18213 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-12 12:44:31 +00:00
Fu Siyuan 2bd25290f3 MdeModulePkg: Use monotonic count to initialize the NetLib random seed.
NetRandomInitSeed() function use current time to initialize the random seed,
while in some platform the time service is not accuracy that make the random
seed collision. This patch add the monotonic count to the seed to avoid this.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18185 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-07 03:22:10 +00:00
Eric Dong 8fa9ac60f5 Support get string from configuration string packages.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18074 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-27 07:40:18 +00:00
Ruiyu Ni d948fe96a5 MdeModulePkg: Make boot option description unique
When there are multiple network boot options, user will see multiple
"UEFI Network" boot options. It's hard to distinguish them using the
description.
The patch enhances the boot option generation logic to append " 2"
/" 3"/" 4"/... number suffix to the non-first network boot options.
So the 2nd one becomes "UEFI Network 2".

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18062 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-26 08:07:15 +00:00
Star Zeng c03beb762a MdeModulePkg PiSmmCore: Remove a hidden assumption of SMRAM reservation
that assumes the SMRAM reserved range is only at the end of the SMRAM descriptor.

          //
          // This range has reserved area, calculate the left free size
          //
          gSmmCorePrivate->SmramRanges[Index].PhysicalSize = SmramResRegion->SmramReservedStart - gSmmCorePrivate->SmramRanges[Index].CpuStart;

Imagine the following scenario where we just reserve the first page of the SMRAM range:

SMRAM Descriptor:
  Start: 0x80000000
  Size: 0x02000000

Reserved Range:
  Start: 0x80000000
  Size: 0x00001000

In this case the adjustment to the SMRAM range size yields zero: ReservedStart - SMRAM Start is 0x80000000 - 0x80000000 = 0.
So even though most of the range is still free the IPL code decides its unusable.

The problem comes from the email thread: [edk2] PiSmmIpl SMRAM Reservation Logic.
http://thread.gmane.org/gmane.comp.bios.tianocore.devel/15268

Also to follow the idea in the email thread, the patch is to
1. Keep only one copy of full SMRAM ranges in gSmmCorePrivate->SmramRanges,
split record for SmmConfiguration->SmramReservedRegions and SMM Core that
will be marked to be EFI_ALLOCATED in gSmmCorePrivate->SmramRanges.
2. Handle SmmConfiguration->SmramReservedRegions at beginning of, at end of,
in the middle of, or cross multiple SmramRanges.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18031 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-26 07:38:12 +00:00
Ard Biesheuvel 4c10f95344 MdeModulePkg/DxePrintLibPrint2Protocol: make mStatusString array CONST
Change the type of mStatusString[] to reflect that it is a CONST
array of pointers to CONST.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18022 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-16 06:50:45 +00:00
fanwang2 3f6d5100dc MdeModulePkg: Remove two protocols and add HttpLib access
Remove two protocols never used in DxeNetLib.inf and add HttpLib access in MdeModulePkg.dec.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: fanwang2 <fan.wang@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17983 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-15 02:44:40 +00:00
Ruiyu Ni 579b5ef204 MdeModulePkg: Fix potential integer overflow issue
In certain rare circumstance, the data passed from outside of SMM may be
invalid resulting the integer overflow. The issue are found by code review.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17908 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-10 02:16:42 +00:00
Zhang Lubo 206b5f51be MdeModulePkg: Replace unsafe string functions.
Replace unsafe string functions with new added safe string functions.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17881 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-08 06:35:37 +00:00
jiaxinwu 6c5c70d68d MdeModulePkg: Remove NetLib and Ip4Config Protocol dependency.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: jiaxinwu <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com> 
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hp.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17873 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-08 03:08:05 +00:00
Qiu Shumin 8feb7452ac MdeModulePkg: Refine code to use Strn**S safe functions instead of Str**S ones in some cases.
Safe string functions may ASSERT when the source length is larger than the MaxDest. This patch use Strn**S to indicate the copy length.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17867 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-08 01:08:09 +00:00
Fu Siyuan eb4d0b5e85 MdeModulePkg: Add HttpLib.
This patch add the header file and DXE implementation for the HttpLib.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17856 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-07 09:29:00 +00:00
Ruiyu Ni ebf735f119 MdeModulePkg: Update UefiBootManagerLib to support HTTP boot option creation
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17849 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-07 05:43:00 +00:00
Qiu Shumin 0ec2bfc857 MdeModulePkg: Use StrnCpyS instead of StrCpyS to indicate the copy length from the source.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17841 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-07 03:01:07 +00:00
Liming Gao de6c0eff30 MdeModulePkg: UefiBootManagerLib to handle LoadFile DevicePath
UEFI Spec HTTP Boot Device Path, after retrieving the boot resource
information, the BootURI device path node will be updated to include
the BootURI information. It means the device path on the child handle
will be updated after the LoadFile() service is called.

To handle this case, UefiBootManagerLib BmGetLoadOptionBuffer API
is updated as the below:
1) Get Device handle based on Device Path
2) Call LoadFile() service (GetFileBufferByFilePath() API) to get Load File Buffer.
3) Retrieve DevicePath from Device handle

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17798 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-02 04:27:54 +00:00
Liming Gao 2b75e8cd09 MdeModulePkg: SecurityManagementLib to handle LoadFile DevicePath
UEFI Spec HTTP Boot Device Path, after retrieving the boot resource
information, the BootURI device path node will be updated to include
the BootURI information. It means the device path on the child handle
will be updated after the LoadFile() service is called.

To handle this case, SecurityManagementLib ExecuteSecurityHandlers API
is updated as the below:
1) Get Device handle based on Device Path
2) Call LoadFile() service (GetFileBufferByFilePath() API) to get Load File Buffer.
3) Retrieve DevicePath from Device handle

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17797 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-02 04:27:32 +00:00
Qiu Shumin b6344b37c9 MdeModulePkg/Library/UefiBootManagerLib: Use safe string functions to refine code.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17782 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01 08:21:16 +00:00
Qiu Shumin 93fd37dc0b MdeModulePkg/Library/SmmCorePerformanceLib: Use safe string functions to refine code.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17781 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01 08:19:56 +00:00
Qiu Shumin e1565962dc MdeModulePkg/Library/PeiPerformanceLib: Use safe string functions to refine code.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17780 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01 08:15:27 +00:00
Qiu Shumin 8f770819a1 MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode: Use safe string functions to refine code.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17779 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01 08:14:36 +00:00
Qiu Shumin 96f983fabc MdeModulePkg/Library/DxeCorePerformanceLib: Use safe string functions to refine code.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17778 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01 08:05:00 +00:00
Star Zeng b6477d820b MdeModulePkg: Add AuthVariableLib LibraryClass
What to do:
1. Add AuthVariableLib LibraryClass definitions.
2. Implement a NULL AuthVariableLib library instance.
3. Add VARIABLE_ENTRY_PROPERTY definition to VarCheck.h.
4. Add VARIABLE_ENTRY_CONSISTENCY and variable attribute
combinations definitions to VariableFormat.h.

Why to do:
1. Share code.
1.1. Separate auth variable service from Auth Variable driver in
SecurityPkg to AuthVariableLib. Then the AuthVariableLib could benefit
and be used by different implementation of Auth Variable drivers.

1.2 The VARIABLE_ENTRY_PROPERTY definition to VarCheck.h,
VARIABLE_ENTRY_CONSISTENCY and variable attribute
combinations definitions to VariableFormat.h will be shared
by merged Variable driver and AuthVariableLib.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17757 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01 03:04:18 +00:00
Star Zeng 308521b133 MdeModulePkg: Move TpmMeasurementLib LibraryClass from SecurityPkg
What to do:
1. Move TpmMeasurementLib LibraryClass from SecurityPkg to MdeModulePkg.
2. Implement a NULL TpmMeasurementLib library instance.

Why to do:
1. Share code.
We are moving forward to separate auth variable service from Auth Variable
driver in SecurityPkg to AuthVariableLib. Then the AuthVariableLib could benefit
and be used by different implementation of Auth Variable drivers.
2. Remove code duplication and reduce maintenance effort.
After auth variable service separated from Auth Variable driver in SecurityPkg
to AuthVariableLib. The remaining code logic of Auth Variable driver in SecurityPkg
will be almost same with Variable driver in MdeModulePkg. We are going to
merge them.
3. TpmMeasurementLib is consumed by Auth Variable driver in SecurityPkg now,
as Auth Variable driver in SecurityPkg will be merged to Variable driver in
MdeModulePkg, so the library class also needs to be moved to MdeModulePkg.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17753 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01 03:01:34 +00:00
Dandan Bi 5ad66ec692 MdeModulePkg:Use safe string functions
Replace unsafe String functions with new added safe string functions

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17724 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-29 02:36:31 +00:00
Qiu Shumin 2d28f3b73e MdeModulePkg: Enhance the comments for PiSmmCoreMemoryAllocationLib instance.
Per PI spec all allocation of SMRAM should use EfiRuntimeServicesCode or EfiRuntimeServicesData. 
So SMM instance use EfiRuntimeServicesCode as the default memory allocation type instead of EfiBootServicesData. 
This patch clarify this usage in comments.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17667 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-19 01:58:09 +00:00
Ruiyu Ni 6c988d346b MdeModulePkg/UefiBootManagerLib: Add gEfiFormBrowser2ProtocolGuid reference in INF file
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17614 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-11 02:01:26 +00:00
Dandan Bi 986ede742c Refine code to keep code alignment
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17593 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-09 08:13:23 +00:00
Dandan Bi 0cd542268e Fix build bug
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17592 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-09 07:09:54 +00:00
Dandan Bi 5e30b69eb4 EDKII:Display engine should not depend on the framework code
Display engine base on class opcode to detect whether in
front page.Now remove class/subclass and use FormsetGuid
or ClassGuid to judge whether in front page

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17590 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-09 05:09:50 +00:00
Qiu Shumin 796fecd84b MdeModulePkg: Add %u and %lu support for PrintLib and DebugLib.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17570 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-08 05:34:08 +00:00
Star Zeng 11948471ad MdeModulePkg DxeSmmPerformanceLib: Cover no SMM performance data case.
1. Continue to get performance data by Performance Protocol
when no SMM performance data found.
2. Not try to get SMM performance data again
if no SMM performance handler found.
3. Correct typo 'totol' and 'guage'.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17561 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-04 13:16:18 +00:00
Star Zeng dccfb097ec MdeModulepkg DxeSmmPerformanceLib: Dump all PEI/DXE/SMM performance data.
For boot performance dump, as current behavior.
It depends on which PerformanceLib instance the DP application linked to.
For example, if DxePerfrmanceLib(MdeModulePkg\Library\DxePerformanceLib)
got linked, it will try to dump PEI and DXE performance data; and if
DxeSmmPerfrmanceLib(MdeModulePkg\Library\DxeSmmPerformanceLib)
got linked, then SMM performance data are expected.

It has burden and confusion to developers about the DP application need to be linked to
different PerformanceLib instance in *.dsc and rebuilt for the performance data dump.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17548 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-02 10:20:13 +00:00
Ruiyu Ni f41c71d26a MdeModulePkg: Provide EfiBootManagerRegisterBootDescriptionHandler
This API can be used for platform to customize the boot description other than using core provided boot description.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17547 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-02 09:03:38 +00:00
Ruiyu Ni 4cd67a4d43 MdeModulePkg: Fix INF to point to correct UNI file.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17490 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-21 06:50:07 +00:00
Ruiyu Ni eef538572f MdeModulePkg: Add assertion to make code easier for read.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17483 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-20 07:41:01 +00:00
Star Zeng f3b6e048e2 MdeModulePkg PiSmmCoreMemoryAllocationLib: Get SMRAM ranges
from FullSmramRanges and FullSmramRangeCount in SmmCorePrivate by Constructor.

It can avoid potential first call to FreePool() -> BufferInSmram() ->
if (mSmramRanges == NULL) { GetSmramRanges();} ->
gBS->LocateProtocol() at boottime with >= TPL_NOTIFY or
after ReadyToLock or at OS runtime.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17463 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-18 01:46:40 +00:00
Ruiyu Ni f1f0f0deb6 MdeModulePkg: Add UNI file for PlatformBootManagerLibNull library.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17456 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-15 08:48:13 +00:00
Ruiyu Ni 1fb0dab6aa MdeModulePkg: Add UNI file for UefiBootManagerLib library.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17455 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-15 08:47:31 +00:00
Ruiyu Ni 833a8349c1 MdeModulePkg: Fix build failure in UefiBootManagerLib
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17444 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-14 02:09:59 +00:00
Ruiyu Ni 067ed98a73 MdeModulePkg: Fix EOL to be DOS format.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17421 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-13 02:23:44 +00:00
Ruiyu Ni 182ac39771 MdeModulePkg: Fix a typo to resolve legacy boot failure.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17419 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-12 09:49:28 +00:00
Ruiyu Ni 1634214dbb MdeModulePkg: Process Sys Prep load options in BdsDxe driver.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17403 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-11 06:33:45 +00:00
Ruiyu Ni a4b833e573 MdeModulePkg: Fix SortLib library class name typo.
BaseSortLib is the library instance name not the class name.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17398 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-11 04:51:38 +00:00
Eric Dong afc9bf796c MdeModulePkg: Enhance the check for numeric opcode with EFI_IFR_DISPLAY_INT_DEC attribute.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17345 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-06 12:30:13 +00:00
Ruiyu Ni c705cd5a11 MdeModulePkg: BaseSortLib and UefiBootManagerLib support DXE_RUNTIME_DRIVER.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17341 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-06 10:41:05 +00:00
Ruiyu Ni f4cd24da28 MdeModulePkg: Add BdsDxe driver and PlatformBootManagerNull library.
BdsDxe driver links to UefiBootManagerLib and PlatformBootManager to
provide a pure UEFI boot manager conforming to the UEFI spec.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17328 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-06 04:48:56 +00:00
Ruiyu Ni 1d11222925 MdeModulePkg: Add UefiBootManagerLib
UefiBootManagerLib provides:
 load option library functions;
 hot key library functions;
 boot library functions;
 connect and disconnect library functions;
 driver health library functions.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17327 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-06 04:47:02 +00:00
Michael Kinney cd68e4a8de MdePkg/BaseSerialPortLib16550: Support UARTs with a register stride greater than 1 byte.
Add stride PCD to MdeModulePkg to support 16550 UARTs with a register stride that is not 1 byte.
The default value is 1 byte.
Quark SoC uses a stride of 4 bytes.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17215 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-27 19:44:40 +00:00
Star Zeng 0a4a5b7b5b MdeModulePkg PiDxeS3BootScriptLib: Initialize the EFI_BOOT_SCRIPT_TABLE_HEADER.Version.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17166 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-13 01:56:57 +00:00
Liming Gao 11ff2c714b MdeModulePkg: Add two library instances
Copy below two library instances from IntelFrameworkModulePkg to MdeModulePkg. Then, Platform dsc can
refer to them from MdeModulePkg, and remove the dependency of IntelFrameworkModulePkg. The ones in
IntelFrameworkModulePkg are still kept for compatibility.
1. PeiDxeDebugLibReportStatusCode
2. LzmaCustomDecompressLib

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17112 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-03 02:50:57 +00:00
Shumin Qiu e50a226b2f MdeModulePkg: Fix typo.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Shumin Qiu <shumin.qiu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17045 6f19259b-4bc3-4df7-8a09-765794883524
2015-03-13 08:13:16 +00:00
Shumin Qiu 6cffee0cb0 MdeModulePkg: Update library class name of PlatformHookLibSerialPortPpi.inf
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Shumin Qiu <shumin.qiu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16822 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-10 07:33:19 +00:00
Star Zeng b4e09b0f62 MdeModulePkg: Cleanup gEfiSmmAccess2ProtocolGuid reference.
As the drivers and library do not reference gEfiSmmAccess2ProtocolGuid explicitly now
after SmmMemLib introduced.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16760 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-05 00:59:56 +00:00
Yao, Jiewen 842b1242d1 Use SmmMemLib to check communication buffer.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Gao, Liming" <liming.gao@intel.com>
Reviewed-by: "Fan, Jeff" <jeff.fan@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16694 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-02 14:42:22 +00:00
Shumin Qiu 8165009451 MdeModulePkg: Refine the format of INF files.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Shumin Qiu <shumin.qiu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16635 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-22 02:02:08 +00:00
Daryl McDaniel ae591c14b3 MdeModulePkg, MdePkg, NetworkPkg, OvmfPkg, PerformancePkg, ShellPkg: Library Migration.
Move libraries from ShellPkg into MdeModulePkg and MdePkg.

The following libraries are being migrated out of ShellPkg in order to make
their functionality more widely available.
  • PathLib:        Incorporate into MdePkg/Library/BaseLib
  • FileHandleLib:  MdePkg/Library/UefiFileHandleLib
  • BaseSortLib:    MdeModulePkg/Library/BaseSortLib
  • UefiSortLib:    MdeModulePkg/Library/UefiSortLib

Diffs showing file changes are in the attached file, LibMigration.patch.
A description of the changes follows:

  • Move ShellPkg/Include/Library/FileHandleLib.h to MdePkg/Include/Library/FileHandleLib.h
  • Move ShellPkg/Include/Library/SortLib.h to MdeModulePkg/Include/Library/SortLib.h
  • Move ShellPkg/Library/BaseSortLib to MdeModulePkg/Library/BaseSortLib
  • Move ShellPkg/Library/UefiSortLib to MdeModulePkg/Library/UefiSortLib
  • Move ShellPkg/Library/BasePathLib/BasePathLib.c to MdePkg/Library/BaseLib/FilePaths.c
  • Merge ShellPkg/Include/Library/PathLib.h into MdePkg/Include/Library/BaseLib.h
  • Delete  ShellPkg/Library/BasePathLib; Includes BasePathLib.c and BasePathLib.inf

  • NetworkPkg/NetworkPkg.dsc
  • PerformancePkg.dsc
  • OvmfPkg/OvmfPkgX64.dsc
  • OvmfPkg/OvmfPkgIa32X64.dsc
  • OvmfPkg/OvmfPkgIa32.dsc
    o Update SortLib and FileHandleLib library classes to point to the new library locations.
    o Remove PathLib library class and make sure that BaseLib is described.

  • MdeModulePkg/MdeModulePkg.dec
    o Add SortLib library class

  • MdePkg/MdePkg.dec
    o Add FileHandleLib library class
    o Add PcdUefiFileHandleLibPrintBufferSize PCD

  • MdePkg/Library/BaseLib/BaseLib.inf
    o Add FilePaths.c to [Sources]

  • MdePkg/Include/Library/BaseLib.h
    o Update file description to include "file path functions"

  • ShellPkg/ShellPkg.dsc
    o Change PACKAGE_GUID to { C1014BB7-4092-43D4-984F-0738EB424DBF }
    o Update PACKAGE_VERSION to 1.0
    o Update SortLib and FileHandleLib library classes to point to the new library locations.
    o Remove PathLib library class and make sure that BaseLib is described.
    o Remove ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf from [Components]

  • ShellPkg/ShellPkg.dec
    o Update PLATFORM_VERSION to 1.0
    o Remove declarations of the FileHandleLib, SortLib, and PathLib Library Classes
    o Update comment for the PcdShellPrintBufferSize PCD.

  • ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf
  • ShellPkg/Application/Shell/Shell.inf
    o Remove PathLib from [LibraryClasses]

  • ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.h
  • ShellPkg/Application/Shell/Shell.h
    o Remove #include <Library/PathLib.h>

  • ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf
    o Add PathLib to [LibraryClasses]

  • ShellPkg/Library/UefiShellLevel1CommandsLib/If.c
    o Remove #include <Library/PathLib.h>

  • ShellPkg/Application/ShellSortTestApp/ShellSortTestApp.inf
    o Add MdeModulePkg/MdeModulePkg.dec to [Packages]

  • MdeModulePkg/Library/BaseSortLib/BaseSortLib.inf
  • MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
    o Replace ShellPkg.dec with MdeModulePkg.dec in [Packages]

  • MdeModulePkg/Library/UefiSortLib/UefiSortLib.c
    o Remove #include <ShellBase.h>
    o Define USL_FREE_NON_NULL() to replace SHELL_FREE_NON_NULL()

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <daryl.mcdaniel@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16601 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-13 01:04:07 +00:00
Liming Gao 586d81d103 MdeModulePkg DxePrintLibPrint2Protocol Library SPrintLength() API issue.
SPrintLength() and SPrintLengthAsciiFormat() API doesn’t work with 'g', 't' and 'r' option. The fix sync from MdePkg BasePrintLib instance. 

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16593 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-09 03:22:53 +00:00
Eric Dong d89d1a546a MdeModulePkg:
1.Add code to cover the space which is not covered by browser before.
2.Remove ESC help string for front page screen.


Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16541 6f19259b-4bc3-4df7-8a09-765794883524
2014-12-19 05:30:04 +00:00
Randy Pawell 35f910f08b MdeModulePkg: Source fixes and cleanup for ARMGCC compiles
- Fix EFI_IPv4_ADDRESS usages to use a macro to copy the structure
  instead of direct assignment, to avoid runtime alignment errors.
- Fix a EFI_INPUT_KEY usage in TerminalDxe to use CopyMem()  to copy the
   structure instead of direct assignment, to avoid runtime alignment error.
- Delete excess local variables that are initialized but otherwise unused.
- CompilerIntrinsicsLib library now imported for AARCH64, as well as ARM.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Randy Pawell <randy_pawell@hp.com>
Reviewed-by: Olivier Martin <Olivier.Martin@arm.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16471 6f19259b-4bc3-4df7-8a09-765794883524
2014-12-04 00:32:24 +00:00
Liming Gao c9e0bba385 MdeModulePkg BaseSerialPortLib16550: Correct MemoryLimit and MemoryBase offset.
Their offset in PCI-to-PCI Bridge Configuration Space.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Guo Dong <guo.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16402 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-19 02:30:21 +00:00
Gao, Liming be91c77069 MdeModulePkg: Add InSmm() API in PiSmmCoreSmmServicesTableLib instance
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gao, Liming <liming.gao@intel.com>
Reviewed-by: Fan, Jeff <jeff.fan@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16301 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-05 12:09:22 +00:00
Olivier Martin 831537d6ca Removes some unused assigned variables.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16189 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-29 09:02:57 +00:00
Gao, Liming 35c77daed9 MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files.
1. Module UNI and Package UNI files are not DOS format. Convert them to DOS format.
2. Remove unused SectionExtractionDxeModStrs.uni and SectionExtractionPeiModStrs.uni

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gao, Liming <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16044 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-03 08:39:12 +00:00
Zeng, Star fea55a1661 MdeModulePkg: INF/DEC file updates to EDK II packages
2. Add MODULE_UNI_FILE file that contains the localized Abstract and Description of a module.
a. Addresses an information gap between INF files and the UEFI Distribution Packaging Specification XML schema
b. There will be an associated update to UPT in BaseTools to consume MODULE_UNI_FILE and associated UNI file during UDP creation that performs the INF -> XML conversion.
c. There will be an associated update to UPT in BaseTools to produce MODULE_UNI_FILE and associated UNI file during UDP installation that performs the XML -> INF conversion.

3. Add Module Extra UNI file that provides the localized Name of a module.
a. [UserExtensions.TianoCore."ExtraFiles"] provides an easy method for a module to specify extra files not listed in [Sources] or [Binaries] sections to be added to a UDP without having to list the files in the UPT package information data file.
b. There will be an associated update to UPT in BaseTools to package up files listed in [UserExtensions.TianoCore."ExtraFiles"] during UDP creation.
c. UNI file contains localized name of a module to go along with the localized Abstract and Description from the MODULE_UNI_FILE.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zeng, Star <star.zeng@intel.com>
Reviewed-by: Gao, Liming <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15963 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-28 06:53:43 +00:00
Zeng, Star 6036e94dc9 MdeModulePkg: INF/DEC file updates to EDK II packages
1. Usage information in INF file comment blocks are either incomplete or incorrect.  
This includes usage information for Protocols/PPIs/GUIDs/PCDs/HOBs/Events/BootModes.  
The syntax for usage information in comment blocks is defined in the EDK II Module Information (INF) Specification

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zeng, Star <star.zeng@intel.com>
Reviewed-by: Gao, Liming <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15962 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-28 06:34:06 +00:00
Michael Kinney a402e12924 Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney  <michael.d.kinney@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

Add support for RSA 2048 SHA 256 signing and verification encoded in a PI FFS GUIDED Encapsulation Section.  The primary use case of this feature is in support of signing and verification of encapsulated FVs for Recovery and Capsule Update, but can potentially be used for signing and verification of any content that can be stored in a PI conformant FFS file.  Signing operations are performed from python scripts that wrap OpenSsl command line utilities.  Verification operations are performed using the OpenSsl libraries in the CryptoPkg.

The guided encapsulation sections uses the UEFI 2.4 Specification defined GUID called EFI_CERT_TYPE_RSA2048_SHA256_GUID.  The data layout for the encapsulation section starts with the UEFI 2.4 Specification defined structure called EFI_CERT_BLOCK_RSA_2048_SHA256 followed immediately by the data.  The signing tool included in these patches performs encode/decode operations using this data layout.  HashType is set to the UEFI 2.4 Specification defined GUID called EFI_HASH_ALGORITHM_SHA256_GUID.

MdePkg/Include/Guid/WinCertificate.h
================================= 
//
// WIN_CERTIFICATE_UEFI_GUID.CertType
// 
#define EFI_CERT_TYPE_RSA2048_SHA256_GUID \
  {0xa7717414, 0xc616, 0x4977, {0x94, 0x20, 0x84, 0x47, 0x12, 0xa7, 0x35, 0xbf } }

///
/// WIN_CERTIFICATE_UEFI_GUID.CertData
/// 
typedef struct {
  EFI_GUID  HashType;
  UINT8     PublicKey[256];
  UINT8     Signature[256];
} EFI_CERT_BLOCK_RSA_2048_SHA256;

MdePkg/Include/Protocol/Hash.h
================================= 
#define EFI_HASH_ALGORITHM_SHA256_GUID \
  { \
    0x51aa59de, 0xfdf2, 0x4ea3, {0xbc, 0x63, 0x87, 0x5f, 0xb7, 0x84, 0x2e, 0xe9 } \
  }

The verification operations require the use of public key(s).  A new PCD called gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer is added to the SecurityPkg that supports one or more SHA 256 hashes of the public keys.  A SHA 256 hash is performed to minimize the FLASH overhead of storing the public keys.  When a verification operation is performed, a SHA 256 hash is performed on EFI_CERT_BLOCK_RSA_2048_SHA256.PublicKey and a check is made to see if that hash matches any of the hashes in the new PCD.  It is recommended that this PCD always be configured in the DSC file as storage type of [PcdsDynamixExVpd], so the public keys are stored in a protected read-only region.

While working on this feature, I noticed that the CRC32 signing and verification feature was incomplete.  It only supported CRC32 based verification in the DXE Phase, so the attached patches also provide support for CRC32 based verification in the PEI Phase.

I also noticed that the most common method for incorporating guided section extraction libraries was to directly link them to the DXE Core, which is not very flexible.  The attached patches also add a generic section extraction PEIM and a generic section extraction DXE driver that can each be linked against one or more section extraction libraries.  This provides a platform developer with the option of providing section extraction services with the DXE Core or providing section extraction services with these generic PEIM/DXE Drivers.

Patch Summary
==============
1)	BaseTools - Rsa2049Sha256Sign python script that can perform test signing or custom signing of PI FFS file GUIDed sections
  a.	Wrapper for a set of OpenSsl command line utility operations
  b.	OpenSsl command line tool must be installed in location that is in standard OS path or in path specified by OS environment variable called OPENSSL_PATH
  c.	Provides standard EDK II command line arguments for a tool that encodes/decodes guided encapsulation section 

Rsa2048Sha256Sign - Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
usage: Rsa2048Sha256Sign -e|-d [options] <input_file>

positional arguments:
  input_file            specify the input filename

optional arguments:
  -e                    encode file
  -d                    decode file
  -o filename, --output filename
                        specify the output filename
  --private-key PRIVATEKEYFILE
                        specify the private key filename. If not specified, a
                        test signing key is used.
  -v, --verbose         increase output messages
  -q, --quiet           reduce output messages
  --debug [0-9]         set debug level
  --version             display the program version and exit
  -h, --help            display this help text

2)	BaseTools - Rsa2049Sha256GenerateKeys python script that can generate new private/public key and PCD value that is SHA 256 hash of public key using OpenSsl command line utilities.
  a.	Wrapper for a set of OpenSsl command line utility operations
  b.	OpenSsl command line tool must be installed in location that is in standard path or in path specified by OS environment variable called OPENSSL_PATH

Rsa2048Sha256GenerateKeys - Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
usage: Rsa2048Sha256GenerateKeys [options]

optional arguments:
  -o [filename [filename ...]], --output [filename [filename ...]]
                        specify the output private key filename in PEM format
  -i [filename [filename ...]], --input [filename [filename ...]]
                        specify the input private key filename in PEM format
  --public-key-hash PUBLICKEYHASHFILE
                        specify the public key hash filename that is SHA 256
                        hash of 2048 bit RSA public key in binary format
  --public-key-hash-c PUBLICKEYHASHCFILE
                        specify the public key hash filename that is SHA 256
                        hash of 2048 bit RSA public key in C structure format
  -v, --verbose         increase output messages
  -q, --quiet           reduce output messages
  --debug [0-9]         set debug level
  --version             display the program version and exit
  -h, --help            display this help text

3)	BaseTools\Conf\tools_def.template
  a.	Define GUID/Tool to perform RSA 2048 SHA 256 test signing and instructions on how to use alternate private/public key
b.	GUID is EFI_CERT_TYPE_RSA2048_SHA256_GUID
  c.	Tool is Rsa2049Sha256Sign
4)	MdeModulePkg\Library\PeiCrc32GuidedSectionExtractionLib
  a.	Add peer for DxeCrc32GuidedSectionExtractionLib so both PEI and DXE phases can perform basic integrity checks of PEI and DXE components
5)	MdeModulePkg\Universal\SectionExtractionPei
  a.	Generic PEIM that can link against one or more NULL section extraction library instances to provided one or more GUIDED Section Extraction PPIs
6)	MdeModulePkg\Universal\SectionExtractionDxe
  a.	Generic DXE Driver that can link against one or more NULL section extraction library instances to provide one or more GUIDED Section Extraction Protocols.
7)	SecurityPkg\Library\PeiRsa2048Sha256GuidedSectionExtractLib
  a.	NULL library instances that performs PEI phase RSA 2048 SHA 256 signature verification using OpenSsl libraries from CryptoPkg.
  b.	Based on algorithms from SecurityPkg Authenticated Variable services
  c.	Uses public key from gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer.
8)	SecurityPkg\Library\DxeRsa2048Sha256GuidedSectionExtractLib
  a.	NULL library instances that performs DXE phase RSA 2048 SHA 256 signature verification using OpenSsl libraries from CryptoPkg.
  b.	Based on algorithms from SecurityPkg Authenticated Variable services
  c.	Uses public key from gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer.


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15799 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-14 06:29:07 +00:00
Gao, Liming 74a6d86079 Add the missing parameter comments for BaseSerialPortLib16550 lib. MdePkg: Fix Clang build failure
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gao, Liming <liming.gao@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15796 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-13 08:39:54 +00:00
Gao, Liming 31122d8c9a MdeModulePkg: BaseSerialPortLib16550 library to support PCI UART device.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gao, Liming <liming.gao@intel.com>
Reviewed-by: Kinney, Michael D <michael.d.kinney@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15783 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-11 06:38:28 +00:00
Gao, Liming 883e23d0d3 MdeModulePkg: new PlatformHookLib library with depex of SerialPortPpi.
This library has one depex of SerialPortPpi. Then, the PEIM linked it has this depex so that it is dispatched after SerialPortPpi is installed. SerialPortPpi notifies the platform initialization done, then serial port will work. 
 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gao, Liming <liming.gao@intel.com>
Reviewed-by: Kinney, Michael D <michael.d.kinney@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15782 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-11 06:23:51 +00:00
Feng Tian 6e1e540554 1) Add type cast for better coding style.
2) replace StrCpy() usage in Variable driver with StrnCpy().

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15770 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-07 08:54:34 +00:00
Eric Dong 4e1005eca7 Update code to support VS2013 tool chain.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15695 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-28 07:52:57 +00:00
Chen Fan e364478661 Fixed typos: hanlder should be handler.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15642 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-09 03:51:56 +00:00
Star Zeng ef96ba3cbe MdeModulePkg SmmLockBoxSmmLib: Add debug message for the address of lockbox(smm) copy.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15610 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-02 02:29:02 +00:00
jyao1 57a1b9c425 Add comment for S3BootScriptSaveMemPoll API, since it does not match PI specification.
Signed-off by: Jiewen Yao <Jiewen.yao@intel.com>
Reviewed by: Star Zeng <Star.Zeng@intel.com>

Contributed-under: TianoCore Contribution Agreement 1.0

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15280 6f19259b-4bc3-4df7-8a09-765794883524
2014-03-01 12:25:31 +00:00
Tian, Hot 4b738c76f5 Fix CRLF format
Signed-off-by: Tian, Hot <hot.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15155 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-22 08:38:50 +00:00
Liming Gao f5d2935d7a Correct function comments of S3BootScriptCloseTable().
Signed-off-by: Liming Gao <liming.gao@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15063 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-09 01:54:43 +00:00
Liming Gao 91403ce938 Update MemoryAllocationLib AllocateAlignedPages API comments for memory overflow ASSERT case.
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15034 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-31 07:19:52 +00:00
Eric Dong 6307a8b6dc Rollback the change 15021.
Signed-off-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15030 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-30 06:07:29 +00:00
Eric Dong 80873def60 Keep consistent about the return value between the caller and callee.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15021 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-26 04:19:37 +00:00
Eric Dong 077c7aeec0 Update code to support guid op nest in the statement.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14995 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-17 08:33:06 +00:00
Jeff Fan 3f25e6eab9 Fix comments format issue.
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14934 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-06 01:13:11 +00:00
Fu Siyuan 3ce454dd40 Update NetLibGetMacAddress() to handle the case correctly when SNP is absent.
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ni, Ruiyu <ruiyu.ni@intel.com>
Reviewed-by: Jin, Eric <eric.jin@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14904 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-27 08:57:11 +00:00
Jeff Fan 57f360f261 1. DxeIplPeim will locate Vector Handoff Table PPI and build GUIDed HOB if it has.
2. DxeMain will get Vector Handoff Table GUIDed HOB to install configuration table if it has.
3. Updated CPU Exception Handler Library to provide 3 new APIs to replace original one API and updated NULL instance accordingly.
4. Updated DxeMain/CapsuleX64/BootSriptExectorDxe to use the new API in CPU Exception Handler Lib.

Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14884 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-22 06:15:51 +00:00
Eric Dong 09acdc0b24 Update comments for VarOffset field in the dynamic create question function.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14765 6f19259b-4bc3-4df7-8a09-765794883524
2013-10-12 02:10:02 +00:00
Eric Dong 980f3026e5 Restore the correct cursor status after finish creating the dialog.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14758 6f19259b-4bc3-4df7-8a09-765794883524
2013-10-09 07:51:14 +00:00
Eric Dong af047db78d Fix form flash issue.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14735 6f19259b-4bc3-4df7-8a09-765794883524
2013-09-27 12:19:51 +00:00
Eric Dong 5a9f73bf06 Refine the code logic for browser and display engine.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14543 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-12 04:49:48 +00:00
Eric Dong 7c6c064ca8 Update Browser to provide the customization possibilities.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14540 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-12 02:19:56 +00:00
Eric Dong 2536161545 Rollback patch 14537 & 14538, because patch 14537 is not tested by Laszlo Ersek, but i wrote it.
Signed-off-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14539 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-12 02:03:10 +00:00
Eric Dong b9feb4bdf2 Update Browser to provide the customization possibilities.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

MdeModulePkg Patch
Tested-by: Laszlo Ersek <lersek@redhat.com>

OvmfPkg Patch  
Tested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com> 


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14537 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-09 05:26:47 +00:00
Olivier Martin 6e84b4df30 Fixes the GCC build 'Unused variable' warning (raised an error when warnings are treated as errors).
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14474 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-16 05:13:52 +00:00
Eric Dong 40ae09a2a7 Rollback patch 14470, because it error check in some extra ending code.
Signed-off-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14473 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-16 05:09:47 +00:00
Olivier Martin 270e8dfd86 Fixes the GCC build 'Unused variable' warning (raised an error when warnings are treated as errors).
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14470 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-16 02:11:24 +00:00
Eric Dong 82e8c1380f Update HiiDataBase and UefiHiiLib to support Name/Value varstore.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14451 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-02 07:53:35 +00:00
lzeng14 164a9b6752 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
2013-05-21 02:22:02 +00:00
lzeng14 5e5bb2a9ba 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
2013-05-07 05:38:32 +00:00
lzeng14 9d00d20ed4 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
2013-04-25 10:49:45 +00:00
sfu5 6879581d2e 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
2013-04-25 01:33:43 +00:00
lgao4 e8654a1a1a Add new HiiLib API HiiCreateGotoExOpCode() to create UEFI231 IFR REF, REF2, REF3, and REF4 opcode.
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Eric Dong <dong.eric@intel.com>


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14146 6f19259b-4bc3-4df7-8a09-765794883524
2013-02-27 02:37:27 +00:00
lgao4 c9e8881516 Update SecurityStub SAP protocol to support SecureHandler and SecureHandler2 both.
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14118 6f19259b-4bc3-4df7-8a09-765794883524
2013-02-01 05:34:19 +00:00
lzeng14 30522140a1 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
2013-01-15 05:18:19 +00:00
ydong10 5ecab66086 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
2013-01-14 06:18:50 +00:00
ydong10 fda93fc449 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
2013-01-10 03:01:16 +00:00
ydong10 a7f87053e0 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
2013-01-06 06:12:50 +00:00
ydong10 dcf5ba47ae 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
2013-01-06 06:09:43 +00:00
ydong10 d593121935 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
2013-01-06 06:07:38 +00:00
lzeng14 2a956f7490 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
2012-12-24 06:58:13 +00:00
sfu5 f8c075d112 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
2012-12-24 02:52:27 +00:00
sfu5 1f7eb561d9 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
2012-12-17 06:48:35 +00:00
ydong10 23fe74dc76 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
2012-12-17 03:30:43 +00:00
lzeng14 0f4e03dae4 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
2012-12-14 06:03:25 +00:00
sfu5 216f79703b 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
2012-12-13 06:47:06 +00:00
lzeng14 30f804978a 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
2012-12-10 12:54:02 +00:00
lzeng14 02f49fc23d 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
2012-12-07 07:56:59 +00:00
lzeng14 3aa764ed74 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
2012-12-06 01:15:40 +00:00
lzeng14 93b21ade88 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
2012-11-29 05:41:51 +00:00
lzeng14 879dbe18d8 Use mS3BootScriptTablePtr->TableLength + sizeof (EFI_BOOT_SCRIPT_TERMINATE) to get the correct table length.
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@13977 6f19259b-4bc3-4df7-8a09-765794883524
2012-11-29 01:19:20 +00:00
lzeng14 8e4585bb6c 1. Add S3BootScriptDone Debug message when meeting S3_BOOT_SCRIPT_LIB_TERMINATE_OPCODE.
2. Add Label Opcode Debug message.
3. Align Debug message with code.

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@13966 6f19259b-4bc3-4df7-8a09-765794883524
2012-11-27 11:26:28 +00:00
lzeng14 d03b313050 Add the memory check to reserve memory for TERMINATE opcode in S3BootScriptGetBootTimeEntryAddAddress.
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@13965 6f19259b-4bc3-4df7-8a09-765794883524
2012-11-27 11:20:01 +00:00
lzeng14 e7a0d41940 Remove the unsupported SEC PEIM PEI_CORE module type from DxeS3BootScriptLib.
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@13898 6f19259b-4bc3-4df7-8a09-765794883524
2012-10-31 03:31:08 +00:00
sfu5 75dce34062 1. Fix a bug in PXE driver that the PXE boot do not restart if a new boot option on the different IP stack is selected.
2. Retrieve the IP information after iSCSI TCPv6 connection established and fill it into iBFT table.
3. Generate a random IAID for each NIC port to require different IPv6 address in PXE driver.
4. Update function EfiMtftp6Configure() and Mtftp6RrqHandleOack() to allocate at most one UdpIo.
5. Fix a typo from “destory” to “destroy” in network code.

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@13859 6f19259b-4bc3-4df7-8a09-765794883524
2012-10-17 08:23:41 +00:00
lzeng14 ce68d3bc68 Add missing braces around initializer.
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Qian Ouyang <qian.ouyang@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13817 6f19259b-4bc3-4df7-8a09-765794883524
2012-10-11 02:15:23 +00:00
erictian 02bbc6ee99 MdeModulePkg:removes the unreachable ‘break’ instruction after a ‘return’ instruction in the switch().
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Signed-off-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@13778 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-29 02:44:33 +00:00
niruiyu e5010d30f4 When SerialPortWrite() is called with a non-NULL Buffer and NumberOfBytes is passed in as 0, just do a flush.
Signed-off-by: Ruiyu Ni<ruiyu.ni@intel.com>
Reviewed-by: Kinney Michael D<michael.d.kinney@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13708 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-10 02:32:45 +00:00
lgao4 bc2dfdbcfc Add PI1.2.1 SAP2 support and UEFI231B mantis 896
1. Update SecurityManagementLib to support SAP2 and SAP services. 
2. Update SecurityStub driver to produce SAP2 and SAP protocol both.
3. Update DxeCore and SmmCore to use SAP2 and SAP service to verify Image.
4. Update DxeCore ConnectController() to use SAP2 service to check user permission. 

Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Guo Dong <dong.guo@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13660 6f19259b-4bc3-4df7-8a09-765794883524
2012-08-22 02:32:12 +00:00
czhang46 ccd2f6b0c6 Add more SMRAM range check to 3 SMI handler.
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Eric Jin <eric.jin@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13477 6f19259b-4bc3-4df7-8a09-765794883524
2012-06-27 05:08:49 +00:00
tye1 b00ed21ac6 Add OPTIONAL attribute to parameter ‘ImageHandle’ in NetLibGetMacString to benefit consumer of this API.
Signed-off 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@13471 6f19259b-4bc3-4df7-8a09-765794883524
2012-06-25 09:25:22 +00:00
lzeng14 e5c1acc536 To be consistent with PeiReportStatusCodeLib and DxeReportStatusCode, use MAX_EXTENDED_DATA_SIZE (0x200) as the local max buffer size in RuntimeDxeReportStatusCodeLib.
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@13444 6f19259b-4bc3-4df7-8a09-765794883524
2012-06-12 04:46:33 +00:00
ydong10 f01b91ae42 Fixed build failed.
Signed-off-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13406 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-31 08:35:48 +00:00
ydong10 bf4a3dbd47 Add new interface GetVariable2 and GetEfiGlobalVariable2 to return more info. Also replace old interface with new one.
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@13375 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-30 07:36:00 +00:00
lzeng14 b504f51998 Optimize the log entry search algorithm to save boot performance.
1. Search from the first entry can be changed to Search from the end entry, because most End just follows its Start.
2. Match Start and End entry, the first comparison can be changed from Handle to EndTimeStamp, because only zero EndTimeStamp is required to be matched.

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@13367 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-29 05:02:43 +00:00
lzeng14 843833f953 Add description for PeiPerformanceIdArray parameter of InternalSearchForLogEntry().
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@13219 6f19259b-4bc3-4df7-8a09-765794883524
2012-04-25 10:12:09 +00:00
lzeng14 1658440eed Fix UNIX GCC build fail.
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@13218 6f19259b-4bc3-4df7-8a09-765794883524
2012-04-25 08:09:36 +00:00
lzeng14 f0da4d7d9a Add new extension PerformanceLib APIs to store ID info.
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@13215 6f19259b-4bc3-4df7-8a09-765794883524
2012-04-24 09:12:36 +00:00
lgao4 3dffec127c Update function comments to remove confused description on PerformanceLib EndPerformanceMeasurement API.
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@13201 6f19259b-4bc3-4df7-8a09-765794883524
2012-04-17 09:45:59 +00:00
vanjeff 1e172d6bbf 1. Introduced CPU Exception Handler Library to provide the CPU exception handlers and add one NULL library instance.
2. Updated DXE Core, BootScriptExecutorDxe and CapsuleX64Pei to consume CPU Exception Library to setup the default CPU Exception handlers.

Signed-off-by: vanjeff
Reviewed-by: jyao1


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13097 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-15 05:20:41 +00:00
rsun3 3bbe68a362 Add Missing invocations to VA_END() for VA_START().
Signed-off-by: rsun3
Reviewed-by: lgao4

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12979 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-01 06:06:08 +00:00
jyao1 a0d74d006d correct license header.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12932 6f19259b-4bc3-4df7-8a09-765794883524
2012-01-15 11:21:18 +00:00
jyao1 05ca95e29c Initialize LockBox.Attribute to 0 in SaveLockBox, or it will be random value.
signed-off-by: jyao1
reviewed-by: rsun3

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12931 6f19259b-4bc3-4df7-8a09-765794883524
2012-01-14 01:36:55 +00:00
niruiyu 5db9d35f07 Roll back the change which doesn't call LocateProtocol when TPL is TPL_NOTIFY because it may cause certain status code get lost in some rare case.
Signed-off-by: niruiyu

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12801 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-30 01:53:13 +00:00
lgao4 e0e7f80cc3 Update code to pass build on VS2008 with /Od compiler option.
Signed-off-by: lgao4
Reviewed-by: rsun3
Reviewed-by: ftian


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12792 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-28 06:19:36 +00:00
jyao1 f6ec0c771a In BootScriptSaver, put INFORMATION_OPCODE message to LockBox.
In BootScriptExecutor, add code to display this INFORMATION_OPCODE message.

Signed-off-by: jyao1
Reviewed-by: rsun3

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12735 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-17 09:35:20 +00:00
niruiyu f0d711eb1b Do not call LocateProtocol when the current TPL is above or equal TPL_NOTIFY.
Signed-off-by: niruiyu
Reviewed-by: mdkinney

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12696 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-15 01:48:13 +00:00
jyao1 960729473e Follow PI1.2c spec, check empty string and return EFI_INVALID_PARAMETER.
Clean up comment according to PI1.2c spec.

signed-off-by: jyao1
reviewed-by: rsun3

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12690 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-14 06:28:40 +00:00
jljusten 7538d53684 MdeModulePkg: Remove variables that are set, but not used
GCC 4.6 generates a warning when a variable is set,
but never used.

Signed-off-by: jljusten
Reviewed-by: lgao4
Reviewed-by: erictian
Reviewed-by: rsun3

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12617 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-31 15:58:05 +00:00
lzeng14 30f001ca5f Add core FFS3 support, ExtractGuidedSectionLib/GuidedSectionExtractionLib/PiFirmwareFile.h.
Signed-off-by: lzeng14
Reviewed-by: lgao4

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12582 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-27 08:45:50 +00:00
niruiyu 501793fad4 Adopt new IPv4/IPv6 device path for network modules.
Signed-off-by: tye
Reviewed-by: niruiyu

Adopt SasEx and new IPv6 device path for DevicePathDxe driver.
Signed-off-by: niruiyu
Reviewed-by: erictian

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12574 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-26 09:29:46 +00:00
xdu2 e20d6513ed MdeModulePkg: Enhance error handling in NetLibGetMacAddress() of DxeNetLib.
Signed-off-by: xdu2
Reviewed-by: vanjeff

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12572 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-26 06:52:02 +00:00
andrewfish d4a78455c6 Add a GUIDed HOB to init Debug Print error level earlier in DXE. Add NULL PEIM library to init HOB.
Debug Print Error level can be controled by an EFI variable. Update the DXE version of the library to use a HOB if the variable services are not yet availilbe. This allows the variable to be used early in the DXE phase. 

approved-by: andrewfish
reviewed-by: lgao4



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12516 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-08 21:00:13 +00:00
sfu5 02a758cb0b Add pointer check for NULL before dereference it.
Signed-off-by: sfu5
Reviewed-by: xdu2
Reviewed-by: ydong10


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12514 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-08 02:55:30 +00:00
lgao4 9c6595dca0 Correct comments for NULL return value of HiiLib HiiAddPackages().
Signed-off-by: lgao4
Reviewed-by: ydong10

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12366 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-16 08:53:03 +00:00
jcarsey 352892190a MdeModulePkg: Remove UefiBootServicesTableLib dependency from DxePrintLibPrint2Protocol.
The use of the BootServicesTableLib inside the DxePrintLibPrint2Protocol
allows for potential circular library dependency.

Signed-off-by: jcarsey
Reviewed-by: jljusten

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12273 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-02 18:27:56 +00:00
jljusten 64d14edfeb MdeModulePkg: Add PiDxeS3BootScriptLib
Signed-off-by: jljusten
Reviewed-by: mdkinney
Reviewed-by: rsun3
Reviewed-by: jyao1

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12224 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-29 22:17:27 +00:00
niruiyu 6e5ed099af Add UEFI_APPLICATION module type support for the capsule lib.
Signed-off-by: niruiyu
Reviewed-by: lgao4

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12205 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-25 05:37:55 +00:00
ydong10 ad9aa87b56 Refine code to follow coding style.
Signed-off-by: ydong10

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12189 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-24 06:41:27 +00:00
rsun3 495797c557 1. Add two performance measurement points for SMM performance measurement;
2. Introduce SmmCorePlatformHookLib library class defining two platform hook points. Update PI Smm Core to call the hook points before and after invoking registered SMI handlers. A NULL instance of this library class is implemented.

Note that after this check in, DSC files consuming the PiSmmCore.inf need to be updated to add a library instance for SmmCorePlatformHookLib library class.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12140 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-16 02:58:20 +00:00
lgao4 be5ec8c531 Fix X64 VS2005 and VS2008 compile error.
Signed-off-by: lgao4

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12111 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-09 06:48:31 +00:00
jcarsey 6bae492fb4 clarify the logic of the print length counting functions in both PrintLib library instances.
signed-off-by: jcarsey
reviewed-by: geekboy15a

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12102 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-08 20:50:31 +00:00
jcarsey f405c0674a Add 2 functions to UefiLib library class: CatSPrint and CatVSPrint.
Implement these functions in the UefiLib instance.

Add 2 functions to PrintLib library class: SPrintLengthAsciiFormat and SPrintLength.
Implement these functions in the BasePrintLib instance and the DxePrintLib2Protocol instance.

Signed-off-by: jcarsey
Reviewed-by: jljusten
Reviewed-by: geekboy15a

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12081 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-02 23:33:06 +00:00
jljusten 993532d0b8 MdeModulePkg: Add SmmLockBox PEI implementation
Signed-off-by: jljusten
Reviewed-by: rsun3

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12077 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-02 21:06:13 +00:00
lgao4 c05e7994a1 Fixed the issue in RuntimeStatusCode library that may not work on the early dispatched Runtime driver.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12073 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-02 06:23:54 +00:00
jljusten d31182c1b3 MdeModulePkg: Fix build error for UNIXGCC with IPF
#pragma pack with push/pop is not supported with all
GCC types.

Signed-off-by: jljusten
Reviewed-by: geekboy15a

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12056 6f19259b-4bc3-4df7-8a09-765794883524
2011-07-28 17:47:22 +00:00
lzeng14 3397c6f590 For libraries that have multiple module types support, just define a [Depex] section for specified module types that are permitted to have a [Depex] section.
Signed-off-by: lzeng14
Reviewed-by: lgao4

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12052 6f19259b-4bc3-4df7-8a09-765794883524
2011-07-27 08:54:57 +00:00
jljusten 1c837cd545 MdeModulePkg: Add SMM LockBox
This includes:
* LockBox protocol definition
* LockBoxLib library interface definition
* SmmLockBox GUID
* LockBoxNullLib library implementation
* 2 SmmLockBoxLib library implementations
* SmmLockBox SMM driver

Signed-off-by: jljusten
Reviewed-by: mdkinney
Reviewed-by: geekboy15a
Reviewed-by: jyao1
Reviewed-by: lgao4

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12029 6f19259b-4bc3-4df7-8a09-765794883524
2011-07-19 20:47:28 +00:00
hhuan13 57b301b569 1. Define a netlib library function NetLibGetSystemGuid()
2. Update PXE driver to use NetLibGetSystemGuid()

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12017 6f19259b-4bc3-4df7-8a09-765794883524
2011-07-14 11:27:05 +00:00
ydong10 81b618fe85 Update ALTCFG reference from default name token to default ID.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11558 6f19259b-4bc3-4df7-8a09-765794883524
2011-04-19 03:04:06 +00:00
mdkinney acaa2726fb Add description for 64-byte FIFO enable bit for PcdSerialFifoControl.
Update SerialPortInitializer() to properly preserve BIT5 in FCR instead of BIT4.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11404 6f19259b-4bc3-4df7-8a09-765794883524
2011-03-16 02:58:51 +00:00
ydong10 d4e0afd826 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11399 6f19259b-4bc3-4df7-8a09-765794883524 2011-03-15 00:52:27 +00:00
rsun3 ae373a56f7 Fix a bug in SmmPerformanceLib that there is no return value in normal cases for GetPerformanceMeasurement().
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11386 6f19259b-4bc3-4df7-8a09-765794883524
2011-03-14 03:47:31 +00:00
mdkinney 62a5bf63dd Update DebugLib to provide support for "err" command in the EFI Shell to adjust the filter mask for DEBUG() messages. The "err" command provide the ability to adjust this filter mask at a global level through an EFI Variable and at the module level through a the Debug Mask Protocol. In order to support the degree of flexibility, the DebugLib needs to use library to abstract the get/set operations to the filter mask.
1) Add DebugMask.h that defines the GUID and Protocol used by the "err" EFI Shell command to get/set the global mask and get/set the module scoped masks
2) Add DxeDebugPrintErrorLevelLib that provide an implementation of the DebugPrintErrorLevbel library classes that uses the GUID and Protocol defined in DebugMask.h to "err" EFI Shell compatibility.
3) Add default mapping for the DebugPrintErrirLevelLib to the DSC file for this package.




git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11366 6f19259b-4bc3-4df7-8a09-765794883524
2011-03-10 22:15:38 +00:00
rsun3 d042c6e830 Add performance library instances for SMM performance measurement.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11363 6f19259b-4bc3-4df7-8a09-765794883524
2011-03-10 07:39:51 +00:00
mdkinney 784ce12727 1) Add PcdSerialDetectCable to MdeModulePkg to enable/disable cable detection if hardware flow control is enabled. The default is to not perform cable detection.
2) Update BaseSerialPortLib16550 to use this new PCD.

This addresses an issue that was introduced on Feb 3, 2011 when all references to Carrier Detect(CD) were removed from the BaseSerialPortLib16550.  When that change was made, a target would block on the first Tx operation if hardware flow control was enabled and no cable or serial application was running on a host. Now the behavior when no cable is connected or no serial app is running on the host is controlled through a PCD.  The default is for the target to continue execution even if there is no cable or serial app running.  If PcdSerialDetectCable is set to TRUE, then the target will block on any transmit that does not have a cable connected or a serial app running in the host.

If hardware flow control is disabled, then this update will have no impact on behavior.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11301 6f19259b-4bc3-4df7-8a09-765794883524
2011-02-10 23:27:12 +00:00
mdkinney db662a64a6 Clean up BaseSerialPortLib16550 to remove references and checks for Carrier Detect(CD). This is not required for this library implementation. The only signals used for Hardware Flow Control are RTS/CTS.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11300 6f19259b-4bc3-4df7-8a09-765794883524
2011-02-04 01:19:59 +00:00
tye1 8322eb77ce Enhance the code to avoid the potential of return address of local variable to output structure.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11255 6f19259b-4bc3-4df7-8a09-765794883524
2011-01-17 05:54:13 +00:00
ydong10 ec50ecf2b8 Fix potential memory access violation
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11248 6f19259b-4bc3-4df7-8a09-765794883524
2011-01-13 02:25:24 +00:00
mdkinney e25fb2c06c Add missing @param to function header comment.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11203 6f19259b-4bc3-4df7-8a09-765794883524
2010-12-27 17:16:55 +00:00
mdkinney f2ad949723 Fix ICC build issues
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11185 6f19259b-4bc3-4df7-8a09-765794883524
2010-12-20 01:32:07 +00:00
mdkinney 467d15ae63 Add generic SerialPortLib instance for 16550 UARTs configured through PCDs. Depends on new library class called PlatformHookLib to perform platform specific initialization of the UART.
Add PlatformHookLib.h that defines the PlatformHookLib class
Add PlatformHookLibNull instance that is a Null implementation of the PlatformHookLib class





git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11184 6f19259b-4bc3-4df7-8a09-765794883524
2010-12-18 01:02:59 +00:00
mdkinney e06752bb9b Remove UefiDriverEntryPoint from [LibraryClasses] section. Library implementations should never link against an entry point lib. Only modules implementation should link against an entry point lib.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11179 6f19259b-4bc3-4df7-8a09-765794883524
2010-12-17 22:47:06 +00:00
tye1 70b356a9ff Minor code update to make TcpIo unchanged when return EFI_DEVICE_ERROR.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11175 6f19259b-4bc3-4df7-8a09-765794883524
2010-12-16 09:26:28 +00:00
tye1 4bad9adabc Add a TcpIo library to facilitate usage of TCP service.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11162 6f19259b-4bc3-4df7-8a09-765794883524
2010-12-14 03:19:21 +00:00
vanjeff 7b78853921 1. Rollback the changing on replacing MAX_EXTENDED_DATA_SIZE by EFI_STATUS_CODE_DATA_MAX_SIZE,
use MAX_EXTENDED_DATA_SIZE as before.
2. Use DEBUG error message instead of ASSERT(FASLE) when extended data is too large
3. Expand 1 for buffer array size to avoid potential issue.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11083 6f19259b-4bc3-4df7-8a09-765794883524
2010-11-23 07:50:31 +00:00
lgao4 77fafe9890 Compare DXE performance token name by DXE performance string length.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11077 6f19259b-4bc3-4df7-8a09-765794883524
2010-11-22 05:15:11 +00:00
mdkinney 9035e1189d Fix spelling error in comment
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11058 6f19259b-4bc3-4df7-8a09-765794883524
2010-11-16 00:33:52 +00:00
vanjeff 72cfa6f70b Replaced MAX_EXTENDED_DATA_SIZE by EFI_STATUS_CODE_DATA_MAX_SIZE.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11023 6f19259b-4bc3-4df7-8a09-765794883524
2010-11-10 06:13:55 +00:00
mdkinney c5e0de8794 Prevent infinite recursion when ASSERT(), DEBUG(), or any other use of ReportStatusCode is performed at > TPL_NOTIFY or there is not enough memory to allocate a buffer for the ExtendedData associated with the status code being reported
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11003 6f19259b-4bc3-4df7-8a09-765794883524
2010-11-04 20:58:23 +00:00
qianouyang 705f53a9b4 Update IPsec.h file to follow approved ECR which will be collected into future UEFI 2.3 Specification after 2.3 errata B and future UEFI Specifications after 2.3. The changes mainly include:
1. Add EFI_IPSEC2_PROTOCOL
  2. Remove IPsec Authentication Algorithm Definition and IPsec Encryption Algorithm    
     Definition.
  3. Add EFI_IPSEC_SA_DATA2 data structure.
And also update IPv4 driver to call EFI_IPSEC2_PROTOCOL.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10941 6f19259b-4bc3-4df7-8a09-765794883524
2010-10-15 05:40:41 +00:00
ydong10 c9325700d0 Refine soma code to make code run safely.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10877 6f19259b-4bc3-4df7-8a09-765794883524
2010-09-15 07:48:11 +00:00
mdkinney bf45bbe53d Update this library to restrict usage to DXE_RUNTIME_DRIVER and DXE_SAL_DRIVER module types
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10866 6f19259b-4bc3-4df7-8a09-765794883524
2010-09-10 20:10:32 +00:00
rsun3 3af91e23cb Minor code refinement.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10785 6f19259b-4bc3-4df7-8a09-765794883524
2010-08-10 07:36:00 +00:00
hhuan13 19550383ac Fixed K9 scan issues.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10780 6f19259b-4bc3-4df7-8a09-765794883524
2010-08-09 06:27:12 +00:00
jjin9 7754556334 Fix IP address text representation issue about leading zeros
1.It keeps the rule that Leading zero’s compression(Yes/Not) need to be consistent throughout the whole IP address.
2.It also fixes some issue to recognize some invalid representation.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10777 6f19259b-4bc3-4df7-8a09-765794883524
2010-08-06 08:31:00 +00:00
lgao4 ad108abec9 Roll back change r10696, because new update on r10700 and r10701 handles this issue.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10705 6f19259b-4bc3-4df7-8a09-765794883524
2010-07-28 01:43:41 +00:00
lgao4 344015785a Enhance PiSmmCoreMemoryAllocationLib Free function implementation to call gSmst or gBS Free service according to the buffer in or out of SMRAM range.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10701 6f19259b-4bc3-4df7-8a09-765794883524
2010-07-28 01:08:13 +00:00
lgao4 79bcf0554b Make sure gBS FreePool() is used to free the buffer always allocated by gBS AllocatePool() service.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10696 6f19259b-4bc3-4df7-8a09-765794883524
2010-07-26 16:20:56 +00:00
vanjeff 4cf7e0380e 1. Add init flag DEBUG_AGENT_INIT_DXE_AP.
2. Add definition DEBUG_AGENT_CONTINUE.
3. Update the definition of InitializeDebugAgent() more comments.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10660 6f19259b-4bc3-4df7-8a09-765794883524
2010-07-19 02:26:09 +00:00
vanjeff 1dc1b43fc2 1. fixed one bug to construct config request string header used child handle instead of NIC controller handle.
2. fixed one bug to calculate buffer size.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10617 6f19259b-4bc3-4df7-8a09-765794883524
2010-07-01 01:30:23 +00:00
qianouyang 2a2e33b20f Add a UNION definition (IP_IO_IP_PROTOOCL) for EFI_IP4/6_PROTOCOL and change IP_IO structure using this UNION to point the special IP Protocol.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10578 6f19259b-4bc3-4df7-8a09-765794883524
2010-06-13 08:18:10 +00:00
lgao4 e22812c731 Add three HiiLib APIs: HiiCreateTextOpCode, HiiCreateDateOpCode and HiiCreateTimeOpCode
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10544 6f19259b-4bc3-4df7-8a09-765794883524
2010-05-27 02:54:25 +00:00
qhuang8 e3e134ebe6 Fix minor format issue in file header
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10485 6f19259b-4bc3-4df7-8a09-765794883524
2010-05-13 01:04:21 +00:00
hhtian cd5ebaa06d Update the copyright notice format
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10420 6f19259b-4bc3-4df7-8a09-765794883524
2010-04-24 09:49:11 +00:00
geekboy15a e798cd87ca Fixed GCC 4.4 build issues due to EFIAPI not being used when required.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10379 6f19259b-4bc3-4df7-8a09-765794883524
2010-04-16 23:24:45 +00:00
lgao4 46d45cde43 Update the modules with the different module GUID to avoid the different modules with the same module GUID.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10341 6f19259b-4bc3-4df7-8a09-765794883524
2010-04-06 02:54:39 +00:00
rsun3 3b1464d5ac git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10288 6f19259b-4bc3-4df7-8a09-765794883524 2010-03-19 06:55:58 +00:00
jyao1 008eeb504b Move SmmCoreSmmServicesTableLib from MdePkg to MdeModulePkg.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10204 6f19259b-4bc3-4df7-8a09-765794883524
2010-03-05 04:05:28 +00:00
jljusten 9c1ca96e42 MdeModulePkg DxeNetLib: Fix compiler warning
This compiler warning was triggered by setting MDEPKG_NDEBUG.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10126 6f19259b-4bc3-4df7-8a09-765794883524
2010-03-01 00:28:34 +00:00
vanjeff e7af83aece 1. Refine debug agent library.
2. DxeCore and DxeIpl consume debug agent library. 

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10119 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-27 17:04:12 +00:00
vanjeff fe92ab29bf import Debug Agent Library and null instance in MdeModulePkg.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10099 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-26 05:38:04 +00:00
mdkinney 713b77813b Add MemoryAllocationLib for PI SMM Core
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10093 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-25 23:39:39 +00:00
klu2 8976547970 Clean up EFI_SPECIFICATION_VERSION and PI_SPECIFICATION_VERSION.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10072 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-25 16:31:22 +00:00
lgao4 2573712e01 Enhance SetupBrowser to support new UEFI HiiFormMap feature
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10069 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-25 10:10:59 +00:00
lgao4 6bfbb5f0e0 1. Correct File header to ## @file
2. Remove unnecessary .common] postfix on section.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10052 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-24 00:21:16 +00:00
mdkinney 300240b62b Use Memory Allocation Library instance for modules of type DXE_SMM_DRIVER
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10013 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-16 04:04:58 +00:00
lgao4 d6a82eaf8d Update HiiString Protocol and HiiSetString Api in HiiLib
1. Reserve the unique string identifier for all languages in the package list. 
2. Track MaxStringId to do the simple check for the requested StringId > MaxStringId, which can improve performance.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9954 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-09 07:12:35 +00:00
xdu2 dd29f3edb9 For network dynamic media support:
1. add library function NetLibDetectMedia to NetLib for media detection
2. update MnpDxe to periodically poll for media status update and check for media status before packet transmit
3. update Ip4Dxe to return ModeData using Mnp->GetModeData()
4. update IScsiDxe to check for media status before try to do DHCP and session login
5. update UefiPxeBcDxe to check for media status before PXE start

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9919 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-03 04:37:53 +00:00
qianouyang 04bb6788dd MdeModulePkg\Library\DxeNetLib: Update the NetLibStrToIp6andPrefix() to return different values for two situations - a. The Input string doesn’t contain the prefix length; b. The prefix length contains prefix length and the prefix length is zero.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9898 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-01 09:53:52 +00:00
tye1 90f1486c8e 1. Fix the potential issue in NetbufGetFragment() when Last is zero in Line 53.
2. Comments update.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9837 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-27 09:30:35 +00:00
tye1 9b6f044a32 Update according to two review comments:
1. add some comments to clarify AsciiStrDecimalToUintn() can help filtering un-decimal characters. 

2. change the condition judgment to “Index < 15” rather than (Index + 1 ) <16.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9803 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-25 03:29:59 +00:00
tye1 e4ef0031cd Add StrToIp functions to NetLib.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9798 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-25 02:19:04 +00:00
lgao4 84213069e9 Correct comments to match function declaration.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9773 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-15 07:12:08 +00:00
tye 95157291b0 Fix the warning: Line 389, the Index of mMonthName may be -1.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9714 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-12 11:42:18 +00:00
tye 70b689905c Add ASSERT () to make sure the array is accessed within the limit.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9709 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-11 10:56:53 +00:00