Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CHERRY-PICK][REBASE & FF] Revert Mu Commits in Favor of edk2 Commits #280

Merged
merged 9 commits into from
Aug 29, 2024

Conversation

os-d
Copy link
Contributor

@os-d os-d commented Aug 29, 2024

Description

This PR represents the set of mu_silicon_arm_tiano changes I have upstreamed to edk2 for 202405 thus far. Some of these were taken directly to edk2 and the others were reverted in release/202405 and then cherry-picked from edk2 to ensure that scripting would catch that we need to drop the old commits when integrating next.

  • Impacts functionality?
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?

How This Was Tested

N/A.

Integration Instructions

ArmPsciResetSystemLib is removed in edk2 as well as release/202405 now. Any users need to move to ArmSmcPsciResetSystemLib.

os-d and others added 9 commits August 28, 2024 17:10
PrePeiCore and Sec directly write the firmware version to the serial port.
They relies on another component to initialize the serial port, however
in certain configurations (such as release builds that don't use a
DebugLib that initializes the serial port), the serial port can be
uninitialized at this point, causing a crash when SerialPortWrite
is called here.

This patch updates PrePeiCore and Sec to call SerialPortInitialize before
calling SerialPortWrite directly, which follows the pattern of
other serial port writes. It is accepted to call the initialization
routine multiple times, it is supposed to dump out if the serial
port is already initialized.

Signed-off-by: Oliver Smith-Denny <[email protected]>
ArmPsciResetSystemLib has been deprecated since commit
b2c55e7 in 2017. The
lib itself has not been meaningfully updated in 10 years.
This commit removes the library to complete the deprecation
process and remove confusion over which library to use for
resetting an ARM platform.

Signed-off-by: Oliver Smith-Denny <[email protected]>
The memory attribute protocol is primarily used by bootloaders
and there are many released bootloaders who use the protocol
incorrectly. It is challenging to debug these situations
because the bootloaders are generally black boxes and we
silently fail on the FW side.

This patch adds logging to some common memory attribute
protocol failures in CpuDxe.

Signed-off-by: Oliver Smith-Denny <[email protected]>
…ilure Logging

This adds logging in failure cases of SetMemoryAttributes. This
is useful generally as if an attribute update fails, code will
typically break, but is added in particular to make debugging
incorrect bootloader usage of the Memory Attribute Protocol. This
patch updates the ARM32 SetMemoryAttributes.

Signed-off-by: Oliver Smith-Denny <[email protected]>
…Failure Log

This adds logging in failure cases of SetMemoryAttributes. This
is useful generally as if an attribute update fails, code will
typically break, but is added in particular to make debugging
incorrect bootloader usage of the Memory Attribute Protocol. This
patch updates the AARCH64 UpdateRegionMapping.

Signed-off-by: Oliver Smith-Denny <[email protected]>
This reverts commit 14e357e,
as it was upstreamed in edk2.
Library previously returned EFI_SUCCESS which causes the platform to
continue initializing LCD HW. Should return EFI_NOT_FOUND.

Resolves TCBZ3351.

Signed-off-by: Oliver Smith-Denny <[email protected]>
This reverts commit f0ce81f, as
it has been upstreamed in edk2 commit
c5ab174.
PL031RealTimeClockLib will clear EFI_MEMORY_XP if a platform
has set it for MMIO memory when it does not include that bit
in its SetMemoryAttributes call. This region is not intended
to be executed from and as such the lib should explicitly set
EFI_MEMORY_XP to this region.

Signed-off-by: Oliver Smith-Denny <[email protected]>
@github-actions github-actions bot added impact:breaking-change Requires integration attention impact:non-functional Does not have a functional impact labels Aug 29, 2024
@os-d os-d requested review from makubacki, kuqin12 and apop5 August 29, 2024 00:14
@os-d os-d merged commit cc6ffba into release/202405 Aug 29, 2024
9 checks passed
@os-d os-d deleted the edk2_cps branch August 29, 2024 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact:breaking-change Requires integration attention impact:non-functional Does not have a functional impact
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants