summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-10-10MdeModulePkg PiDxeS3BootScriptLib: Use PcdSet64S to instead of PcdSet64Star Zeng1-2/+4
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-10ShellPkg: Print error message when Shell set environment variable fail.Qiu Shumin2-1/+6
If you try to 'set' a read only environment variable and it fails without printing any information. This patch add error message printing when 'set' environment variable fails. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-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@18598 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-09MdePkg/PeCoffLoader: fix handling of ARM MOVW/MOVT instruction relocsArd Biesheuvel1-0/+1
Advance the *FixupData pointer after use in the second relocation pass for runtime when handling ARM MOVW/MOVT immediate relocations. Note that using FixupData is somewhat pointless for relocations targeting instructions rather than data items, since the program cannot typically modify its own instructions, and the second pass should be performed unconditionally. But let's just fix it for now. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18597 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-09BaseTools/PeCoffLoader: fix handling of ARM MOVW/MOVT instruction relocsArd Biesheuvel1-1/+1
The handling of ARM MOVW/MOVT relocations sets the FixupData twice (once incorrectly), but fails to advance the *FixupData pointer afterwards. This is not actually a problem, since the fixup data is never used but let's fix it anyway in case anyone reuses this code. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18596 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-09UefiCpuPkg BaseXApic(X2)Lib: Add ASSERT if local APIC not software enabledHao Wu2-1/+19
Add an ASSERT in GetApicTimerState() to check if the local APIC is software enabled. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18595 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-09UefiCpuPkg: Add ASSERT to handle local APIC not config properlyHao Wu1-1/+5
When the local APIC is not configurated properly, function GetApicTimerInitCount() in LocalApicLib may return zero, which will lead to a divide by zero exception in SecPeiDxeTimerLibUefiCpu. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18594 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-09MdePkg: Add ASSERT to handle local APIC not config properlyHao Wu1-2/+37
When the local APIC is not configurated properly, function InternalX86GetInitTimerCount() may return zero, which will lead to a divide by zero exception in SecPeiDxeTimerLibCpu. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18593 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-09SecurityPkg: Clean up unused files in RngDxeThomas Palmer6-488/+0
Clean up files in RngDxe/IA32 and RngDxe/X64 that are subsumed by files in BaseRngLib. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Qin Long <qin.long@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18592 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-09SecurityPkg: Integrate new RngLib into RngDxeThomas Palmer5-409/+28
Use the new RngLib to provide the IA32/X64 random data for RngDxe. Remove x86 specific functions from RdRand files. Simplify RngDxe by using WriteUnaligned64 for all platforms. Use GetRandomNumber128 in RngDxe to leverage 128 bit support provided by some HW RNG devices. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Qin Long <qin.long@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18591 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-09MdePkg: Create GetRandomNumber128 in RngLibThomas Palmer2-0/+49
Declare GetRandomNumber128 in RngLib.h. Create GetRandomNumber128 in BaseRngLib, which is simply calling GetRandomNumber64 twice. A GetRandomNumber128 function allows platforms with 128bit HWRNGs to save on IO overhead that comes from having to prime the HWRNG device before each read operation. Using the HWRNG installed on the HP ProLiant m400 moonshot cartridge, this will save about 50ms per RAW Entropy operation as compared with calling GetRandomNumber64 twice. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Qin Long <qin.long@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18590 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-08ArmVirtPkg/ArmVirtQemu: enable non-exec DXE stack for AARCH64Ard Biesheuvel1-0/+3
Enable the non-exec DXE stack feature when building for AARCH64. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18589 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-08MdeModulePkg/DxeIplPeim: implement non-exec stack for ARM/AARCH64Ard Biesheuvel2-0/+15
Mark the DXE stack region as non-executable right before handing off to the DXE core, by invoking the appropriate ArmLib function. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Feng Tian <Feng.Tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18588 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-08ArmPkg/ArmLib MMU: add functions to set/clear RO and XN bits on regionsArd Biesheuvel3-0/+150
Use the refactored UpdateRegionMapping () to traverse the translation tables, splitting block entries along the way if required, and apply a mask + or on each to set or clear the PXN/UXN/XN or RO bits. For now, the 32-bit ARM versions remain unimplemented. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18587 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-08ArmPkg/AArch64Mmu: move page table traversal code to separate functionArd Biesheuvel1-19/+31
Move the page table traversal and splitting logic to a separate function UpdateRegionMapping() and refactor it slightly so we can reuse it later to implement non-executable regions, for the stack. This primarly involves adding a value/mask pair to the function prototype that allows us to flip arbitrary bits on each block entry as the page tables are traversed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18586 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-08ArmPkg/AArch64Mmu: use architecturally correct definitions for XN/UXNArd Biesheuvel2-3/+6
The non-privileged execute never (UXN) page table bit defined for the EL1&0 translation regime and the execute never (XN) bit defined for the EL2 and EL3 translation regimes happen to share the same bit position, but they are in fact defined distinctly by the architecture. So define both bits explicitly, and add comments in places where we take advantage of the fact that they share the same bit position. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18585 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-08BaseTools: Update edksetup.sh to support multiple workspacesLiming Gao2-20/+65
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Wu Hao A <hao.a.wu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18584 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-08BaseTools: Update Edk2Setup.bat to support multiple workspacesLiming Gao3-18/+50
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Wu Hao A <hao.a.wu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18583 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-08BaseTools: Update edksetup.bat to support multiple workspacesLiming Gao2-58/+122
1. Update edksetup.bat and toolsetup.bat to handle PACKAGES_PATH. BaseTools directory may be in PACKAGES_PATH instead of WORKSAPCE. 2. Introduce EDK_TOOLS_BIN env points to the windows binary tools dir. Windows BaseTools Win32 may be a separate directory. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Wu Hao A <hao.a.wu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18582 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-08BaseTools: Update ECC tool to support multiple workspacesLi YangX3-11/+15
Update ECC to refer MultipleWorkspace class to convert the file path from WORKSPACE and PACKAGES_PATH. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Li YangX <yangx.li@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18581 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-08BaseTools: Update UPT tool to support multiple workspacesHesheng Chen9-37/+57
Update UPT to refer MultipleWorkspace class to convert the file path from WORKSPACE and PACKAGES_PATH. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hesheng Chen <hesheng.chen@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18580 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-08BaseTools: Update Build tool to support multiple workspacesLi YangX15-35/+232
WORKSPACE is still kept. New PACKAGES_PATH is introduced to specify the additional WORKSPACEs. In PACKAGES_PATH, ';' is separator in Windows, ':' is separator in Linux. Build directory is in WORKSPACE. Package, BaseTools and Conf directory will be found from WORKSPACE and PACKAGES_PATH. In implementation, BaseTools adds MultipleWorkspace class for the file path conversion from WORKSPACE and PACKAGES_PATH. Verify two tree layouts. Root\edk2\MdePkg Root\edk2\MdeMdeModulePkg Root\edk2\... 1. set WORKSPACE=Root\edk2 2. set WORKSPACE=Root, and set PACKAGES_PATH=Root\edk2 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Li YangX <yangx.li@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18579 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-08EmulatorPkg/build.sh: Use GCC49 toolchain with GCC 5.*Jordan Justen1-2/+2
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Cc: Andrew Fish <afish@apple.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18578 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-07OvmfPkg: raise DXEFV size to 9 MBGary Ching-Pang Lin3-9/+9
With gcc5 and enabling SECURE_BOOT and NETWORK_IP6, the build failed with this error: GenFv: ERROR 3000: Invalid the required fv image size 0x814c18 exceeds the set fv image size 0x800000 Raise the DXEFV size to 9 MB to fix the build error. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Ching-Pang Lin <glin@suse.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Regression-tested-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18577 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-07ArmPlatformPkg: Fixes for Juno ACPISupreeth Venkatesh1-7/+20
1. Change Interrupt for Juno PCI Routing table Interrupt Number Reference: http://www.arm.com/files/pdf/DDI0515D1a_juno_arm_development_platform_soc_trm.pdf table 3-3 page 3-7 2. Support for PCI IO range with ACPI on JUNO Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18576 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-06DuetPkg: exit pci function loops early if device is not multi-functionJoseph Shifflett1-0/+8
When looping through all PCI functions, code should not look for functions 1-7 if function 0 is not present or if function 0 indicates the device is not multifunction. Prior to this fix the code would use stale data in a buffer to determine if a device is multifunction even if function 0 is not present. This fixes a code bug and provides very small performance improvements. PCI 2.3 Specification states: They [multifunction devices] are also required to always implement function 0 in the device. Implementing other functions is optional and may be assigned in any order. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Joseph Shifflett <joseph.shifflett@hpe.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18575 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-06MdeModulePkg: exit pci function loops early if device is not multi-functionJoseph Shifflett3-0/+32
When looping through all PCI functions, code should not look for functions 1-7 if function 0 is not present or if function 0 indicates the device is not multifunction. Prior to this fix the code would use stale data in a buffer to determine if a device is multifunction even if function 0 is not present. This fixes a code bug and provides very small performance improvements. PCI 2.3 Specification states: They [multifunction devices] are also required to always implement function 0 in the device. Implementing other functions is optional and may be assigned in any order. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Joseph Shifflett <joseph.shifflett@hpe.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18574 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-06NetworkPkg: HttpDxe: Remove unused local variablesSamer El-Haj-Mahmoud2-8/+1
Fix gcc build errors [-Werror=unused-but-set-variable]. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hpe.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Build-tested-by: Laszlo Ersek <lersek@redhat.com> [lersek@redhat.com: add more details to commit message] Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18573 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-06ArmPlatformPkg/ArmJunoPkg/Madt.aslc: Fix MADT header versionSudeep Holla1-12/+12
Currently the MADT signature and revision is mapped to v1.0 macros which results in MADT with incorrect entries in the header for Juno. This patch fixes these EFI_ACPI_*_0_MULTIPLE_APIC_DESCRIPTION_TABLE macros by using appropriate v5.0 versions. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18572 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-06ArmPlatformPkg/RTSM: remove obsolete Foundation model librariesArd Biesheuvel6-491/+0
These are no longer used by any platform in the tree, nor are they of any significance to any out of tree platforms. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18571 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-06ArmPkg/AArch64Mmu: remove cache maintenance for page tablesArd Biesheuvel1-6/+0
All our page tables are allocated from memory whose cacheability attributes are inherited by the cacheability bits in the MMU control register, so there is no need for explicit cache maintenance after updating the page tables. And even if there were, Set/Way operations are not appropriate anyway for ensuring that these changes make it to main memory. So just remove the explicit cache maintenance completely. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18570 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-02BaseTools/AARCH64: use large code model for GCC <= 4.8Ard Biesheuvel1-3/+3
As it turns out, upstream GCC only supports the AArch64 'tiny' code model as of version 4.9. Since the default 'small' code model requires 4 KB section alignment (which is undesirable for the XIP modules), revert GCC 4.7 and 4.8 to using the 'large' code model instead. Reported-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tested-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18569 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-02ArmPkg/Mmu: do not configure block translations at level 0Ard Biesheuvel1-2/+3
Now that the AArch64 MMU code correctly identifies and handles naturally aligned regions of more than 2 MB in size, it will happily try to use block mappings at level 0 to map huge memory regions, such as the single cacheable 1:1 mapping we use for Xen domU to map the entire PA space. However, block mappings are not supported at level 0 so the resulting translation tables will be incorrect, causing execution to fail as soon as the MMU is enabled. So use level 1 as the minimum level at which to perform block translations. Reported-by: Julien Grall <julien.grall@citrix.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tested-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18568 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-01ArmVExpressPkg: use 4 KB section alignment for ARM DXE_RUNTIME_DRIVER modulesArd Biesheuvel1-1/+2
In order to support the Properties Table memory protection feature on 32-bit ARM, build DXE_RUNTIME_DRIVER type binaries with 4 KB section alignment by setting the common-page-size linker command line option. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18567 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-01ArmVirtPkg: use 4 KB section alignment for ARM DXE_RUNTIME_DRIVER modulesArd Biesheuvel1-1/+2
In order to support the Properties Table memory protection feature on 32-bit ARM, build DXE_RUNTIME_DRIVER type binaries with 4 KB section alignment by setting the common-page-size linker command line option. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Michael Zimmermann <sigmaepsilon92@gmail.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18566 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-01BaseTools/ARM: move to unified GCC linker scriptArd Biesheuvel1-1/+9
Instead of using the ARM builtin linker script for GNU ld, use the new unified one instead. This will allow us to increase the section alignment for DXE_RUNTIME_MODULEs, which is a prerequisite for enabling the UEFIv2.5 Properties Table memory protection feature. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tested-by: Michael Zimmermann <sigmaepsilon92@gmail.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18565 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-30OvmfPkg: set 4 KB section alignment for DXE_RUNTIME_DRIVER modulesArd Biesheuvel3-0/+9
Increase the section alignment to 4 KB for DXE_RUNTIME_DRIVER modules. This allows the OS to map them with tightened permissions (i.e., R-X for .text and RW- for .data). This is a prerequisite for enabling the EFI_PROPERTIES_RUNTIME_MEMORY_PROTECTION_NON_EXECUTABLE_PE_DATA (sic) feature that was introduced in UEFIv2.5. 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: Jordan Justen <jordan.l.justen@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18564 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-30Vlv2TbltDevicePkg FvbRuntimeDxe: Fix CalculateCheckSum16 input incorrect lengthStar Zeng1-2/+2
The input length should be "The size, in bytes, of Buffer.", the divide sizeof (UINT16) operation is not needed and incorrect. Cc: David Wei <david.wei@intel.com> Cc: Tim He <tim.he@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: David Wei <david.wei@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18563 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-30IntelFrameworkModulePkg GenericBdsLib: Do not assume perf entry count has no ↵Star Zeng1-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
2015-09-30MdeModulePkg UefiBootManagerLib: Do not assume perf entry count has no changeStar Zeng1-85/+35
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-30MdeModulePkg Ip4Dxe: Ip4Config2 to request DHCP Option6 DNS server IPSamer El-Haj-Mahmoud2-94/+168
Ip4Config2 protocol implementation must request for DNS server info when the policy is set to DHCP. And when a DHCP server responds to it with a list of DNS server addresses, it must parse it and set it for the instance. Without this, nobody can do a Ip4Config->GetData for DNS server IPs before calling Dns->Configure(). This will mean a DHCP is initiated when calling Dns->Configure(), thus causing serious performance issues. This patch attempts to address this issue. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hpe.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18560 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-30MdeModulePkg: Add SMBIOS 3.0 support in NetLibGetSystemGuid.Samer El-Haj-Mahmoud2-12/+20
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-29ShellPkg: Add a simple case to test shell parameter parsing logicRuiyu Ni4-5/+75
TestArgv.nsh is a very simple shell script to test how the interpreter parses the parameters. It uses ShellCTestApp.efi to dump the parameters passed from the interpreter. TestArgv.log is the desired output created using "TestArgv.nsh > TestArgv.log". Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18558 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-28ShellPkg: Build all libraries unconditionally.Qiu Shumin1-2/+13
Build all the optional libraries unconditionally so we can catch changes and how they affect the package regardless of the NO_SHELL_PROFILES, INCLUDE_DP, and INCLUDE_TFTP_COMMAND settings. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18557 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-25MdePkg: remove redundant handling of EFI_IMAGE_REL_BASED_DIR64 relocationsArd Biesheuvel3-132/+2
There is AARCH64 specific code in the PE/COFF loader to handle relocations of type EFI_IMAGE_REL_BASED_DIR64 which is dead code since this type is handled by generic code and never handed to the AARCH64 specific routine. 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@18556 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-25ArmVirtPkg: build the TFTP command into the UEFI shellLaszlo Ersek1-0/+1
The TFTP command is easy to use, it has very nice documentation (accessible with "HELP TFTP" in the shell), and it's a very versatile tool for downloading files from the host to the guest, via virtual network, while the guest is in the UEFI shell. Even better, enabling this command in the shell increases the uncompressed FVMAIN size only by 8192 bytes, in my AARCH64 build of VirtArmQemu.dsc, and the final size increase (after LZMA compression) that is visible in the FVMAIN_COMPACT volume is merely 1976 bytes. 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> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18555 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-25OvmfPkg: build the TFTP command into the UEFI shellLaszlo Ersek3-0/+3
The TFTP command is easy to use, it has very nice documentation (accessible with "HELP TFTP" in the shell), and it's a very versatile tool for downloading files from the host to the guest, via virtual network, while the guest is in the UEFI shell. Even better, enabling this command in the shell increases the uncompressed DXEFV size only by 12896 bytes, in my X64 build, and the final size increase (after LZMA compression) that is visible in the FVMAIN_COMPACT volume is merely 2576 bytes. 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> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18554 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-25ShellPkg: UefiShellTftpCommandLib: fix incompatible pointer assignmentLaszlo Ersek1-0/+2
Add the missing EFIAPI calling convention to the CheckPacket() function. Without it, the gcc build breaks due to the incompatible pointer assignment in "Mtftp4Token.CheckPacket = CheckPacket". Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18553 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-25UefiCpuPkg/CpuMpPei: Fix wrong CpuData pointerJeff Fan1-1/+2
CpuData buffer should be located in allocated buffer instead of at end of WakeupBuffer. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18550 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-25UefiCpuPkg/CpuMpPei: Add check on Processors number foundJeff Fan1-0/+1
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18549 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-25NetworkPkg:Fix iSCSI driver issue to work with iSCSI LIO targetYe Ting4-7/+7
The patch fixes iSCSI driver can't reinstate itself when configured in AutoConfigure mode and IPv6 stack is actually used. The issue occurs when iSCSI driver communicates with iSCSI LIO target in IPv6 path and the target sends back TCP FIN packets randomly. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu siyuan <siyuan.fu@intel.com> Reviewed-by: Wu jiaxin <jiaxin.wu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18546 6f19259b-4bc3-4df7-8a09-765794883524