]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
8 years agoUpdate the Package version and obsolete ReadMe.txt.
Ruiyu Ni [Tue, 13 Dec 2011 08:32:11 +0000 (08:32 +0000)]
Update the Package version and obsolete ReadMe.txt.

Signed-off-by: niruiyu
Reviewed-by: hhtian
(based on FatPkg commit aac0302cad3a31e33e1febd57a6d50a7744e7d30)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoOnly traverse recovery file's FAT table to fast the recovery performance.
Feng Tian [Tue, 22 Nov 2011 03:01:14 +0000 (03:01 +0000)]
Only traverse recovery file's FAT table to fast the recovery performance.

Signed-off-by: erictian
Reviewed-by: niruiyu
(based on FatPkg commit 6e68a62cf0c6b8ecad2bceff4e8d86ff08d1f041)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoFatPkg: Use BasePcdLibNull to prevent PCD dependency
Jordan Justen [Wed, 27 Jul 2011 17:25:45 +0000 (17:25 +0000)]
FatPkg: Use BasePcdLibNull to prevent PCD dependency

When using DxePcdLib or PeiPcdLib, a PCD protocol or
PPI dependency is added.

This dependency should not be required since the FAT
drivers use fixed PCD values.

Signed-off-by: jljusten
Reviewed-by: mdkinney
(based on FatPkg commit b098f260669c4f7856b8cf01fff2bbeb206f22c2)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoFix the comments to follow the UEFI Spec regarding how to check an EFI_HANDLE is...
Ruiyu Ni [Tue, 5 Jul 2011 09:12:18 +0000 (09:12 +0000)]
Fix the comments to follow the UEFI Spec regarding how to check an EFI_HANDLE is valid/invalid.

Signed-off-by: niruiyu
Reviewed-by: lgao4
(based on FatPkg commit 52cae8a00f34e17d414affcc5bbf8dffe51628ca)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoFatPkg: Add FAT PEIM
Jordan Justen [Fri, 1 Jul 2011 00:37:55 +0000 (00:37 +0000)]
FatPkg: Add FAT PEIM

Signed-off-by: jljusten
Reviewed-by: mdkinney
(based on FatPkg commit bead7f219277e063ed28589de8ddd01cf180c1a8)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoClean up invalid keywords and missing keywords in [Define] section of DEC file.
Star Zeng [Tue, 28 Jun 2011 02:06:15 +0000 (02:06 +0000)]
Clean up invalid keywords and missing keywords in [Define] section of DEC file.

Signed-off-by: lzeng14
Reviewed-by: lhauch
Reviewed-by: jljusten
(based on FatPkg commit aeddb8b033ee776dc4c0f046bf1fa1f9a1b59938)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoUpdate DebugLib to provide support for "err" command in the EFI Shell to adjust the...
Michael D Kinney [Thu, 10 Mar 2011 23:16:26 +0000 (23:16 +0000)]
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 default mappings for the DebugPrintErrorLevelLib to the DSC file for this package.

(based on FatPkg commit 98eccd9aafe30880b3a5f285c57501c075693eae)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoEnlarge the buffer to contain file name.
Qing Huang [Mon, 16 Aug 2010 00:41:48 +0000 (00:41 +0000)]
Enlarge the buffer to contain file name.

(based on FatPkg commit b65791b9cd034d3b222d2a0c9b071def9bbc7446)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoAdd some NULL pointer check by using ASSERT()
Qing Huang [Fri, 13 Aug 2010 03:34:18 +0000 (03:34 +0000)]
Add some NULL pointer check by using ASSERT()

(based on FatPkg commit a60a7af0891419330e0080f23fd2586ec871f021)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoremove obsoleted .msa and .nspd files
Hot Tian [Wed, 12 May 2010 11:58:28 +0000 (11:58 +0000)]
remove obsoleted .msa and .nspd files

(based on FatPkg commit 9792fbe00e50738cb6247ad1e091de79c49018dc)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoMove lock to FAT driver binding start to prevent interrupt during hot plug event.
Qing Huang [Fri, 7 May 2010 03:31:16 +0000 (03:31 +0000)]
Move lock to FAT driver binding start to prevent interrupt during hot plug event.

(based on FatPkg commit b449ca31443f754ed2e6998ca32f49547dabd615)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoUpdate copyright notice format
Hot Tian [Mon, 26 Apr 2010 01:24:39 +0000 (01:24 +0000)]
Update copyright notice format

(based on FatPkg commit 171c4de5919a4638db8f6f472b365ffbbac6070b)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoFix a migration bug in Fat driver as the value of lock has been changed from EDK...
Qing Huang [Thu, 18 Mar 2010 01:56:21 +0000 (01:56 +0000)]
Fix a migration bug in Fat driver as the value of lock has been changed from EDK library to EDKII library

(based on FatPkg commit c243d2ce08e76bfaefc0a3e9256603993a3b5ebe)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoClean PI_SPECIFICATION_VERSION and EFI_SPECIFICATION_VERSION.
Ken Lu [Thu, 25 Feb 2010 17:07:52 +0000 (17:07 +0000)]
Clean PI_SPECIFICATION_VERSION and EFI_SPECIFICATION_VERSION.

(based on FatPkg commit ed78153ec562e411d3524a9f2de86500f69fef60)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years ago1. Correct File header to ## @file 2. Remove unnecessary .common] postfix on section.
Qing Huang [Wed, 24 Feb 2010 02:28:56 +0000 (02:28 +0000)]
1. Correct File header to ## @file 2. Remove unnecessary .common] postfix on section.

(based on FatPkg commit 0b03da893fb583773510980b970364b87a27496b)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoUpdate license header
Qing Huang [Mon, 8 Feb 2010 03:23:03 +0000 (03:23 +0000)]
Update license header

(based on FatPkg commit 4b21ee5e90e1b9b2e0cf176971c344261645d37d)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoFix a warning issue with ARMCC.
Andrew Fish [Sun, 17 Jan 2010 04:44:59 +0000 (04:44 +0000)]
Fix a warning issue with ARMCC.

(based on FatPkg commit 5613b9c6a6fdf762ef26f30f22ecabc487e22eb4)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Andrew Fish <afish@apple.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoFix bug in Unicode colloation that causes ASSERT on BeagleBoard. PlatformLang or...
Andrew Fish [Tue, 15 Dec 2009 22:15:22 +0000 (22:15 +0000)]
Fix bug in Unicode colloation that causes ASSERT on BeagleBoard. PlatformLang or Lang variables are not processed correctly. NULL pointer is passed if no variable exists.

(based on FatPkg commit 0e3c94b9ac164caf705cc512a0e865fa0811b531)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Andrew Fish <afish@apple.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoFix warning generated by GCC.
Jordan Justen [Fri, 2 Oct 2009 06:40:01 +0000 (06:40 +0000)]
Fix warning generated by GCC.

These warnings seem to have been triggered by the recent change of
EFI_STATUS from INTN to UINTN.

(based on FatPkg commit c573d39c2a5627b44826d6f656452e8d097c97ff)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoUse EFI_FILE_PROTOCOL naming in place of EFI_FILE
Qing Huang [Tue, 22 Sep 2009 02:48:17 +0000 (02:48 +0000)]
Use EFI_FILE_PROTOCOL naming in place of EFI_FILE

(based on FatPkg commit 9f5ac6912eb71e9037fe05b8bd6bf02b5cee5ac6)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years ago1. FAT doesn't support to store time information in its FileLastAccess field. The...
Kun Gui [Mon, 8 Jun 2009 07:59:04 +0000 (07:59 +0000)]
1. FAT doesn't support to store time information in its FileLastAccess field. The FileLastAccess only contains date information; 2. Replaced RFC 3066 with RFC 4646.

(based on FatPkg commit 716b62054bf10b74949795a3df0d29eaca5a7486)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agogEfiFatPkgTokenSpaceGuid.PcdUnicodeCollationSupport and gEfiFatPkgTokenSpaceGuid...
Qing Huang [Wed, 8 Apr 2009 07:36:44 +0000 (07:36 +0000)]
gEfiFatPkgTokenSpaceGuid.PcdUnicodeCollationSupport and gEfiFatPkgTokenSpaceGuid.PcdUnicodeCollationSupport

(based on FatPkg commit d865610b1f37a1ab84982151c1b1255cd51d1489)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoRefactor to invoke only one GetBestLanguage()
Qing Huang [Wed, 25 Mar 2009 08:40:00 +0000 (08:40 +0000)]
Refactor to invoke only one GetBestLanguage()

(based on FatPkg commit 25e83a4e8906ef80e428b7c446216faa1ba9e2a7)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoApply GetBestLanguage() UefiLib to initialize Unicode Collation Protocol.
Qing Huang [Tue, 24 Mar 2009 14:19:12 +0000 (14:19 +0000)]
Apply GetBestLanguage() UefiLib to initialize Unicode Collation Protocol.

(based on FatPkg commit 63726907ef8f40b3ffea8aab464d133fa06f1e67)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoFix a spec conformance issue that "Attributes" should only be checked when OpenMode...
Qing Huang [Tue, 24 Mar 2009 13:56:38 +0000 (13:56 +0000)]
Fix a spec conformance issue that "Attributes" should only be checked when OpenMode is Create.

(based on FatPkg commit 4a3fecc5dc09ff6da448ffcf57e6a24fbca442f9)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoAdd comments in DSC files to explain the function and design of components section.
Leon Li [Tue, 10 Feb 2009 08:56:09 +0000 (08:56 +0000)]
Add comments in DSC files to explain the function and design of components section.

(based on FatPkg commit d3768aeea6829c1313f5b228399475ca9233ad2a)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoRemoved unused library instances for FAT package DSC file
Qing Huang [Sun, 1 Feb 2009 03:27:09 +0000 (03:27 +0000)]
Removed unused library instances for FAT package DSC file

(based on FatPkg commit ee748ff531258c84282ee6bff27278a7218a96bd)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoSplit out Synchronization Library from Base Library
Michael D Kinney [Fri, 30 Jan 2009 00:37:36 +0000 (00:37 +0000)]
Split out Synchronization Library from Base Library

(based on FatPkg commit 208bfe57ec2113fa1d9c79e029762250497bf0b0)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoFix the build error caused by recent MdePkg clean up
Qing Huang [Sun, 4 Jan 2009 03:50:43 +0000 (03:50 +0000)]
Fix the build error caused by recent MdePkg clean up

(based on FatPkg commit 89452d777f567e38fb24569dbda2477a05bbcd70)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoClean up to update the reference of the these macros: EFI_SIGNATURE_16 -> SIGNATURE_1...
Qing Huang [Tue, 16 Dec 2008 15:18:27 +0000 (15:18 +0000)]
Clean up to update the reference of the these macros: EFI_SIGNATURE_16 -> SIGNATURE_16 EFI_SIGNATURE_32 -> SIGNATURE_32 EFI_SIGNATURE_64 -> SIGNATURE_64 EFI_FIELD_OFFSET -> OFFSET_OF EFI_MAX_BIT -> MAX_BIT EFI_MAX_ADDRESS -> MAX_ADDRESS These macros are not defined in UEFI spec. It makes more sense to use the equivalent macros in Base.h to avoid alias.

(based on FatPkg commit 80c742a0be4426f9431ef6541268413e0b139368)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoUpdate for library instance renaming Fix typo in token space GUID
Qing Huang [Thu, 6 Nov 2008 01:37:08 +0000 (01:37 +0000)]
Update for library instance renaming Fix typo in token space GUID

(based on FatPkg commit eedcfacbfb6cae77d3c3da35f05a71f3118e824f)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoAdd details comments for the code flow to initialize Unicode Collation (2) support.
Qing Huang [Fri, 10 Oct 2008 02:33:21 +0000 (02:33 +0000)]
Add details comments for the code flow to initialize Unicode Collation (2) support.

(based on FatPkg commit 824fb80c85dfcb97662b8807c075c6cf7113b521)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoDe-unicode in comment for source files.
Qing Huang [Tue, 27 May 2008 02:51:43 +0000 (02:51 +0000)]
De-unicode in comment for source files.

(based on FatPkg commit ea0ebff7f3afd5808da4fc6bcdd996a8fc977185)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoFix a typo when checking the 16-bit alignment of Unicode String.
Qing Huang [Mon, 5 May 2008 07:06:57 +0000 (07:06 +0000)]
Fix a typo when checking the 16-bit alignment of Unicode String.

(based on FatPkg commit 603a10ca818a089b8af594e0f1ef7e1a3e42d938)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoFix undefined format in debug print statement.
Qing Huang [Mon, 5 May 2008 07:05:20 +0000 (07:05 +0000)]
Fix undefined format in debug print statement.

(based on FatPkg commit 407f91e8e23d2ab05bb1f0022974eacc267bb6f1)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoAdd preparation for FAR release.
Qing Huang [Fri, 21 Dec 2007 03:27:26 +0000 (03:27 +0000)]
Add preparation for FAR release.

(based on FatPkg commit 231d94be998ca1c72f23d2ac6cd5238e9afdc886)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoAdd EDK II Prime FatPkg New Feature: Support both Unicode Collation and Unicode Colla...
Qing Huang [Thu, 20 Dec 2007 09:16:45 +0000 (09:16 +0000)]
Add EDK II Prime FatPkg New Feature: Support both Unicode Collation and Unicode Collation 2 Protocols Support both Component Name and Component Name 2 Protocol.

(based on FatPkg commit e51cd032db84a6fb1f44a0605f80d96f5fdf4bc6)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoBaseTools: Add support to merge Prebuild and Postbuild into build Process
Yonghong Zhu [Thu, 31 Mar 2016 06:05:59 +0000 (14:05 +0800)]
BaseTools: Add support to merge Prebuild and Postbuild into build Process

This feature is enhance build tool to incorporate execution of prebuild
and postbuild.

1.Prebuild script
a.DEFINE PREBUILD in DSC [Defines] section
b.Build command -D PREBUILD to override the one in DSC [Defines] section
1)If PREBUILD is a file, then this file will be used as prebuild script.
2)If PREBUILD is empty, then prebuild script will be disabled.
3)If PREBUILD is not defined in [Defines] section and not passed in on
command line, then prebuild script is also disabled.

2.Prebuild option
a.All options of build tool
b.TARGET, ARCH and TOOL_CHAIN_TAG value, Those value will be from
target.txt file if they are not in build command line.
c.Additional options following prebuild definition. Quotes are needed
when these additional options are present.
d.Quotes would also be required if the path to the prebuild command
contains space or special characters.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
8 years agoBaseTools: Enhance --Pcd which override by build option
Yonghong Zhu [Tue, 5 Apr 2016 04:29:32 +0000 (12:29 +0800)]
BaseTools: Enhance --Pcd which override by build option

This patch 1) enhance the help info for --pcd to use " but not '.
2) Add the condition statements for build option Pcd type check.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
8 years agoMdeModulePkg/Bds: Fix build failures of VS tool chain
Ruiyu Ni [Thu, 7 Apr 2016 02:13:39 +0000 (10:13 +0800)]
MdeModulePkg/Bds: Fix build failures of VS tool chain

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>
Reviewed-by: Sunny Wang <sunnywang@hpe.com>
8 years agoOvmfPkg: disable PcdHiiOsRuntimeSupport
Laszlo Ersek [Thu, 10 Mar 2016 23:07:16 +0000 (00:07 +0100)]
OvmfPkg: disable PcdHiiOsRuntimeSupport

