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

Add the EFI_RESOURCE_ATTRIBUTE_SPECIAL_PURPOSE attribute [Rebase & FF] #856

Merged
merged 2 commits into from
May 20, 2024

Conversation

makubacki
Copy link
Member

@makubacki makubacki commented May 18, 2024

Description

Cherry-pick of the changes in #851 to release/202302.

  • Impacts functionality?
    • Functionality - Does the change ultimately impact how firmware functions?
    • Examples: Add a new library, publish a new PPI, update an algorithm, ...
  • Impacts security?
    • Security - Does the change have a direct security impact on an application,
      flow, or firmware?
    • Examples: Crypto algorithm change, buffer overflow fix, parameter
      validation improvement, ...
  • Breaking change?
    • Breaking change - Will anyone consuming this change experience a break
      in build or boot behavior?
    • Examples: Add a new library class, move a module to a different repo, call
      a function in a new library class in a pre-existing module, ...
  • Includes tests?
    • Tests - Does the change include any explicit test code?
    • Examples: Unit tests, integration tests, robot tests, ...
  • Includes documentation?
    • Documentation - Does the change contain explicit documentation additions
      outside direct code modifications (and comments)?
    • Examples: Update readme file, add feature readme file, link to documentation
      on an a separate Web page, ...

How This Was Tested

stuart_ci_build passed clean.

Manual testing using UEFI firmware on a device showed the expected behavior when HOBs are marked with EFI_RESOURCE_ATTRIBUTE_SPECIAL_PURPOSE.

Integration Instructions

N/A

sachinami and others added 2 commits May 17, 2024 20:39
Defined Encrypted and Special Purpose resource attributes as
defined in PI 1.8 Specification

Cc: Felix Polyudov <[email protected]>
Cc: Dhanaraj V <[email protected]>
Cc: Liming Gao <[email protected]>
Signed-off-by: Sachin Ganesh <[email protected]>
Reviewed-by: Liming Gao <[email protected]>
Add the EFI_RESOURCE_ATTRIBUTE_SPECIAL_PURPOSE resource attribute as per
the PI 1.8 spec. This flag is used to indicate that the memory should be
treated as special purpose memory (SPM).

Also adds GCD code that marks the SPM with the EFI_MEMORY_SP bit and
sets the GCD memory type to EfiGcdMemoryTypeSystemMemory.
@makubacki makubacki requested review from os-d and kenlautner May 18, 2024 00:42
@makubacki makubacki self-assigned this May 18, 2024
@makubacki makubacki added the type:enhancement New feature or pull request label May 18, 2024
@makubacki makubacki changed the title Cp spec mem 2302 Add the EFI_RESOURCE_ATTRIBUTE_SPECIAL_PURPOSE attribute. May 18, 2024
@codecov-commenter
Copy link

codecov-commenter commented May 18, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 1.01%. Comparing base (ec365ab) to head (3e5dd78).

Files Patch % Lines
MdeModulePkg/Core/Dxe/Gcd/Gcd.c 0.00% 4 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                 @@
##           release/202302     #856      +/-   ##
==================================================
+ Coverage            0.99%    1.01%   +0.02%     
==================================================
  Files                1278     1278              
  Lines              325492   325553      +61     
  Branches             4792     4794       +2     
==================================================
+ Hits                 3231     3316      +85     
- Misses             322180   322198      +18     
+ Partials               81       39      -42     
Flag Coverage Δ
MdeModulePkg 0.72% <0.00%> (-0.01%) ⬇️
MdePkg 3.61% <ø> (ø)
NetworkPkg 0.00% <ø> (ø)
PolicyServicePkg 30.20% <ø> (+7.42%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@makubacki makubacki changed the title Add the EFI_RESOURCE_ATTRIBUTE_SPECIAL_PURPOSE attribute. Add the EFI_RESOURCE_ATTRIBUTE_SPECIAL_PURPOSE attribute [Rebase & FF] May 20, 2024
@makubacki makubacki merged commit 2efe4b2 into microsoft:release/202302 May 20, 2024
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement New feature or pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants