| Age | Commit message (Collapse) | Author | Files | Lines |
|
The mailbox property interface expects every tag's value buffer to be
padded to a 32-bit boundary so the following tags and the end tag stay
aligned.
Commit 61708392042b ("RPiFirmwareDxe: Fix and consolidate incorrect
pragma pack blocks") wrapped every mailbox tag struct in a module-wide
#pragma pack(1). RPI_FW_MAC_ADDR_TAG then no longer rounds up to a
multiple of 4: the packed tag is 10 bytes (6-byte MAC address + 4-byte
"UINT32 Padding"), which leaves the trailing end tag misaligned. Recent
VideoCore firmware rejects such a request with a 0x80000001 partial
response, so RpiFirmwareGetMacAddress () fails and callers fall back to
an all-zero MAC address.
None of these tag structs actually need packing - they are all built
from UINT32 fields and are laid out identically packed or not. The sole
exception was RPI_FW_SERIAL_TAG's UINT64, which would otherwise be
padded to an 8-byte boundary inside the tag body. Drop the #pragma pack
block entirely, express the serial as UINT32[2] (read back with CopyMem)
and remove the now-unneeded RPI_FW_MAC_ADDR_TAG padding member; the
enclosing command struct's natural alignment keeps the end tag aligned.
Signed-off-by: valtzu <valtzu@gmail.com>
|
|
Add GPTLib to the affected RaspberryPi platform DSC files to
resolve build failures caused by the introduction of the
new GPTLib dependency in edk2.
Signed-off-by: Thamballi Sreelalitha <sreelali@qti.qualcomm.com>
|
|
Update platform ACPI table sources to include AcpiHelperMacros.h for the
ACPI helper macros that moved out of AcpiLib.h.
For files that only use the helper macros, replace the AcpiLib.h include
with AcpiHelperMacros.h. For SbsaQemuAcpiDxe, keep AcpiLib.h because the
driver also uses AcpiLib APIs, and add AcpiHelperMacros.h for the moved
macro definitions.
This change depends on the companion edk2 change:
"EmbeddedPkg,MdeModulePkg,DynamicTablesPkg: Move ACPI helper macros"
Tested:
Affected platform DSCs: AARCH64 GCC NOOPT
SGI affected platforms passed; other affected platforms fail due to
missing local assets/dependencies unrelated to the include migration.
Signed-off-by: Varshit Pandya <varshit.pandya@arm.com>
|
|
Replace ArmPkg DefaultExceptionHandlerLib and ArmExceptionLib
with UefiCpuPkg/CpuExceptionHandlerLib across AArch64 platforms.
Signed-off-by: Vishal Oliyil Kunnil <vishalo@qti.qualcomm.com>
|
|
This reverts commit 29203d6aa8d2197be9401dd96c112ccb320708d0.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
|
|
edk2 is moving ArmLib to MdePkg. Update DSCs accordingly.
Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
[ardb: add missed instance in N1SdpPlatform.dsc]
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
|
|
|
|
Add support for the Raspberry Pi variant Zero 2 W, which is based on the
same SoC as the Raspberry Pi 3. This is needed in order to correctly
identify the SoC peripherals such as the MMC/SD controller.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
|
|
As edk2 introduce PeilessSecMeasureLib [0],
PeilessSec requires to link PeilessSecMeasureLib.
Set the default PeilessSecMeasureLib with PeilessSecMeasureNullLib.
Link: https://github.com/tianocore/edk2/pull/11344 [0]
Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
|
|
Use SMBIOS_CACHE_SIZE, SMBIOS_CACHE_SIZE2 and AArch64 PROCESSOR_ID_DATA
structures.
Signed-off-by: Sarah Walker <Sarah.Walker2@arm.com>
|
|
Since the edk2 commit b1096651d808
("ArmPlatformPkg: Capture TransferList information for PeilessSec")
PeilessSec requires the ArmTransferListLib.
To resolve build failure, add ArmTransferListLib.
Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
|
|
The Universal Graphics Adapter (UGA) is a graphic abstraction.
The UGA I/O and Draw protocols are deprecated since UEFI 2.0 was
introduced. Cf. the UEFI spec v2.9:
"Appendix L - EFI 1.10 Protocol Changes and Deprecation List"
section L.2 "Deprecated Protocols"
Remove the UGA support.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
Commit 7516ab83ff67 ("Update ArmMmuLib library path") did what it says,
but some packages in the tree have their own modules making use of
ArmMmuLib, without previously having declared a dependency on UefiCpuPkg.
Add the missing dependencies.
Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
|
|
ArmMmuLib is moved from ArmPkg to UefiCpuPkg, update ArmMmuLib path for
all platforms to adapt EDK2 change.
Signed-off-by: Ajan Zhong <ajan.zhong@newfw.com>
|
|
EmbeddedPkg FdtLib is getting deleted. Migrate RPI to MdePkg BaseFdtLib
which is the replacement.
Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
|
|
Signed-off-by: Alexander Ziaee <ziaee@google.com>
|
|
HTTP boot has been broken on RPi ever since the PixieFail CVE fixes were
applied, as the TCP driver now relies on Hash2Dxe (and the EFI RNG
protocol) to produce cryptographically strong sequence numbers.
Add the missing driver to restore HTTP boot functionality.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
|
|
Map individual users of obsolete EmbeddedPkg FdtLib to that version
for now - they will need converting.
Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
|
|
Since UEFI requires AArch64 to support FP/NEON, the Pcd to decide whether
to enable (or disable trapping of) those instructions has changed to be
ARM-only in edk2, and the enabling to be unconditional for AArch64.
So drop the explicit setting to 1 for all AArch64 platforms, and move the
setting to a .ARM section for the one dual-architecture platform in the
tree (Juno)
Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
|
|
This commit adapts to the new locations of the SMC, SVC, and FFA
libraries following their relocation from ArmPkg.
The changes are based on the updates introduced in the following PR:
https://github.com/tianocore/edk2/pull/10929.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
|
|
This commit adapts to the new locations of the SMC, SVC, and FFA
libraries following their relocation from ArmPkg.
The changes are based on the updates introduced in the following PR:
https://github.com/tianocore/edk2/pull/10929.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
|
|
ArmDisassemblerLib is no longer used, and will be removed from edk2. So
drop all references to it across the repo.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
|
|
These platforms all set PcdRelocateVectorTable to its default value of
FALSE.
Since the Pcd is getting dropped in edk2, skip the setting here.
Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
|
|
Switch to the v2 specific GIC DXE driver, which is the only thing this
platform implements. While at it, drop references to GIC related
libraries and PCDs that no longer exist.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
|
|
Commit 991b802e8f70 ("Platform/RPi4: Allocate more space for UEFI
image") reorganized the Flash Device (FD) layout to accommodate the
growing size of the firmware, and reserved some additional space to be
used for ACPI PCC channel data in the future.
This additional allocation was added at the end of the FD, after the
varstore image, while the mapping code in PlatformLib expects the
varstore related regions to live at the very end.
The upshot is that the varstore region in the FD is no longer mapped for
runtime access, resulting in runtime service crashes when attempting to
access the varstore from under the OS.
Fix this in PlatformLib, by extending the varstore memory region to
include everything that comes after it.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
|
|
edk2 PR https://github.com/tianocore/edk2/pull/6433 cleans up the
null stack cookie implementation, no longer requiring DSCs to
manually add the null stack cookie lib to Sec modules.
This commit changes all DSCs in edk2-platforms to drop the manual
adding.
Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
|
|
edk2 commit ae83c6b7fd83a5906e016a32027c1bcd792a624e updates the 'null'
variants of the DebugLib macros (used when MDEPKG_NDEBUG is defined) so
that they explicitly discard their parameters using `if (FALSE)` code
blocks. These are understood as marking the contained code as referenced
but unused by all supported compilers. This avoids the need for additional
MDEPKG_NDEBUG dependent code in c files, to conditionally hide static
methods or functions which are only used in debug macros. Now, such code
can and must be removed.
This commit updates the relevant MDEPKG_NDEBUG code in c files throughout
edk2-platforms (there are only some 20 instances).
We also fix a couple of cases where the wrapped variables had incorrectly
not been marked STATIC.
Since the RELEASE builds of all platforms which used this kind of code
break after the above-mentioned edk2 commit, it is considered preferable
to have one single cross-platform commit to edk2-platforms which resolves
this, rarther than spreading the fix across multiple commits.
Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
|
|
pack blocks
This fixes serial number on RPi4 – it is now the actual serial number instead of MAC address.
Signed-off-by: valtzu <valtzu@gmail.com>
|
|
edk2 PR https://github.com/tianocore/edk2/pull/5957 removed
BaseStackCheckLib and added StackCheckLibNull (amongst others).
This PR updates all dscs/dsc.incs to remove the old BaseStackCheckLib
and if appropriate, add StackCheckLibNull to LibraryClasses.common.SEC
or to specific SEC libs. For all other component types, MdeLibs.dsc.inc
links them to StackCheckLibNull.
This does all dscs at once as it is formulaic and fixes build breaks.
Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
|
|
The Pi's UEFI image was sized without thought for much future growth,
and its become apparent that its largely outgrown the allocated space
when various debug options or edk2 features are enabled. Since these
images tend to exist on disks which are usually in the GB+ ranges
doubling the size of the RPI_EFI.fd image shouldn't be a problem.
This change must be accompanied by build edk2-non-osi changes to TFA
which update the RPI3_PRELOADED_DTB_BASE=0x3e0000 and config.txt
changes as documented in the README being patched.
Since we are adjusting the image size, lets also increase the DTB
reservation to 128K and reserve a 64k block for future PCC channel
data structures that are shared between TFA and ACPI as well
immediately before the DTB.
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
|
|
__FUNCTION__ is a pre-standard extension that gcc and Visual C++ among
others support, while __func__ was standardized in C99.
Since it's more standard, replace __FUNCTION__ with __func__ throughout
edk2-platforms.
Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
|
|
Replaced the deprecated EFI_D_{INFO,WARN,ERROR,VERBOSE} usage with
DEBUG_{INFO,WARN,ERROR,VERBOSE}.
Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
|
|
edk2 PR https://github.com/tianocore/edk2/pull/6048 moves
ArmCompilerIntrinsicsLib to MdePkg and into MdeLibs.dsc.inc.
This patch drops all of the references to the ArmPkg location as
these platforms are now getting it from MdeLibs.dsc.inc. This is
done in one shot as it is a breaking change and has no functional
impact.
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
|
|
edk2 PR https://github.com/tianocore/edk2/pull/6048 moves
AsmMacroIoLib.h and AsmMacroIoLibV8.h to MdePkg and renames
them to Arm/AsmMacroLib.h and AArch64/AsmMacroLib.h, respectively.
This updates all edk2-platforms in one go, as this is a breaking
change and no functional change.
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
|
|
PrePi has been superseded by PeilessSec.inf, which is a more common
naming for the SEC module, aligned with other architectures. No
functional changes intended.
Switch all users to PeilessSec.inf so the old implementation can be
retired from EDK2. No ArmPlatformStackLib resolution is needed in this
case, so drop those as well.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Jeremy Linton <jeremy.linton@arm.com>
Tested-by: Jeremy Linton <jeremy.linton@arm.com>
|
|
Remove all the ArmPlatformLib routines that are no longer used now that
the MPCore SEC drivers have been retired. The prototypes will be removed
from the ArmPlatformLib library class in a subsequent EDK2 change.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
Reviewed-by: Nhi Pham <nhi@os.amperecomputing.com>
Tested-by: Nhi Pham <nhi@os.amperecomputing.com>
|
|
Drop the now unused EfiResetSystemLib implementation, which has been
superseded by the generic one from EDK2.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
|
|
Drop the reference to the special reset runtime DXE driver in
EmbeddedPkg, and move to the one in MdeModulePkg shared between all
architectures. This version implements reset notifications, allowing us
to retire the home grown version of that functionality in a subsequent
patch.
Add depexes to the components that rely on the reset notification
protocols to ensure that they are not dispatched before those protocols
are made available by the reset runtime DXE driver.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
|
|
Duplicate the logic that is triggered on a system reset into the
platform boot manager driver, and hook it up to the EDK2 platform
specific reset notification driver. This is supported by generic EDK2
code in MdeModulePkg, allowing us to retire the platform-specific
EfiResetSystemLib implementation in a subsequent patch. This is needed
because this library class and its only user ResetRuntimeDxe in
EmbeddedPkg are deprecated and are going to be removed.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
|
|
In addition to setting up the home grown reset notification, register
with the generic EFI protocol that does the same. This event is
triggered from the reset runtime implemented in MdeModulePkg, to which
we will be switching the RPi platforms in a subsequent patch.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
|
|
The DumpVars() routine is called directly and via an event notification
callback, and the latter therefore defines the function's prototype,
even though the arguments are unused.
We will introduce another callback into this logic, but via a reset
notifier, which has yet another prototype. So to keep things tidy, drop
the formal parameters from DumpVars() and invoke it via a helper
function that discards the arguments when called as a event notification
callback. We will do the same for the reset notification once that
functionality gets added.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
|
|
The VarBlockServiceDxe driver needs to be dispatched before the common
VariableRuntimeDxe, but we are currently relying on FDF order and lack
of transitive dependencies for this, which is fragile, and will break
once we move to the generic reset runtime.
So use the existing helper library for this, which can be plugged into
the generic variable drivers, and force them to depex on a GUID that can
be installed as a NULL protocol in VarBlockServiceDxe.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
|
|
Get rid of spurious LF-only line endings.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
|
|
Mark RAM ranges as write/execute protectable in the GCD memory map. This
is needed to avoid issues with NonCoherentDmaLib in EmbeddedPkg, which
will fail if it does not manage to set the EFI_MEMORY_XP attribute on
the allocated DMA buffers.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
|
|
This patch adds checks if Boot Discovery Policy has been changed. Only
in that case EfiBootManagerRefreshAllBootOption() should be called.
Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
|
|
Since we are updating the DT memory map and telling it how
we have configured the PCIe, there isn't a reason for moving the
MMIO window. In fact this appears to fix OpenBSD+DT as well as
it makes the linux XHCI reset sequence happier.
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
|
|
It's a complete tossup whether removing the mailbox call after we have
set up the XHCI works for a given kernel+distro in DT mode. So lets give
users who want to try DT the option of flipping this on/off.
Users that don't want to have to deal with DT, can use ACPI.
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
|
|
Lets allow some of these options to change when the
system is in ACPI+DT mode. Plus the fan temp should
be disabled when ACPI isn't enabled.
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
|
|
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it
needs to be added to most platforms.
Signed-off-by: Taylor Beebe <taylor.d.beebe@gmail.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Jeremy Linton <jeremy.linton@arm.com>
|
|
acpiview complains:
ERROR: On Arm based systems, all cache properties must be provided in
the cache type structure. Missing 'Write Policy Valid' flag.
ACPI specification says:
> Set to 1 if the write policy attribute described is valid. A value
> of 0 indicates that, where possible, processor architecture specific
> discovery mechanisms should be used to ascertain the value of this
> attribute.
Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
|