Edk2 commit 8a45f80edad4 ("MdeModulePkg: Make HII configuration settings
available to OS runtime") implements the optional UEFI feature described
in "31.2.11.1 OS Runtime Utilization" in UEFI v2.6.

While this feature might show benefits down the road even in QEMU virtual
machines, at the moment it only presents drawbacks:
- it increases the EfiRuntimeServicesData footprint,
- it triggers HII compatibility problems between edk2 and external drivers
  unconditionally, even if the end-user is not interested in HII and/or in
  configuring said drivers (see
  <https://www.redhat.com/archives/vfio-users/2016-March/msg00153.html>
  and <http://thread.gmane.org/gmane.comp.bios.edk2.devel/9894> for an
  example).

While the feature was being introduced, popular demand for a controlling
Feature PCD rose (see
<http://thread.gmane.org/gmane.comp.bios.edk2.devel/7626>), which is why
we can set it now to FALSE.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
8 years agoOvmfPkg: remove PcdMaxHardwareErrorVariableSize from the DSC files
Laszlo Ersek [Fri, 25 Mar 2016 10:43:09 +0000 (11:43 +0100)]
OvmfPkg: remove PcdMaxHardwareErrorVariableSize from the DSC files

PcdMaxHardwareErrorVariableSize sets the size limit for individual
Hardware Error Record Variables (see "7.2.3 Hardware Error Record
Persistence" and "Appendix P, Hardware Error Record Persistence Usage" in
the UEFI-2.6 spec).

Since Hardware Error Record Persistence is an optional firmware feature,
according to the spec, and OVMF does not enable it -- it inherits
PcdHwErrStorageSize and PcdHardwareErrorRecordLevel with zero values --,
the PcdMaxHardwareErrorVariableSize setting in our DSC files has no
effect. Remove it in order to eliminate future confusion.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Suggested-by: Star Zeng <star.zeng@intel.com>
Ref: http://thread.gmane.org/gmane.comp.bios.edk2.devel/9743/focus=9780
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
8 years agoArmVirtPkg: include Virtio10Dxe from OvmfPkg
Laszlo Ersek [Sat, 12 Mar 2016 17:05:05 +0000 (18:05 +0100)]
ArmVirtPkg: include Virtio10Dxe from OvmfPkg

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
8 years agoOvmfPkg: include Virtio10Dxe
Laszlo Ersek [Sat, 12 Mar 2016 17:03:33 +0000 (18:03 +0100)]
OvmfPkg: include Virtio10Dxe

Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
8 years agoOvmfPkg: Virtio10Dxe: non-transitional driver for virtio-1.0 PCI devices
Laszlo Ersek [Fri, 11 Mar 2016 23:11:55 +0000 (00:11 +0100)]
OvmfPkg: Virtio10Dxe: non-transitional driver for virtio-1.0 PCI devices

This driver implements the VIRTIO_DEVICE_PROTOCOL for non-transitional PCI
devices, based on the virtio-1.0 specification (csprd05). Non-transitional
means that it only binds QEMU's virtio-xxx-pci devices that receive the
",disable-legacy=on,disable-modern=off" properties on the QEMU command
line. These devices have distinct PCI Device IDs from those that are bound
by VirtioPciDeviceDxe.

The central abstraction of this driver is the VIRTIO_1_0_CONFIG type. It
is practically a "fat pointer" to a register block. The pointed-to
register block
- may or may not exist (the latter being mostly useful for virtio-1.0
  devices that have no device-specific registers),
- lives in one of the device's BARs,
- lives in an IO or MMIO BAR,
- lives at an offset relative to the BAR start,
- has its size also maintained.

Such VIRTIO_1_0_CONFIG "fat pointers" (i.e., the locations of the register
blocks) are parsed from vendor capabilities that reside in the device's
standard PCI capabilities list (in PCI config space).

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
8 years agoOvmfPkg: VirtioNetDxe: adapt virtio-net packet header size to virtio-1.0
Laszlo Ersek [Sun, 13 Mar 2016 00:51:29 +0000 (01:51 +0100)]
OvmfPkg: VirtioNetDxe: adapt virtio-net packet header size to virtio-1.0

In virtio-0.9.5, the size of the virtio-net packet header depends on
whether the VIRTIO_NET_F_MRG_RXBUF feature is negotiated -- the
"num_buffers" field is only appended to the header if the feature is
negotiated.

Since we never negotiate this feature, VirtioNetDxe never allocates room
for the "num_buffers" field.

With virtio-1.0, the "num_buffers" field is always there (although it
doesn't carry useful information without VIRTIO_NET_F_MRG_RXBUF). Adapt
the buffers that depend on the virtio-net header size (otherwise we have
skewed / truncated packets).

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
8 years agoOvmfPkg: VirtioScsiDxe: adapt feature negotiation to virtio-1.0
Laszlo Ersek [Sat, 12 Mar 2016 13:41:26 +0000 (14:41 +0100)]
OvmfPkg: VirtioScsiDxe: adapt feature negotiation to virtio-1.0

Relative to virtio-0.9.5, virtio-1.0 reverses the order of queue discovery
and feature negotiation. In virtio-1.0, feature negotiation has to
complete first, and the device can also reject a self-inconsistent feature
request through the new VSTAT_FEATURES_OK status bit. (For example if the
driver requests a higher level feature but clears a prerequisite feature.)

Furthermore, we retain the VIRTIO_F_VERSION_1 feature bit if the
VIRTIO_DEVICE_PROTOCOL provider has high enough revision.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
8 years agoOvmfPkg: VirtioRngDxe: adapt feature negotiation to virtio-1.0
Laszlo Ersek [Sat, 12 Mar 2016 13:41:26 +0000 (14:41 +0100)]
OvmfPkg: VirtioRngDxe: adapt feature negotiation to virtio-1.0

Relative to virtio-0.9.5, virtio-1.0 reverses the order of queue discovery
and feature negotiation. In virtio-1.0, feature negotiation has to
complete first, and the device can also reject a self-inconsistent feature
request through the new VSTAT_FEATURES_OK status bit. (For example if the
driver requests a higher level feature but clears a prerequisite feature.)

Furthermore, we retain the VIRTIO_F_VERSION_1 feature bit if the
VIRTIO_DEVICE_PROTOCOL provider has high enough revision.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
8 years agoOvmfPkg: VirtioNetDxe: adapt feature negotiation to virtio-1.0
Laszlo Ersek [Sat, 12 Mar 2016 13:41:26 +0000 (14:41 +0100)]
OvmfPkg: VirtioNetDxe: adapt feature negotiation to virtio-1.0

Relative to virtio-0.9.5, virtio-1.0 reverses the order of queue discovery
and feature negotiation. In virtio-1.0, feature negotiation has to
complete first, and the device can also reject a self-inconsistent feature
request through the new VSTAT_FEATURES_OK status bit. (For example if the
driver requests a higher level feature but clears a prerequisite feature.)

Furthermore, we retain the VIRTIO_F_VERSION_1 feature bit if the
VIRTIO_DEVICE_PROTOCOL provider has high enough revision.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
8 years agoOvmfPkg: VirtioBlkDxe: adapt feature negotiation to virtio-1.0
Laszlo Ersek [Sat, 12 Mar 2016 13:41:26 +0000 (14:41 +0100)]
OvmfPkg: VirtioBlkDxe: adapt feature negotiation to virtio-1.0

Relative to virtio-0.9.5, virtio-1.0 reverses the order of queue discovery
and feature negotiation. In virtio-1.0, feature negotiation has to
complete first, and the device can also reject a self-inconsistent feature
request through the new VSTAT_FEATURES_OK status bit. (For example if the
driver requests a higher level feature but clears a prerequisite feature.)

Furthermore, we retain the VIRTIO_F_VERSION_1 feature bit if the
VIRTIO_DEVICE_PROTOCOL provider has high enough revision.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
8 years agoOvmfPkg: VirtioLib: add Virtio10WriteFeatures() function
Laszlo Ersek [Sat, 12 Mar 2016 19:37:42 +0000 (20:37 +0100)]
OvmfPkg: VirtioLib: add Virtio10WriteFeatures() function

In VirtIo 1.0, a device can reject a self-inconsistent feature bitmap
through the new VSTAT_FEATURES_OK status bit. (For example if the driver
requests a higher level feature but clears a prerequisite feature.) This
function is a small wrapper around
VIRTIO_DEVICE_PROTOCOL.SetGuestFeatures() that also verifies if the VirtIo
1.0 device accepts the feature bitmap.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
8 years agoOvmfPkg: IndustryStandard: add definitions from the VirtIo 1.0 spec
Laszlo Ersek [Fri, 11 Mar 2016 19:51:12 +0000 (20:51 +0100)]
OvmfPkg: IndustryStandard: add definitions from the VirtIo 1.0 spec

These header files are intentionally minimal, and intentionally kept apart
from the VirtIo 0.9.5 headers.

The header inclusion chains end up like this (the Virtio10*.h header files
in the middle are new):

  Virtio.h    -> Virtio10.h    -> Virtio095.h

                     ^                 ^
                     |                 |

  VirtioNet.h -> Virtio10Net.h -> Virtio095Net.h

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
8 years agoOvmfPkg: IndustryStandard: factor out Virtio095Net.h
Laszlo Ersek [Wed, 6 Apr 2016 08:29:00 +0000 (10:29 +0200)]
OvmfPkg: IndustryStandard: factor out Virtio095Net.h

In the upcoming virtio-1.0 series, we'll introduce "Virtio10Net.h".
However, the "VirtioNet.h" header file should continue to expose the
Virtio Network Device specific type and macro definitions for all virtio
versions that OvmfPkg supports. Therefore extract "Virtio095Net.h" like
this:

  VirtioNet.h -> Virtio095Net.h

so that in the upcoming patches, we can insert "Virtio10Net.h" in the
middle of the inclusion chain.

This follows the example of "Acpi.h" and "Pci.h" under
"MdePkg/Include/IndustryStandard".

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Suggested-by: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
8 years agoOvmfPkg: IndustryStandard: factor out Virtio095.h
Laszlo Ersek [Wed, 6 Apr 2016 08:29:00 +0000 (10:29 +0200)]
OvmfPkg: IndustryStandard: factor out Virtio095.h

In the upcoming virtio-1.0 series, we'll introduce "Virtio10.h". However,
the "Virtio.h" header file should continue to expose the generic type and
macro definitions for all virtio versions that OvmfPkg supports. Therefore
extract "Virtio095.h" like this:

  Virtio.h -> Virtio095.h

so that in the upcoming patches, we can insert "Virtio10.h" in the middle
of the inclusion chain.

This follows the example of "Acpi.h" and "Pci.h" under
"MdePkg/Include/IndustryStandard".

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Suggested-by: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
8 years agoOvmfPkg: VirtioRngDxe: clear all feature bits more explicitly
Laszlo Ersek [Sat, 12 Mar 2016 00:54:57 +0000 (01:54 +0100)]
OvmfPkg: VirtioRngDxe: clear all feature bits more explicitly

This too is in preparation for the following patches.

After this patch, all four drivers manage their feature bits with explicit
masking.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
8 years agoOvmfPkg: VirtioBlkDxe: don't clear non-negotiable feature bits
Laszlo Ersek [Sat, 12 Mar 2016 00:47:04 +0000 (01:47 +0100)]
OvmfPkg: VirtioBlkDxe: don't clear non-negotiable feature bits

VirtioBlkDxe only recognizes virtio-block feature bits that the device
offers non-negotiably. Nonetheless, in preparation for the following
patches, don't try to clear them even for simplicity.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
8 years agoOvmfPkg: VIRTIO_DEVICE_PROTOCOL: pass VRING object to SetQueueAddress()
Laszlo Ersek [Sat, 12 Mar 2016 02:39:00 +0000 (03:39 +0100)]
OvmfPkg: VIRTIO_DEVICE_PROTOCOL: pass VRING object to SetQueueAddress()

In virtio-1.0, it is not enough to pass the base address of the virtio
queue to the hypervisor (as a frame number); instead it will want the
addresses of the descriptor table, the available ring, and the used ring
separately. Pass the VRING object to the SetQueueAddress() member
function; this will enable a virtio-1.0 implementation. Convert the
current producers and consumers to this prototype.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
8 years agoOvmfPkg: VIRTIO_DEVICE_PROTOCOL: remove GetQueueAddress() member
Laszlo Ersek [Sat, 12 Mar 2016 02:00:30 +0000 (03:00 +0100)]
OvmfPkg: VIRTIO_DEVICE_PROTOCOL: remove GetQueueAddress() member

This function was never consumed by drivers, and the current prototype is
unsupportable with virtio-1.0. Remove the function from the protocol
definition, and drop the current (unused) implementations.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
8 years agoOvmfPkg: VIRTIO_DEVICE_PROTOCOL: widen the Features bitmap to 64 bits
Laszlo Ersek [Fri, 11 Mar 2016 23:58:12 +0000 (00:58 +0100)]
OvmfPkg: VIRTIO_DEVICE_PROTOCOL: widen the Features bitmap to 64 bits

The virtio-1.0 spec widens the Features bitmap to 64 bits. Modify the
declarations of the GetDeviceFeatures() and SetGuestFeatures() protocol
member functions accordingly.

Normally, a protocol cannot be changed in incompatible ways if the GUID
stays the same; however, we've always been extremely clear that
VIRTIO_DEVICE_PROTOCOL is internal to edk2. See for example the top of
"OvmfPkg/Include/Protocol/VirtioDevice.h".

In this patch, all producers and consumers of the GetDeviceFeatures() and
SetGuestFeatures() protocol members are updated.

The drivers that currently produce these members are "legacy" drivers (in
virtio-1.0 terminology), and they cannot (and will not) handle feature
bits above BIT31. Therefore their conversion is only for compatibility
with the modified protocol interface. The consumers will be responsible
for checking the VIRTIO_DEVICE_PROTOCOL.Revision field, and for not
passing feature bits that these backends cannot handle.

The VirtioMmioGetDeviceFeatures() implementation stores the result of an
MmioRead32() call with normal assignment, so it needs no change beyond
adapting its prototype.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
8 years agoMdeModulePkg/Bds: Fix a boot hang due to Ram Disk boot support
Ruiyu Ni [Wed, 6 Apr 2016 06:36:58 +0000 (14:36 +0800)]
MdeModulePkg/Bds: Fix a boot hang due to Ram Disk boot support

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Sunny Wang <sunnywang@hpe.com>
8 years agoBaseTools: cache the defined Guid tool to improve the performance
Yonghong Zhu [Tue, 29 Mar 2016 04:59:43 +0000 (12:59 +0800)]
BaseTools: cache the defined Guid tool to improve the performance

Current GenFds Tool class GuidSection() is parsing the tools_def.txt for
every GUID'ed section that has a GUID defined tool, it cause a bad
performance. so this patch cache the defined Guid tool to improve the
performance.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
8 years agoMdeModulePkg/Bds: Memory Bins don't count the memory used by RAM Disk
Ni, Ruiyu [Tue, 29 Mar 2016 10:32:13 +0000 (18:32 +0800)]
MdeModulePkg/Bds: Memory Bins don't count the memory used by RAM Disk

MemoryTypeInformation don't count the reserved memory used by RAM Disk,
but it still check all types of memory and do reset when any type
of memory size changes.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
8 years agoMdeModulePkg/Bds: Free resources after ram disk boot finishes
Ni, Ruiyu [Wed, 30 Mar 2016 00:29:10 +0000 (08:29 +0800)]
MdeModulePkg/Bds: Free resources after ram disk boot finishes

The resource free includes to un-register the ram disk device and
free the memory occupied by the ram disk.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
8 years agoMdeModulePkg/Bds: Allocate reserved memory for RAM Disk boot media
Ni, Ruiyu [Thu, 31 Mar 2016 02:37:18 +0000 (10:37 +0800)]
MdeModulePkg/Bds: Allocate reserved memory for RAM Disk boot media

Use reserved memory to hold the buffer for the RAM disk to
follow the ACPI spec requirement.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
8 years agoSecurityPkg OpalPasswordSupportLib: Add comments for the used protocol in inf file.
Eric Dong [Wed, 6 Apr 2016 04:57:55 +0000 (12:57 +0800)]
SecurityPkg OpalPasswordSupportLib: Add comments for the used protocol in inf file.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoSecurityPkg OpalPasswordSupportLib: Remove the hard code debug build option.
Eric Dong [Wed, 6 Apr 2016 04:56:02 +0000 (12:56 +0800)]
SecurityPkg OpalPasswordSupportLib: Remove the hard code debug build option.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoSecurityPkg OpalPasswordSupportLib: Fixed gcc build failure.
Eric Dong [Wed, 6 Apr 2016 04:54:46 +0000 (12:54 +0800)]
SecurityPkg OpalPasswordSupportLib: Fixed gcc build failure.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoSecurityPkg TcgStorageOpalLib: Fixed gcc build failure.
Eric Dong [Wed, 6 Apr 2016 04:54:11 +0000 (12:54 +0800)]
SecurityPkg TcgStorageOpalLib: Fixed gcc build failure.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoSecurityPkg OpalPasswordDxe: Check the pointer before use it.
Eric Dong [Wed, 6 Apr 2016 04:52:44 +0000 (12:52 +0800)]
SecurityPkg OpalPasswordDxe: Check the pointer before use it.

Check the pointer before use it to make the code more safely.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoSecurityPkg TcgStorageOpalLib: Remove the hard code debug build option.
Eric Dong [Wed, 6 Apr 2016 04:51:26 +0000 (12:51 +0800)]
SecurityPkg TcgStorageOpalLib: Remove the hard code debug build option.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoSecurityPkg OpalPasswordDxe: Remove the hard code debug build option.
Eric Dong [Wed, 6 Apr 2016 04:50:19 +0000 (12:50 +0800)]
SecurityPkg OpalPasswordDxe: Remove the hard code debug build option.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoSecurityPkg OpalPasswordSmm: Remove the hard code build option.
Eric Dong [Wed, 6 Apr 2016 04:49:46 +0000 (12:49 +0800)]
SecurityPkg OpalPasswordSmm: Remove the hard code build option.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoMdePkg Cper.h: Add missing structure for 'Processor Error Record'
Hao Wu [Tue, 15 Mar 2016 02:00:40 +0000 (10:00 +0800)]
MdePkg Cper.h: Add missing structure for 'Processor Error Record'

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-off-by: Jeff Fan <jeff.fan@intel.com>
8 years agoSourceLevelDebugPkg/SmmDebugAgent: mMailboxPointer is used before set
Jeff Fan [Fri, 1 Apr 2016 04:53:06 +0000 (12:53 +0800)]
SourceLevelDebugPkg/SmmDebugAgent: mMailboxPointer is used before set

mMailboxPointer is used before it is initialization. This issue only happens
when SmmDebugAgent is initialized without PeiDebugAgent or DxeDebugAgent
initialization. The fix is to use Mailbox instead.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
8 years agoMdePkg/MdePkg.uni: Add description for PcdUartDefaultReceiveFifoDepth
Ruiyu Ni [Fri, 1 Apr 2016 03:22:17 +0000 (11:22 +0800)]
MdePkg/MdePkg.uni: Add description for PcdUartDefaultReceiveFifoDepth

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>
8 years agoMdePkg/BaseSynchronizationLib: Add spin lock alignment for IA32/x64
Jeff Fan [Mon, 21 Mar 2016 05:36:50 +0000 (13:36 +0800)]
MdePkg/BaseSynchronizationLib: Add spin lock alignment for IA32/x64

From Intel(R) 64 and IA-32 Architectures Software Developer's Manual, one lock
or semaphore is suggested to be present within a cache line. If the processors
are based on Intel NetBurst microarchitecture, two cache lines are suggested.
This could minimize the bus traffic required to service locks.

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
8 years agoMdePkg/BaseSynchronizationLib: Do not check timeout if lock released
Jeff Fan [Mon, 21 Mar 2016 05:26:46 +0000 (13:26 +0800)]
MdePkg/BaseSynchronizationLib: Do not check timeout if lock released

Current AcquireSpinLock() will check if timeout happens when PcdSpinLockTimeout
is not zero, even though the spin lock is already released. It may do
unnecessary operation to read timer's counter. This update is trying to acquire
spin lock firstly. If it could be acquired successfully, needn't to check
timeout at all.

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
8 years agoBaseTools/GenFds: Fix the bug for wrong alignment generate for RAW file
Yonghong Zhu [Fri, 1 Apr 2016 07:20:51 +0000 (15:20 +0800)]
BaseTools/GenFds: Fix the bug for wrong alignment generate for RAW file

When do the multiple raw file support feature, it cause the regression
that the raw file section alignment value was wrongly overridden by the
single raw file. this patch: 1) fix the wrong overridden bug. 2) remove
the duplicate code for combine multiple raw file into one.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
8 years agoMdeModulePkg/UiApp: Correct the total RAM calculation
Jeremy Linton [Fri, 1 Apr 2016 21:54:00 +0000 (16:54 -0500)]
MdeModulePkg/UiApp: Correct the total RAM calculation

This change mirrors the change in InteFrameworkModulePkg.
We now account for all TYPE19 memory regions found in the
smbios data, as well as handling records with Extended Addresses.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
8 years agoIntelFrameworkModulePkg/Bds: Correct the total RAM calculation
Jeremy Linton [Fri, 1 Apr 2016 21:53:59 +0000 (16:53 -0500)]
IntelFrameworkModulePkg/Bds: Correct the total RAM calculation

Update the BDS frontpage to pull the RAM ranges from the
smbios extended size fields when applicable. The RAM calculation
also needs to take into account all the RAM ranges being provided
as many machines have multiple physical address ranges.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
8 years agoMdeModulePkg: DxeUdpIoLib: fix non-empty payload path in UDP reception
Laszlo Ersek [Sun, 3 Apr 2016 09:48:43 +0000 (11:48 +0200)]
MdeModulePkg: DxeUdpIoLib: fix non-empty payload path in UDP reception

Commit 1b31acb66c02 ("MdeModulePkg: Check received packet size before use
it.") introduced a chunk of code under the new "Resume" label, in function
UdpIoOnDgramRcvdDpc(). The new code is supposed to run only when the
received packet has zero-length payload, but a "return" statement was
forgotten, and the code is reached on the normal (nonzero-length payload)
path as well, after the packet has been processed (and possibly freed) by
RxToken->CallBack(). This is a logic bug, with the direct symptom being
use-after-free / General Protection Fault.

Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Ting Ye <ting.ye@intel.com>
Cc: "Subramanian, Sriram (EG Servers Platform SW)" <sriram-s@hpe.com>
Fixes: 1b31acb66c026f2791c959a4ec9b55c04d583c22
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
8 years agoOvmfPkg: Add RAM disk support
Alcantara, Paulo [Wed, 30 Mar 2016 21:49:37 +0000 (21:49 +0000)]
OvmfPkg: Add RAM disk support

Currently booting off of a RAM disk is not supported by
IntelFrameWorkModulePkg BDS, however on systems without writable
disks, the RAM disk can be made useful when loading raw HDD images
into it -- specially the ones with a FAT32 partition on which files
can be natively accessed by system firmware.

This patch adds RamDiskDxe driver by default in OVMF platform.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Paulo Alcantara <paulo.alc.cavalcanti@hp.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
8 years agoArmPkg/ArmArchTimerLib: correct typos
Evan Lloyd [Thu, 3 Mar 2016 11:55:21 +0000 (11:55 +0000)]
ArmPkg/ArmArchTimerLib: correct typos

Some minor typographical problems were noticed during previous commits.
This change corrects those, and contains no functional modifications.
The changes are in comments, and one diagnostic message.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
8 years agoArmPkg/ArmArchTimerLib: fix unused variable in RELEASE builds
Sami Mujawar [Thu, 3 Mar 2016 11:55:20 +0000 (11:55 +0000)]
ArmPkg/ArmArchTimerLib: fix unused variable in RELEASE builds

The TimerFreq variable in the TimerConstructor() is unused in RELEASE
builds since ASSERTs are then disabled.
The only use of the variable (in the ASSERT) is replaced by a direct
invocation of the function previously used to set it.

NOTE: The build tools suppress warnings of this using compiler options
eg. -Wno-unused-but-set-variable for GCC toolchain or
    --diag_suppress=550 for RVCT toolchain.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
8 years agoEmbeddedPkg/AcpiLib: fix SBSA Generic Watchdog helper definition
Sami Mujawar [Fri, 4 Mar 2016 13:46:01 +0000 (13:46 +0000)]
EmbeddedPkg/AcpiLib: fix SBSA Generic Watchdog helper definition

The Reserved field in the SBSA Generic Watchdog Structure is 1 byte in
length. Refer Table 5-123 in the ACPI 5.1 Specification Errata A.

The EFI_ACPI_5_1_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT() helper
macro was initializing this field as EFI_ACPI_RESERVED_WORD instead of
EFI_ACPI_RESERVED_BYTE.

Although this does not cause any functional issue; it does not comply
with the specification.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
8 years agoArmPlatformPkg: Add PCD for Pl011 UART Interrupt
Sami Mujawar [Fri, 4 Mar 2016 18:26:35 +0000 (18:26 +0000)]
ArmPlatformPkg: Add PCD for Pl011 UART Interrupt

This patch adds a PCD for the PL011 UART Interrupt as this is needed by
the Serial Port Console Redirection Table.

Code at: https://github.com/EvanLloyd/tianocore/commit/68f26f23a236501d9e4294077da0d5070bbdab80

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
8 years agoMdePkg: Add ARM Serial Port Subtypes to DBG2
Sami Mujawar [Fri, 4 Mar 2016 17:24:41 +0000 (17:24 +0000)]
MdePkg: Add ARM Serial Port Subtypes to DBG2

The Microsoft Debug Port Table 2 (DBG2) specification revision
October 6, 2015 adds support for Serial Port Subtypes for ARM.

This patch adds these definitions.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
8 years agoMdePkg: Add ARM Serial Port Subtype definitions
Sami Mujawar [Fri, 4 Mar 2016 14:58:33 +0000 (14:58 +0000)]
MdePkg: Add ARM Serial Port Subtype definitions

The Serial Port Console Redirection Table specification Version 1.03 -
August 10, 2015 adds support for Serial Port Subtypes for ARM. These
Subtypes are described in the Table 3 of the Microsoft Debug Port Table
2 (DBG2) Specification - December 10, 2015.

This patch adds macro definitions for these.

Code at: https://github.com/EvanLloyd/tianocore/commit/79678a0f399e97883cfba09275e750861e24cd70

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
8 years agoArmVirtPkg: disable PcdHiiOsRuntimeSupport
Laszlo Ersek [Tue, 29 Mar 2016 17:51:30 +0000 (19:51 +0200)]
ArmVirtPkg: disable PcdHiiOsRuntimeSupport

Edk2 commit 8a45f80edad4 ("MdeModulePkg: Make HII configuration settings
available to OS runtime") implements the optional UEFI feature described
in "31.2.11.1 OS Runtime Utilization" in UEFI v2.6.

While this feature might show benefits down the road even in QEMU virtual
machines, at the moment it only presents drawbacks:
- it increases the EfiRuntimeServicesData footprint,
- it triggers HII compatibility problems between edk2 and external drivers
  unconditionally, even if the end-user is not interested in HII and/or in
  configuring said drivers (see
  <https://www.redhat.com/archives/vfio-users/2016-March/msg00153.html>
  and <http://thread.gmane.org/gmane.comp.bios.edk2.devel/9894> for an
  example).

While the feature was being introduced, popular demand for a controlling
Feature PCD rose (see
<http://thread.gmane.org/gmane.comp.bios.edk2.devel/7626>), which is why
we can set it now to FALSE.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
8 years agoArmPkg/ArmArchTimerLib: add GetTimeInNanoSecond() to ArmArchTimerLib
Sami Mujawar [Thu, 3 Mar 2016 15:28:16 +0000 (15:28 +0000)]
ArmPkg/ArmArchTimerLib: add GetTimeInNanoSecond() to ArmArchTimerLib

FirmwarePerformanceDxe.c utilizes the Timer Library function
GetTimeInNanoSecond() which was not implemented by the ArmArchTimerLib.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
8 years agoArmPkg/ArchArmTimerLib: refactor MultU64xN and TimerFreq definitions
Sami Mujawar [Thu, 3 Mar 2016 15:28:16 +0000 (15:28 +0000)]
ArmPkg/ArchArmTimerLib: refactor MultU64xN and TimerFreq definitions

This refactors some timer code to define MultU64xN as a preprocessor
symbol rather than a function pointer, and to factor out the code that
obtains the timer frequency into GetPlatformTimerFreq ().

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
[ard.biesheuvel: split off from 'add GetTimeInNanoSecond() to ArmArchTimerLib']
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
8 years agoNetworkPkg: Check received packet size before use it.
Fu Siyuan [Mon, 28 Mar 2016 03:01:03 +0000 (11:01 +0800)]
NetworkPkg: Check received packet size before use it.

Arbitrary length of packet may be received from network, including the
packets with zero payload data or malformed protocol header. So the code
much check the actually received data size before using it. For example, in
current edk2 network stack, an zero payload UDP packet may cause the
platform ASSERT in NetbufFromExt() because of the zero fragment number.
This patch update the IpIoLib and UdpIoLib to check and discard the zero
payload data packet to avoid above assert. Some other network drivers are
also updated to check the packet size to guarantee the minimum length of
protocol header is received from upper layer driver.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
8 years agoMdeModulePkg: Check received packet size before use it.
Fu Siyuan [Mon, 28 Mar 2016 03:00:31 +0000 (11:00 +0800)]
MdeModulePkg: Check received packet size before use it.

Arbitrary length of packet may be received from network, including the
packets with zero payload data or malformed protocol header. So the code
much check the actually received data size before using it. For example, in
current edk2 network stack, an zero payload UDP packet may cause the
platform ASSERT in NetbufFromExt() because of the zero fragment number.
This patch update the IpIoLib and UdpIoLib to check and discard the zero
payload data packet to avoid above assert. Some other network drivers are
also updated to check the packet size to guarantee the minimum length of
protocol header is received from upper layer driver.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
8 years agoNetworkPkg: Check pointer for NULL before use.
Fu Siyuan [Fri, 1 Apr 2016 05:14:49 +0000 (13:14 +0800)]
NetworkPkg: Check pointer for NULL before use.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
8 years agoRevert "TerminalDxe: select the UART's default receive FIFO depth"
Ruiyu Ni [Tue, 29 Mar 2016 07:30:37 +0000 (15:30 +0800)]
Revert "TerminalDxe: select the UART's default receive FIFO depth"

This reverts commit 31ae446b1a039a55d0336f2201d77d1032533413.
Changing the receive FIFO depth in Terminal driver Start() is not
recommended.
A new PCD PcdUartDefaultReceiveFifoDepth was added and
MdeModulePkg/SerialDxe driver uses the PCD as the default receive
FIFO depth.

Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
8 years agoArmVirtPkg/ArmVirtQemu: gate FDT config table install with build option
Ard Biesheuvel [Thu, 31 Mar 2016 11:15:05 +0000 (13:15 +0200)]
ArmVirtPkg/ArmVirtQemu: gate FDT config table install with build option

This introduces the .DSC define 'PURE_ACPI_BOOT_ENABLE', defaulting to
FALSE, which controls the value of the feature PCD 'PcdPureAcpiBoot'.

This allows an ArmVirtQemu image to be built that restricts the OS to
booting in ACPI mode.

This feature is only added to ArmVirtQemu, and not to ArmVirtQemuKernel,
the reason being that the latter is mostly intended for development work,
where the burden of adding 'acpi=force' if you need it is much more
tolerable than when trying to boot an installer on a production KVM guest
instance.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
8 years agoArmVirtPkg/VirtFdtDxe: make installation of FDT as config table optional
Ard Biesheuvel [Thu, 31 Mar 2016 11:00:07 +0000 (13:00 +0200)]
ArmVirtPkg/VirtFdtDxe: make installation of FDT as config table optional

The arm64 kernel is hardwired to prefer DT over ACPI, unless 'acpi=force'
is passed on the kernel command line. The only other way to force the
kernel to use ACPI is not to pass an FDT to it in the first place. So
introduce a PCD that inhibits the installation of the QEMU supplied FDT
as a configuration table.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
8 years agoMdeModulePkg RamDiskDxe: Fix incorrect RAM disk memory address calculation
Samer El-Haj-Mahmoud [Tue, 29 Mar 2016 23:12:51 +0000 (07:12 +0800)]
MdeModulePkg RamDiskDxe: Fix incorrect RAM disk memory address calculation

EndingAddress is calculated incorrectly. Original code calculates it as
(StartingAddress + Size). Correct value should be (StartingAddress +
Size - 1.

Note:
Besides the changes made by Samer, Hao also fixed a similar issue in
RamDiskImpl.c

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
Signed-off-by: Tapan Shah <tapandshah@hpe.com>
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hpe.com>
8 years agoMdeModulePkg EmmcDxe: Fix GCC build failure with set but unused variables
Zeng, Star [Wed, 30 Mar 2016 09:24:35 +0000 (17:24 +0800)]
MdeModulePkg EmmcDxe: Fix GCC build failure with set but unused variables

Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoSecurityPkg: Tcg2Dxe: Fix undersized TempBuf
Zhang, Chao B [Thu, 31 Mar 2016 01:40:28 +0000 (09:40 +0800)]
SecurityPkg: Tcg2Dxe: Fix undersized TempBuf

TempBuf in SetupEventLog needs to include sizeof(UINT32) to hold NumberOfAlgorithms.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: El-Haj-Mahmoud Samer <samer.el-haj-mahmoud@hpe.com>