Laszlo Ersek [Mon, 20 Jan 2014 08:50:06 +0000 (08:50 +0000)]
OvmfPkg: unify PcdMaxVariableSize at 0x2000 bytes
The Linux persistent store (pstore) feature serves, among other things,
for saving the trailing portion of the dmesg in case of a kernel oops. One
backend for the pstore facility is "efivars", ie. non-volatile UEFI
variables.
Linux splits the tail of the dmesg that is to be dumped in 1KB chunks, and
tries to save each chunk as a specially (and differently) named
non-volatile variable. The 1KB chunk size accounts for the variable data
only; Linux expects this size to be available per variable *without*
accounting for the variable name or any firmware-internal overhead.
For non-authenticated (ie. non-secure-boot) variables, OvmfPkg currently
sets the per-variable limit to 0x400 (1KB) through PcdMaxVariableSize.
However this PCD determines the size *before* subtracting the internal
overhead (which is sizeof(VARIABLE_HEADER) == 0x20 bytes for
non-authenticated variables, see
"MdeModulePkg/Include/Guid/VariableFormat.h"), and also before subtracting
the given variable's UCS-2 encoded name (including the trailing 0x0000).
Linux maximizes these special variable names in DUMP_NAME_LEN==52 code
points (including the trailing NUL). Hence we must provide at least
0x020 == sizeof(VARIABLE_HEADER), for the internal overhead
0x068 == 2 * 52, for the UCS-2 encoded name, including trailing 0x0000
0x400 for the variable body
-----
0x488 == 1160
bytes in PcdMaxVariableSize, so that Linux's efivars-backed pstore can
work even on non-secure-boot builds of OVMF.
However, as PcdMaxVariableSize=0x2000 has proven reasonable when secure
boot is enabled, it should also be okay when secure boot is disabled; so
for simplicity's sake set PcdMaxVariableSize to 0x2000 unconditionally.
jyao1 [Fri, 17 Jan 2014 03:42:09 +0000 (03:42 +0000)]
DxeCore is designed to trust input data, so add comments to reminder caller to do check to follow PI specification when necessary.
Since LBA_CACHE is DxeCore implementation specific, DxeCore will check it here.
Signed-off by: jiewen yao <jiewen.yao@intel.com>
Reviewed by: liming gao <liming.gao@intel.com>
Jaben Carsey [Thu, 16 Jan 2014 16:53:23 +0000 (16:53 +0000)]
ShellPkg: Remove ASSERT
This change removes ASSERT statements and replaces them with logic to break out of the loop. This both prevents spinning forever and prevents processing the returned data from the function that failed.
Jaben Carsey [Thu, 16 Jan 2014 16:52:39 +0000 (16:52 +0000)]
ShellPkg: Remove ASSERT
This change removes ASSERT statements and replaces them with logic to break out of the loop. This both prevents spinning forever and prevents processing the returned data from the function that failed.
Roy Franz [Wed, 15 Jan 2014 16:24:00 +0000 (16:24 +0000)]
ArmPlatformPkg/ArmVExpressPkg: Add build option to support VExpress A15 QEMU emulation
This patch adds an EDK2_ARMVE_SUPPORT_QEMU macro that can be defined at build
time to build an image that supports QEMU. The default build is unchanged and
builds the RTSM configuration.
QEMU only models fixed size blocks within a flash device, and the RTSM
configuration stores EFI variables in the smaller boot blocks of the
flash. When built for QEMU the larger blocks are used that QEMU properly
emulates.
Signed-off-by: Roy Franz <roy.franz@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-By: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15125 6f19259b-4bc3-4df7-8a09-765794883524
Olivier Martin [Wed, 15 Jan 2014 12:24:31 +0000 (12:24 +0000)]
ArmPkg/CompilerIntrinsicsLib: Make __aeabi_memcpy the same as memcpy
This code also removed some redundant instructions.
__aeabi_memcpy doesn't require preservation of r0 (as memcpy does),
which could save a push, but the code has been left to keep things consistent.
The reason __aeabi_memcpy has been added to the .S file is so it will be available
to toolchains that use the GCC assembler but the full ARM EABI (i.e. current LLVM)
Fu Siyuan [Wed, 15 Jan 2014 07:19:58 +0000 (07:19 +0000)]
Fix bug that PXEv4 boot fail if PXEv6 is performed firstly. Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Dong, Guo <guo.dong@intel.com> Reviewed-by: Jin, Eric <eric.jin@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15116 6f19259b-4bc3-4df7-8a09-765794883524
Gao, Liming [Wed, 15 Jan 2014 02:17:30 +0000 (02:17 +0000)]
1. Add new API MigratePeiServicesTablePointer() in PeiServicesTablePointerLib class.
2. PeiCore will call this API to migrate the PEI Services Table pointer from temporary RAM to permanent RAM.
Signed-off-by: Gao, Liming <liming.gao@intel.com> Reviewed-by: Kinney, Michael D <michael.d.kinney@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15115 6f19259b-4bc3-4df7-8a09-765794883524
Gao, Liming [Wed, 15 Jan 2014 02:16:57 +0000 (02:16 +0000)]
1. Add new API MigratePeiServicesTablePointer() in PeiServicesTablePointerLib class.
2. PeiCore will call this API to migrate the PEI Services Table pointer from temporary RAM to permanent RAM.
Signed-off-by: Gao, Liming <liming.gao@intel.com> Reviewed-by: Kinney, Michael D <michael.d.kinney@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15114 6f19259b-4bc3-4df7-8a09-765794883524
Olivier Martin [Tue, 14 Jan 2014 15:31:01 +0000 (15:31 +0000)]
EdkShellPkg/ShellR64.patch: Adding missing files from the patch
Some files were missing from the newly generated patch:
- Library/Aarch64/efilibplat.h
- Library/Arm/efilibplat.h
Instructions have been written to correctly generate this patch:
https://sourceforge.net/apps/mediawiki/tianocore/index.php?title=ArmPkg/Binaries#EdkShellPkg
Shumin Qiu [Tue, 14 Jan 2014 07:30:50 +0000 (07:30 +0000)]
1. Change the implementation of function 'LoadVariableFromFile' to return SHELL_STATUS. 2. Add code to check whether the pointer 'FoundVarName' in 'DmpStore.c' is NULL before used.
Fu Siyuan [Mon, 13 Jan 2014 02:53:50 +0000 (02:53 +0000)]
1. Update the parsing logic of DHCP message in PXE driver.
2. Append null terminated character at the end of option 67. Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Dong, Guo <guo.dong@intel.com> Reviewed-by: Jin, Eric <eric.jin@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15099 6f19259b-4bc3-4df7-8a09-765794883524
Fu Siyuan [Fri, 10 Jan 2014 08:24:29 +0000 (08:24 +0000)]
Fix bug in unload function: Check if component name protocol exist, only uninstall it when it really exists. Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Tian, Feng <feng.tian@intel.com> Reviewed-by: Jin, Eric <eric.jin@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15092 6f19259b-4bc3-4df7-8a09-765794883524
Ruiyu Ni [Fri, 10 Jan 2014 01:52:24 +0000 (01:52 +0000)]
Add the feature "dmpstore -l" and "dmpstore -s".
The file format is as below:
<File> := <Variable>+
<Variable> := <Name-Size> <Data-Size> <Name> <GUID> <Attributes> <Data> <Crc32>
Each variable representation in the file has a CRC32 value which can provide a mechanism to detect the file modification.
When any CRC32 is incorrect, dmpstore rejects to load the variables from the file.
Jeff Fan [Fri, 10 Jan 2014 01:21:14 +0000 (01:21 +0000)]
Update SourceLevelDebugPkg version: 0.85->0.86
Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Hot Tian <hot.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15080 6f19259b-4bc3-4df7-8a09-765794883524
Jeff Fan [Fri, 10 Jan 2014 01:20:26 +0000 (01:20 +0000)]
Update UefiCpuPkg version: 0.2->0.3
Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Hot Tian <hot.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15079 6f19259b-4bc3-4df7-8a09-765794883524
Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Hot Tian <hot.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15078 6f19259b-4bc3-4df7-8a09-765794883524
Jeff Fan [Fri, 10 Jan 2014 01:18:20 +0000 (01:18 +0000)]
Update IntelFrameworkPkg version: 0.92->0.93
Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Hot Tian <hot.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15077 6f19259b-4bc3-4df7-8a09-765794883524
Olivier Martin [Thu, 9 Jan 2014 19:15:06 +0000 (19:15 +0000)]
MmcDxe: Perform diagnostics specifically on the requested controller
In RunDiagnostics, find the controller specified by ControllerHandle and run
diagnostics only on that controller, returning EFI_UNSUPPORTED if it isn't in
the driver's pool of managed devices.
Jaben Carsey [Thu, 9 Jan 2014 18:05:24 +0000 (18:05 +0000)]
ShellPkg: remove memory leak in file handle list
The shell was not freeing sufficient memory when freeing a list of files. The structure contained a pointer which was being left behind. I made a new function to replace the shared freeing function which frees the “Path” member of the SHELL_COMMAND_FILE_HANDLE structure.
Elvin Li [Thu, 9 Jan 2014 08:47:03 +0000 (08:47 +0000)]
If the driver does not start before, we do not disconnect driver and we must still uninstall other protocols on image handle. The original implementation of error return is not correct.
Yi Li [Thu, 9 Jan 2014 01:32:58 +0000 (01:32 +0000)]
Add processor family 2 definition in SMBIOS header file.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yi Li <yi.li@linaro.org>
Reviewed by: Star Zeng <star.zeng@intel.com>
Reviewed by: Elvin Li <elvin.li@intel.com>
Star Zeng [Tue, 7 Jan 2014 09:28:33 +0000 (09:28 +0000)]
MdePkg PcdLib: Except for SizeOfBuffer is greater than the maximum size supported, align the behavior of LibPcdSetPtr with LibPcdSetN to handle error status returned.
Let the comments to be aligned with code behavior for LibPcdSetX APIs.
Jeff Fan [Tue, 7 Jan 2014 06:24:16 +0000 (06:24 +0000)]
MtrrDebugPrintAllMtrrs() should loop until the max physical address is reached.
GetMemoryCacheTypeFromMtrrType () should return the default memory type instead of UC type for MTRR_CACHE_INVALID_TYPE.
Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15053 6f19259b-4bc3-4df7-8a09-765794883524
Laszlo Ersek [Fri, 3 Jan 2014 19:57:36 +0000 (19:57 +0000)]
OvmfPkg: QemuFwCfgLib: implement for SEC
The QemuFwCfgSecLib library instance
- is stateless,
- has no library constructor,
- is available to SEC client code,
- must be queried with QemuFwCfgIsAvailable() before use,
- is restricted to SEC in order to limit the explicit querying
requirement. (There is no current user.)
The current implementation of QemuFwCfgLib is:
- stateful
- implicitly initialized in the library constructor.
OVMF's SEC runs from read-only memory/flash. When the library is linked
into a SEC binary (which currently never happens), the
"mQemuFwCfgSupported" global variable becomes read-only, making the
library non-functional.
Extract the stateful, implicitly initialized library implementation into a
separate file, making room for a stateless, explicitly queried
implementation that's usable in SEC. Restrict the stateful implementation
to the current, non-SEC clients.