Age | Commit message (Collapse) | Author | Files | Lines |
|
The pointer `Instance->SfdpBasicFlash` can be used before initializing.
Example code flow:
- CreateSpiNorFlashSfdpInstance: Allocate pool for `Instance`
- InitialSpiNorFlashSfdpInstance
- ReadSfdp
- ReadSfdpHeader
- FillWriteBuffer: Dereferencing
`Instance->SfdpBasicFlash`
- ReadSfdpBasicParameterTable: Allocate pool for
`Instance->SfdpBasicFlash`
Check both `Instance` and `Instance->SfdpBasicFlash` should have
a non null value before dereferencing it. Otherwise use the defaut
value 0.
Also terminate the function if `Instance` or `WriteBuffer` is NULL.
Signed-off-by: Paddy Deng <v-paddydeng@microsoft.com>
|
|
Alignment needed to be updated to 64 because of a linker warning
when building with MSVC.
/ALIGN:64 is the minimum alignment for MSVC ARM64, which differs from
MSVC x64. This was missed when checking into edk2 because CI isn't
run for MSVC ARM64.
Signed-off-by: Vivian Nowka-Keane <vnowkakeane@linux.microsoft.com>
|
|
/WX was added as a build flag in VS2022 and now aarch64 builds
fail because of an undocumented linker warning: 4226 Alignment specified
exceeds target machine page size.
This linker warning has always occured and can be ignored.
Signed-off-by: Vivian Nowka-Keane <vnowkakeane@linux.microsoft.com>
|
|
A typical initial AP boot up will choose a CpuNumber based on the ApIndex
value that it gets back after a locked increment of the ApIndex value.
The ApIndex to APIC ID relationship is random, which is not an issue when
a broadcast INIT-SIPI is performed.
With SNP and a hypervisor that supports retrieval of the known APIC IDs,
the broadcast INIT-SIPI method is replaced by waking each individual vCPU.
In this situation, a specific VMSA is associated with a specific APIC ID.
However, random assignment of an ApIndex can break this association. This
isn't typically an issue, because the AP bring-up finishes with the AP
issuing a HLT instruction, which is intercepted by the hypervisor and the
AP won't run again until the next INIT-SIPI. However, when HLT isn't
intercepted by the hypervisor (Qemu '-overcommit cpu-pm=on' parameter),
then the HLT does not exit to the hypervisor. On the next INIT-SIPI, it
can happen that a VMRUN is executed with a different VMSA address than
was originally used, and if that VMSA is still in a VMRUN on another AP,
then the executing VMRUN will fail, crashing the guest.
To fix this issue, add a CPU exchange info field, SevSnpKnownInitApicId,
that indicates the APs are starting with an already known initial APIC ID
and set the initial APIC ID and APIC ID in the CPU_INFO_IN_HOB HOB.
During AP boot, the SevSnpKnownInitApicId field will result in the
CpuNumber being set to the index with a matching APIC ID (similar to AP
booting when the InitFlag != ApInitConfig).
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
|
|
1. Got RSDP table which installed during the FSP phase from Hob,
then pass it to the DXE AcpiTableInstance.
2. Got XSDT from RSDP and extract necessary data from XSDT,
according to the old XSDT to Initialize a new XSDT.
3. Re-install ACPI table from old XSDT to the new XSDT.
a. If Hob has DSDT table then re-install DSDT table in the new XSDT.
If not, then skip it.
b. If Hob has FACS table then re-install FACS table in the new XSDT.
If not, then skip it.
Signed-off-by: George Liao <george.liao@intel.com>
|
|
In supported() function, add the call to platform device wanted lib to
see if platform wants to support this device or not. If platform does
not support this device, Redfish Ex protocol won't be available on this
controller handle and the reset of Redfish service is not available
either.
Signed-off-by: Nickle Wang <nicklew@nvidia.com>
|
|
Introduce platform wanted device lib to RedfishPkg. This library
provide the flexibility for platform owner to device which device we like
to support Redfish service. This helps to reduce boot time and resource
on devices that is not host interface.
A null library is implemented and it accepts all devices as default
behavior.
Signed-off-by: Nickle Wang <nicklew@nvidia.com>
|
|
Patch 8d03c42d38d1 ("ArmPkg: ArmFfaLib: Update FF-A direct message
to support 18 registers") calls SMCCC_VERSION by default during
FF-A initialization even if the SMC conduit is not enabled. This
leads to sending malformed FF-A versions if the SVC conduit is
used instead.
This is observed for example when using an SPMC@EL-1 (e.g. rust-spmc)
which receives the FF-A message via an SVC call and interprets
SMCCC_VERSION as an FF-A Function ID and subsequently fails to
handle it.
Since 18-register support is only support with FF-A >= 1.2, replace
SMCCC_VERSION check with FF-A version check
Signed-off-by: Mohamed Gamal Morsy <mohamed.morsy@arm.com>
|
|
Fix #define EFI_ACPI_IORT_ROOT_COMPLEX_PASID_SUPPORTED from BIT1 to BIT0
based on IO Remapping Table Platform Design Document Issue E.f
Add macros for minimum and maximum PASID capabilites for PCI root
complex node.
Signed-off-by: Abhishek Mainkar <abmainkar@nvidia.com>
|
|
Migrate these packages to use the up-to-date BaseFdtLib instead
of the EmbeddedPkg relic that is going away.
Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
|
|
Add an explicit dependency on a previously accidentally resolved one,
tripped over while excising the EmbeddedPkg libfdt.
Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
|
|
Add wrapper for fdt_get_property_w.
Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
|
|
FdtSubnodeOffset was added to FdtLib.c, but missed out of the header.
Add the prototype to the header.
Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
|
|
Commit 8040fdbb8b8b (MdePkg: consistently use "Property" in BaseFdtLib)
got a bit carried away and confused around how libfdt contains both
getprop and get_property functions, which operate quite differently;
the getprop variant returns a pointer to the value of the property,
whereas the get_property returns a pointer to the fdt_property
structure.
Untangle this, including fixing up affected existing in-tree users, and
adding the previously not exported FdtGetProp wrapper on fdt_getprop.
Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
|
|
Fix incorrect guid in SpiBusDxe and add null checking for AllocateZeroPool in the SpiBus driver.
Signed-off-by: Jack Hsieh <v-chhsieh@microsoft.com>
|
|
Updates PCIe shell command to display previously undefined
PCIe extended capabilities.
Signed-off-by: Cian Costello <ccostello@nvidia.com>
|
|
Changes applied to appropriate PCIExpress
header files based on the specification.
Signed-off-by: Cian Costello <ccostello@nvidia.com>
|
|
Current HTTP transfer size have a default value of 2M.
This PCD change allows the platform code to change the transfer buffer size.
Based on the network bandwidth, the buffer size can be adjusted to improve performance.
Large buffer size provides better performance in high-bandwidth connections.
However, small buffer size helps to reduce packet loss in low-bandwidth scenarios.
Signed-off-by: Anbazhagan Baraneedharan <anbazhagan@hp.com>
|
|
Add code to search for gST via EFI_SYSTEM_TABLE_POINTER.
Signed-off-by: Ying-Chun Liu (PaulLiu) <paulliu@debian.org>
|
|
This change enables the emission of C preprocessor
line-markers for VFR intermediate files on the GCC and
Clang compilers.
Since the VfrCompiler now supports GCC-style preprocessor
line markers, they can be enabled by default.
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
|
|
This change adds support for GCC-style preprocessor line
directives as documented in:
https://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html
On Windows systems, one can use line-markers to see which .vfr
file was used to generate a *.i file in the Build directory.
This is useful for debugging VFR compilation failures.
With this change, the VfrCompiler will not generate compilation
errors if the *.i file contains GCC-style line-markers. Without
this change, one must disable the pre-processor's emission of
line-markers, removing the debug aid they provide.
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
|
|
Update badges for the equivalent pipelines that are now being used.
EmulatorPkg dropped some IA32 builds that are removed from the table.
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
|
|
Adjust the WSMT table size to ensure the ACPI table
header is generated correctly.
Cc: Sami Mujawar <Sami.Mujawar@arm.com>
Cc: Pierre Gondois <pierre.gondois@arm.com>
Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
|
|
Today, SetUefiImageMemoryAttributes calls directly to the
CPU Arch protocol to set EFI_MEMORY_XP or EFI_MEMORY_RO on
image memory. However, this bypasses the GCD and so the GCD
is out of sync with the actual state of memory.
This can cause an issue in the scenario where a new attribute
is being set (whether a virtual attribute or a real HW attribute),
if the GCD attributes are queried for a region and the new attribute
is appended to the existing GCD attributes (which are incorrect),
then the incorrect attributes can get applied. This can result in
setting EFI_MEMORY_XP on code sections of images and causing an
execution fault.
This patch updates SetUefiImageMemoryAttributes to call into the
GCD to update the attributes there and let the GCD code call into
the CPU Arch protocol to update the page table.
Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
|
|
The print that describes memory attributes being applied to image
memory sections is currently at info level and very noisy, being
printed multiple times per image.
Reduce this to the verbose logging level.
Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
|
|
The MsrExit() routine uses an incorrect register to check for the CAA MSR.
Instead of checking RCX, the input register for RDMSR/WRMSR that holds the
MSR value, it is checking RAX, which results in failure to detect the CAA
MSR request. The check should only be checking the lower 32-bits of the
register (ECX), too.
Change the check in MsrExit() to check the MSR value contained in ECX.
Fixes: 47001ab98914 ("Ovmfpkg/CcExitLib: Provide SVSM discovery support")
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
|
|
MessageParams1 and MessageParams2 always point to adjacent slots in the
payload buffer, so no need to keep two separate pointers.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
|
|
Sometimes the controller name is not present, add BmGetDriverName
to retrieve the driver name.(Like DriverHealthManagerDxe)
Signed-off-by: Yang Gang <yanggang@byosoft.com.cn>
|
|
Issue link:https://github.com/tianocore/edk2/issues/10925
If new HII resource is installed, show it in DeviceManager form. If HII
resource is uninstalled, remove it from DeviceManager form. So once we
enter DeviceManager form, form data should be refreshed to display
dynamically.
Cc: Li Chao <lichao@loongson.cn>
Cc: Qian Dongyan <qiandongyan@loongson.cn>
Signed-off-by: Gao Qihang <gaoqihang@loongson.cn>
|
|
Function `PrintStringAt` returns the count of Unicode character, which
is not correct for computing column offset when display empty string if
wide character is introduced. `GetStringWidth (String) / 2 - 1` is
suitable option which is compatible with wide and narrow characters.
Cc: Lichao <lichao@loongson.cn>
Cc: Qian Dongyan <qiandongyan@loongson.cn>
Signed-off-by: Gao Qihang <gaoqihang@loongson.cn>
|
|
This commit adds a hostbased test for the
Dbg2Generator library. The test is designed to
be run on a host machine against a UEFI image
that has been built with the DynamicTablesPkg.
The test exercises the Dbg2Generator library by
building an ACPI DBG2 from a list of devices.
Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
|
|
This commit adds support for building non-serial DBG2 devices
1. Add new common namespace objects:
- EArchCommonObjMemoryRangeDescriptor
- EArchCommonObjDbg2DeviceInfo
2. Enhance DBG2 table generator:
- Add support for non-serial DBG2 devices
- Support multiple debug devices
- Improve memory handling with proper allocation checks
- Add better cleanup in error paths
3. Update configuration manager:
- Add parsers for new common namespace objects
Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
|
|
Add support for X64 Build needed for HostBasedTests
Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
|
|
Print an error and stop in case VirtMmCommunicationDxe
initialization fails.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Set PcdQemuVarsRequire to TRUE for
builds with QEMU_PV_VARS enabled.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Add PcdQemuVarsRequire FeaturePcd, so firmware code can figure whenever
the given build is supposed to use the qemu uefi variable service.
Skip the emulated variable store setup in case PcdQemuVarsRequire is
true. This is needed to make secure boot work.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Add config option to use qemu variable service,
via VirtMmCommunicationDxe. Default is FALSE,
build using '-D QEMU_PV_VARS=TRUE' to enable.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Add config option to use qemu variable service,
via VirtMmCommunicationDxe. Default is FALSE,
build using '-D QEMU_PV_VARS=TRUE' to enable.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
EFI driver implementing the MmCommunication2Protocol,
but instead of trapping to MM mode (SMM on x86, el3 on arm)
trap to the host, using a virtual device.
Moving the efi variable management to the host allows to have
persistent efi variables without flash storage, and it also
allows to have secure boot support without requiring MM mode
to protect variable storage in flash.
On x86 etc/hardware-info is used for device discovery, on arm
the FDT will be consulted.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Add header file for the qemu uefi variable service device.
This defines the registers of the device and the device
tree name.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Add SIMPLE_INFO for devices which only have an mmio address.
Add HardwareInfoTypeQemuUefiVars type.
While being at it remove HardwareInfoTypeMax. Looks pointless
to have it, we never loop over the available types.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
If ArmFfaLibRxTxMap is called before permanent memory is installed the
memory allocated for the FF-A buffers will be migrated to the permanent
memory after it is installed without updating gArmFfaRxTxBufferInfoGuid
or unmapping the old buffers and mapping the updated buffers.
An ASSERT in MemoryServices at ExitBootServices is triggered when
ArmFfaDxeLib tries to call FreeAlignedPages on the original buffer
reference.
Add depex on gEfiPeiMemoryDiscoveredPpiGuid for ArmFfaPeiLib so any
Peims that use FF-A are only dispatched after permanent memory is
available.
Signed-off-by: Anubhav Raina <anubhav.raina@arm.com>
|
|
Update to the latest 24.04 image from 22.04.
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
|
|
Update to the latest 24.04 image from 22.04.
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
|
|
Update to the latest 24.04 image from 22.04.
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
|
|
Update to the latest 24.04 image from 22.04.
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
|
|
Updates the readme file for the current naming convention used
for pipeline files.
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
|
|
Details about a particular pipeline change over time - such as the
specific Linux distro or toolchain version. At the same time, the
pipeline files are directly referenced in Azure Pipelines to run the
pipeline and few users have access to change those details.
To make the files less likely to refer to outdated information over
time and reduce the need for an Azure Pipeline administrator to get
involved, the files are updated to drop specific details apart from
the host OS environment used in the pipeline.
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
|
|
Details about a particular pipeline change over time - such as the
specific Linux distro or toolchain version. At the same time, the
pipeline files are directly referenced in Azure Pipelines to run the
pipeline and few users have access to change those details.
To make the files less likely to refer to outdated information over
time and reduce the need for an Azure Pipeline administrator to get
involved, the files are updated to drop specific details apart from
the host OS environment used in the pipeline.
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
|
|
Details about a particular pipeline change over time - such as the
specific Linux distro or toolchain version. At the same time, the
pipeline files are directly referenced in Azure Pipelines to run the
pipeline and few users have access to change those details.
To make the files less likely to refer to outdated information over
time and reduce the need for an Azure Pipeline administrator to get
involved, the files are updated to drop specific details apart from
the host OS environment used in the pipeline.
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
|