summaryrefslogtreecommitdiffstats
path: root/IntelFrameworkModulePkg
Commit message (Collapse)AuthorAgeFilesLines
* IntelFrameworkModulePkg: Fix typos in commentsGiri P Mudusuru2016-07-112-6/+6
| | | | | | | | | - requried to required Cc: Jeff Fan <jeff.fan@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
* IntelFrameworkModulePkg/LegacyUi: Get legacy options when open legacy formDandan Bi2016-07-071-6/+38
| | | | | | | | | | | | | | | | | The LegacyBootMaintUiLib depends on the LegacyBootManagerLib to realize its functionality, the LegacyBootManagerLib may initialize after LegacyBootMaintUiLib, so the functionality of LegacyBootMaintUiLib may be incorrect. Now we fix this issue by executing the related codes when opening the legacy forminstead in its the constructor function. Because when opening the legacy form, the LegacyBootManagerLib must have been initialized. Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> 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>
* IntelFrameworkModulePkg StatusCode RuntimeDxe: Remove duplicated structure.Liming Gao2016-06-301-9/+0
| | | | | | | | | RUNTIME_MEMORY_STATUSCODE_HEADER has been moved into MdeModulePkg public header file Include/Guid/MemoryStatusCodeRecord.h. It should be removed from the driver. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
* IntelFrameworkModulePkg LegacyBiosDxe: Add nasm source file into INF fileLiming Gao2016-06-281-0/+2
| | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com>
* IntelFrameworkModulePkg LegacyBiosDxe: Convert X64/InterruptTable.asm to NASMLiming Gao2016-06-281-0/+71
| | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert X64/InterruptTable.asm to X64/InterruptTable.nasm. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com>
* IntelFrameworkModulePkg LegacyBiosDxe: Convert Ia32/InterruptTable.asm to NASMLiming Gao2016-06-281-0/+70
| | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert Ia32/InterruptTable.asm to Ia32/InterruptTable.nasm. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com>
* IntelFrameworkModulePkg: Replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStrStar Zeng2016-06-213-9/+11
| | | | | | | | | | | | | It is the follow up of 3ab41b7a325ca11a12b42f5ad1661c4b6791cb49 to replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr with UnicodeStrToAsciiStrS/AsciiStrToUnicodeStrS. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jeff Fan <jeff.fan@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* IntelFrameworkModulePkg/LegacyBios: Get SIO data from SIO interfaceRuiyu Ni2016-06-143-1/+224
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* IntelFrameworkModulePkg/LegacyBios: Get COM base from SerialIo parentRuiyu Ni2016-06-143-8/+15
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* IntelFrameworkModulePkg/LegacyBios: Rename local variablesRuiyu Ni2016-06-141-17/+17
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* IntelFrameworkModulePkg/LegacyBios: return NotFound when IsaIo absentRuiyu Ni2016-06-141-2/+3
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* IntelFrameworkModulePkg/LegacyBios: Get SIO data in separate functionRuiyu Ni2016-06-141-33/+57
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* IntelFrameworkModulePkg: Correct the usage of gPerformanceProtocolGuid in infStar Zeng2016-06-122-1/+2
| | | | | | | | | | | | | Add gPerformanceProtocolGuid in BdsDxe.inf explicitly. Currently, BdsDxe could build pass as it inherits gPerformanceProtocolGuid from GenericBdsLib.inf. Also update the usage of gPerformanceProtocolGuid in GenericBdsLib.inf. 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: Liming Gao <liming.gao@intel.com>
* IntelFrameworkModulePkg: Remove unused PCD/ProtocolRuiyu Ni2016-04-132-67/+0
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* IntelFrameworkModulePkg/KeyboardDxe: Use PCD defined in MdeModulePkgRuiyu Ni2016-04-131-3/+4
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* IntelFrameworkModulePkg/Ps2Mouse: Use PCD defined in MdeModulePkgRuiyu Ni2016-04-132-5/+4
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* IntelFrameworkModulePkg/Ps2AbsPointer: Use PCD defined in MdeModulePkgRuiyu Ni2016-04-132-5/+4
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* IntelFrameworkModulePkg/Ps2Kbd: use PCD/Protocol in MdeModulePkgRuiyu Ni2016-04-132-6/+6
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* IntelFrameworkModulePkg AcpiS3SaveDxe: Remove S3Ready() functional codeStar Zeng2016-04-075-472/+8
| | | | | | | | | | | | | The S3Ready() functional code has been moved to S3SaveStateDxe in MdeModulePkg, the ACPI global variable related code is leaved as is for compatibility. PcdS3BootScriptStackSize is also moved to MdeModulePkg. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jeff Fan <jeff.fan@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>
* IntelFrameworkModulePkg AcpiS3SaveDxe: Consume PcdAcpiS3Enable to control ↵Star Zeng2016-04-072-3/+8
| | | | | | | | | | | the code Cc: Jeff Fan <jeff.fan@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Laszlo Ersek <lersek@redhat.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>
* IntelFrameworkModulePkg/Bds: Correct the total RAM calculationJeremy Linton2016-04-051-22/+22
| | | | | | | | | | | 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>
* IntelFrameworkModulePkg: LegacyBootMaintUiLib: remove set but unused variablesLaszlo Ersek2016-03-251-16/+0
| | | | | | | | Cc: Jeff Fan <jeff.fan@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> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
* IntelFrameworkModulePkg: DxeCapsuleLib: remove set but unused variablesLaszlo Ersek2016-03-251-2/+0
| | | | | | | | Cc: Jeff Fan <jeff.fan@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> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
* IntelFrameworkModulePkg: BiosVideo: remove set but unused variableLaszlo Ersek2016-03-251-7/+6
| | | | | | | | Cc: Jeff Fan <jeff.fan@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> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
* IntelFrameworkModulePkg/LegacyBootMaintUiLib: Refine the codeDandan Bi2016-03-161-5/+25
| | | | | | | | Remove the ASSERT code that may be triggered in LegacyBootMaintUiLib. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* IntelFrameworkModulePkg: Add NOOPT target in IntelFrameworkModulePkg.dscHao Wu2016-01-191-2/+2
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-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@19671 6f19259b-4bc3-4df7-8a09-765794883524
* IntelFrameworkModulePkg: Remove the undefined PCD help and prompt stringsLiming Gao2015-12-241-25/+1
| | | | | | | | | | | | IntelFrameworkModulePkg.uni includes some undefined PCD help and prompt strings, which will be removed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19512 6f19259b-4bc3-4df7-8a09-765794883524
* IntelFrameworkModulePkg: Convert all .uni files to utf-8Jordan Justen2015-12-1581-0/+0
| | | | | | | | | | | | | To convert these files I ran: $ python3 BaseTools/Scripts/ConvertUni.py IntelFrameworkModulePkg Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19254 6f19259b-4bc3-4df7-8a09-765794883524
* IntelFrameworkModulePkg: DebugAssert enhancementBaraneedharan Anbazhagan2015-12-071-15/+36
| | | | | | | | | | | | | | If the assert happens in a library, then it's hard to determine which module using that library is generating that assert. Use gEfiCallerBaseName in DebugAssert to display the module name. In V2: Updated patch to use CopyMem instead of AsciiSPrint. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Baraneedharan Anbazhagan <anbazhagan@hp.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19129 6f19259b-4bc3-4df7-8a09-765794883524
* IntelFrameworkModulePkg: remove unreachable codeArd Biesheuvel2015-12-031-1/+0
| | | | | | | | | | | Some compilers (like RVCT) are finicky about unreachable code, so remove it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19105 6f19259b-4bc3-4df7-8a09-765794883524
* IntelFrameworkModulePkg BdsDxe: Use PcdSet##S to replace PcdSet##Eric Dong2015-10-153-10/+21
| | | | | | | | | | | | | | | 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. So for DynamicDefault, we add assert when set failure. For DynamicHii, we add logic to handle it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18605 6f19259b-4bc3-4df7-8a09-765794883524
* IntelFrameworkModulePkg GenericBdsLib: Do not assume perf entry count has no ↵Star Zeng2015-09-301-78/+33
| | | | | | | | | | | | | | | | | | | | 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 R18417 "MdeModulePkg: Fix a performance data buffer overrun issue". 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@18562 6f19259b-4bc3-4df7-8a09-765794883524
* IntelFrameworkModulePkg: Ad the missing module UNI files.Liming Gao2015-08-284-3/+3
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18343 6f19259b-4bc3-4df7-8a09-765794883524
* IntelFrameworkModulePkg: Replace deprecated function.Eric Dong2015-08-271-2/+2
| | | | | | | | | | 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@18331 6f19259b-4bc3-4df7-8a09-765794883524
* IntelFrameworkModulePkg: Fix mixed Dos and Linux end of line format issue.Eric Dong2015-08-271-0/+0
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18322 6f19259b-4bc3-4df7-8a09-765794883524
* IntelFrameworkModulePkg/BiosThunk: Fix 32 bits arch build failure when ↵eric Dong2015-08-261-3/+3
| | | | | | | | | | disable optimization. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18319 6f19259b-4bc3-4df7-8a09-765794883524
* IntelFrameworkModulePkg: Update DEC and DSC version from 0.94 to 0.96Feng Tian2015-08-202-2/+2
| | | | | | | | | | Update DEC and DSC version to reflect new changes. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18253 6f19259b-4bc3-4df7-8a09-765794883524
* Fixed build error for VS2008 toolchain.Eric Dong2015-08-201-0/+1
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18250 6f19259b-4bc3-4df7-8a09-765794883524
* IntelFrameworkModulePkg:Refine the code in LegacyBootMaintUiLibDandan Bi2015-08-131-4/+9
| | | | | | | | | | | | Refine the code in LegacyBootMaintUiLib to prevent the potential risk. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18215 6f19259b-4bc3-4df7-8a09-765794883524
* LegacyBootMaintUi: Update copyright info, cover old code existed in old ↵Eric Dong2015-08-054-3/+3
| | | | | | | | | | BdsDxe driver. 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@18162 6f19259b-4bc3-4df7-8a09-765794883524
* IntelFrameworkModulePkg:Refine the code comments in LegacyBootMaintUiLibDandan Bi2015-08-042-9/+7
| | | | | | | | 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@18152 6f19259b-4bc3-4df7-8a09-765794883524
* Fixed GCC49 build fail issue.Eric Dong2015-08-031-0/+3
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18126 6f19259b-4bc3-4df7-8a09-765794883524
* Fixed GCC tool chain build fail.Eric Dong2015-07-312-2/+2
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18119 6f19259b-4bc3-4df7-8a09-765794883524
* Legacy Boot Maintenance UI part code split from ↵Eric Dong2015-07-307-0/+1947
| | | | | | | | | | | | IntelFrameworkModulePkg/Universal/BdsDxe driver. This is the legacy part of the old BdsDxe driver. 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@18112 6f19259b-4bc3-4df7-8a09-765794883524
* IntelFrameworkModulePkg: Add missing PCD usage information in UNI and DEC files.Qiu Shumin2015-07-282-0/+4
| | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18084 6f19259b-4bc3-4df7-8a09-765794883524
* IntelFrameworkModulePkg AcpiS3SaveDxe: Reduce reserved memory consumptionStar Zeng2015-07-272-74/+124
| | | | | | | | | | | | | | | | | | Reduce reserved memory consumption by page table buffer, then OS can have more available memory to use. Take PhysicalAddressBits = 48 and 2MB page granularity as example, 1:1 Virtual to Physical identity mapping page table buffer needs to be ((512 + 1) * 512 + 1) * 4096 = 1075843072 bytes = 0x40201000 bytes. When BIOS does not support long mode waking vector, only allocate 2 pages (1G page enabled) or 6 pages for 4G page table, and 8 extra pages to handles > 4G request by page fault. 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@18068 6f19259b-4bc3-4df7-8a09-765794883524
* IntelFrameworkModulePkg: GenericBdsLib: set Status before useLaszlo Ersek2015-07-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recent patch titled IntelFrameworkModulePkg/GenericBdsLib: remove AcpiS3->S3Save() call has exposed a preexistent bug in the BdsLibBootViaBootOption() function, and now the IA32 build of OVMF fails with: In function 'BdsLibBootViaBootOption': error: 'Status' may be used uninitialized in this function Namely, we have the following (simplified) data flow: // // Status and ImageHandle both start out uninitialized // /* ... */ ImageHandle = BdsExpandUsbShortFormDevicePath (DevicePath); /* ... */ if (ImageHandle == NULL) { /* ... */ } if ((ImageHandle == NULL) || (EFI_ERROR(Status))) { /* ... */ */ If BdsExpandUsbShortFormDevicePath() returns a non-NULL value, then the second "if" statement will check Status without the function having initialized or assigned it. When BdsExpandUsbShortFormDevicePath() returns non-NULL, Status should be EFI_SUCCESS; so let us assign it that value up-front. Note that the bug existed before the patch IntelFrameworkModulePkg/GenericBdsLib: remove AcpiS3->S3Save() call That is, the bug was not introduced, only exposed, by the patch -- in the pre-patch state, although the Status variable was set early and unconditionally, the error code that it may have carried from the failed gEfiAcpiS3SaveProtocolGuid lookup had nothing to do with the second "if" statement above. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jeff Fan <jeff.fan@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18061 6f19259b-4bc3-4df7-8a09-765794883524
* IntelFrameworkModulePkg/GenericBdsLib: remove AcpiS3->S3Save() callArd Biesheuvel2015-07-263-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The AcpiS3->S3Save() call needs to occur before the end-of-DXE event is signalled. The end-of-DXE event needs to be signalled prior to invoking any UEFI drivers, applications, or connecting consoles. This means the call to S3Save() that occurs in BdsLibBootViaBootOption() violates the ordering constraints, and should be removed. Since it is the responsibility of the platform BDS to signal the end-of-DXE event, it should also perform the AcpiS3->S3Save() call at an appropriate time. Commit message update from Laszlo Ersek <lersek@redhat.com>: Following Jiewen Yao's idea in http://thread.gmane.org/gmane.comp.bios.tianocore.devel/16088/focus=16146 platforms that (1) use this exact instance of GenericBdsLib, *and* (2) support S3 should now collect the S3 state (3) in an End-of-Dxe callback in their AcpiS3SaveDxe drivers, *or* (4) with an explicit AcpiS3->S3Save() call made to their AcpiS3SaveDxe drivers from their PlatformBdsLib instances. OvmfPkg, which uses this GenericBdsLib instance, and has its own AcpiS3SaveDxe fork, follows (3). Vlv2TbltDevicePkg, which has a GenericBdsLib fork, and uses IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe, follows (4). There are no other platforms in the public edk2 repository that support S3. 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: Jiewen Yao <Jiewen.Yao@intel.com> [lersek@redhat.com: updated commit message] Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jeff Fan <jeff.fan@intel.com> Cc: Jiewen Yao <Jiewen.Yao@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18036 6f19259b-4bc3-4df7-8a09-765794883524
* IntelFrameworkModulePkg DeviceMngr: Potential read over memory boundaryHao Wu2015-07-131-1/+2
| | | | | | | | | | | | | | | | | This commit will resolve the issue brought by r17738. String = AllocateCopyPool (BufferLen, L"MAC:"); The above using of AllocateCopyPool() will read contents out of the scope of the constant string. Potential risk for the constant string allocated at the boundary of memory region. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17933 6f19259b-4bc3-4df7-8a09-765794883524
* IntelFrameworkModulePkg BootMngr: Fix potential read over memory boundaryHao Wu2015-07-131-1/+2
| | | | | | | | | | | | | | | | | This commit will resolve the issue brought by r17737. HelpString = AllocateCopyPool (HelpSize, L"Device Path : "); The above using of AllocateCopyPool() will read contents out of the scope of the constant string. Potential risk for the constant string allocated at the boundary of memory region. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17932 6f19259b-4bc3-4df7-8a09-765794883524