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

UefiCpuPkg/DxeMpInitLib: Add a PCD to allow the AP wakeup buffer to be reserved #6107

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kenlautner
Copy link
Contributor

Description

Creates a new PCD which when set will cause the AP wakeup buffer to be allocated as a reserved type.

<For each item, place an "x" in between [ and ] if true. Example: [x] (you can also check items in GitHub UI)>

<Create the PR as a Draft PR if it is only created to run CI checks.>

<Delete lines in <> tags before creating the PR.>

  • Breaking change?
    • Breaking change - Does this PR cause a break in build or boot behavior?
    • Examples: Does it add a new library class or move a module to a different repo.
  • Impacts security?
    • Security - Does this PR have a direct security impact?
    • Examples: Crypto algorithm change or buffer overflow fix.
  • Includes tests?
    • Tests - Does this PR include any explicit test code?
    • Examples: Unit tests or integration tests.

How This Was Tested

Tested on custom Q35 image

Integration Instructions

N/A

Copy link
Member

@niruiyu niruiyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an existing path for reserved memory allocation.
Why do you need a new path?

@kenlautner
Copy link
Contributor Author

The other path for the AP wakeup buffer to be reserved requires specific confidential computing attributes to be set. This allows you to just have the AP wakeup buffer be reserved through a PCD if you need it.

@kenlautner kenlautner marked this pull request as ready for review August 29, 2024 19:57
@niruiyu
Copy link
Member

niruiyu commented Sep 2, 2024

The other path for the AP wakeup buffer to be reserved requires specific confidential computing attributes to be set. This allows you to just have the AP wakeup buffer be reserved through a PCD if you need it.

Can you unify the two paths into one?

@kenlautner
Copy link
Contributor Author

kenlautner commented Sep 4, 2024

The other path for the AP wakeup buffer to be reserved requires specific confidential computing attributes to be set. This allows you to just have the AP wakeup buffer be reserved through a PCD if you need it.

Can you unify the two paths into one?

Sure. Would this be acceptable?

if ((PcdGetBool (PcdCpuApWakeupBufferReserved)) || 
     (ConfidentialComputingGuestHas (CCAttrAmdSevEs) &&
     !ConfidentialComputingGuestHas (CCAttrAmdSevSnp))) {
    MemoryType = EfiReservedMemoryType;
 }

@kenlautner kenlautner force-pushed the allow_wakeup_buffer_reserved branch 2 times, most recently from 12b9222 to e84bc65 Compare September 12, 2024 23:25
Copy link

This PR has been automatically marked as stale because it has not had activity in 60 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@github-actions github-actions bot added the stale Due to lack of updates, this item is pending deletion. label Nov 11, 2024
…erved

Creates a new PCD which when set will cause the AP wakeup buffer to be
allocated as a reserved type.

Signed-off-by: Kenneth Lautner <[email protected]>
@kenlautner
Copy link
Contributor Author

The other path for the AP wakeup buffer to be reserved requires specific confidential computing attributes to be set. This allows you to just have the AP wakeup buffer be reserved through a PCD if you need it.

Can you unify the two paths into one?

Sure. Would this be acceptable?

if ((PcdGetBool (PcdCpuApWakeupBufferReserved)) || 
     (ConfidentialComputingGuestHas (CCAttrAmdSevEs) &&
     !ConfidentialComputingGuestHas (CCAttrAmdSevSnp))) {
    MemoryType = EfiReservedMemoryType;
 }

@niruiyu bumping the original comment.

@github-actions github-actions bot removed the stale Due to lack of updates, this item is pending deletion. label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants