Skip to content

Feature : Convert ResourceDescriptor V1 HOBs to V2 format with cache attributes Description: - #855

Merged
HappyCoding-2025 merged 49 commits into
mainfrom
personal/rkartheek/v1
Oct 27, 2025
Merged

HappyCoding-2025 merged 49 commits into
mainfrom
personal/rkartheek/v1

Conversation

@HappyCoding-2025

@HappyCoding-2025 HappyCoding-2025 commented Oct 9, 2025 •

Copy link
Copy Markdown
Contributor

#519

Breaking Change

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

Description

  • This PR introduces breaking changes to ResourceDescriptor HOB processing.
  • By Default it is V2 processing, All V1 processing should enable the feature flag v1_resource_descriptor_support
    This feature converts the codebase from using ResourceDescriptor V1 HOBs to the newer V2 format, which includes cache attribute information for improved memory management and security.
  1. Removed support for V1 ResourceDescriptor HOBs for security and architectural improvements
  2. Updated HOB processing to only handle V2 HOBs
  3. Enhanced cache attribute extraction logic to utilize V2 HOB cache information
  4. Added documentation comments explaining the migration rationale
  5. Added ResourceDescriptorV2 import
  6. Updated test HOB list creation to use V2 format
  7. Converted all resource descriptors in test functions to V2 format
  8. Updated size calculations and copy operations for consistency
  9. Applied cache attribute assignments matching production code

Testing -
Build completed fine and was tested in QEMU.
image

How This Was Tested

CI, QEMU

Integration documentation

@HappyCoding-2025

Copy link
Copy Markdown
Contributor Author

@makubacki @joschock @Javagedes @singweeMsftGitHub - Have finished implementing the feature support for V1->V2 support - Resource Descriptor Hob.

Thanks @Javagedes for helping with the breaking change issues encountered while running in QEMU.

Rathi Kartheek added 6 commits October 9, 2025 12:52
Comment thread patina_dxe_core/src/gcd.rs Resolved
Comment thread patina_dxe_core/src/gcd.rs Resolved

@os-d os-d left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, this looks good! A couple other minor comments.

Approving, but as noted, this cannot be merged yet because platforms are still depending on producing v1 HOBs. When this is resolved (hopefully soon) we can merge it.

Comment thread patina_dxe_core/src/gcd.rs Resolved
Comment thread patina_dxe_core/src/gcd.rs Resolved
@HappyCoding-2025

Copy link
Copy Markdown
Contributor Author

Dry run is failing for this and it is not reproducible on local system at all. Local system is clean. The Git Hub Helper suggested to take care of dry run issues by this #858

@Javagedes

Copy link
Copy Markdown
Contributor

Dry run is failing for this and it is not reproducible on local system at all. Local system is clean. The Git Hub Helper suggested to take care of dry run issues by this #858

That solution is not valid. It is attempting to commit to your PR. If anything, it should be deleting the created files, not committing them. However, I suspect this occurs due to cargo vet failing its check. In that cause, the reason cargo vet failed (probably due to a crate being released) needs to be investigated and resolved.

@makubacki

Copy link
Copy Markdown
Collaborator

Dry run is failing for this and it is not reproducible on local system at all. Local system is clean. The Git Hub Helper suggested to take care of dry run issues by this #858

That solution is not valid. It is attempting to commit to your PR. If anything, it should be deleting the created files, not committing them. However, I suspect this occurs due to cargo vet failing its check. In that cause, the reason cargo vet failed (probably due to a crate being released) needs to be investigated and resolved.

@Javagedes / @HappyCoding-2025, can you summarize what the issue is?

@Javagedes

Javagedes commented Oct 10, 2025 •

Copy link
Copy Markdown
Contributor

Dry run is failing for this and it is not reproducible on local system at all. Local system is clean. The Git Hub Helper suggested to take care of dry run issues by this #858

That solution is not valid. It is attempting to commit to your PR. If anything, it should be deleting the created files, not committing them. However, I suspect this occurs due to cargo vet failing its check. In that cause, the reason cargo vet failed (probably due to a crate being released) needs to be investigated and resolved.

@Javagedes / @HappyCoding-2025, can you summarize what the issue is?

@makubacki Since this repo has many library crates, not binary crates, we do not commit a Cargo.lock file. This means that every time we run CI, we generate a new Cargo.lock file, which means the most up to date dependencies are selected. Cargo vet runs on two different types of approvals: (1) approvals for specific versions of crates or (2) blanket approvals for authors. We have an intermixing of both in our cargo vet config files.

Ultimately what this boils down to is we randomly fail the cargo vet check whenever a new version of our dependencies is published to crates.io, and that dependency only has approvals for specific versions in our cargo vet config files.

This is the 4th occurrence of this in two days.

@makubacki

Copy link
Copy Markdown
Collaborator

Ultimately what this boils down to is we randomly fail the cargo vet check whenever a new version of our dependencies is published to crates.io, and that dependency only has approvals for specific versions in our cargo vet config files.

This is the 4th occurrence of this in two days.

Immediate change is here: #860

@github-actions github-actions Bot added impact:non-functional Does not have a functional impact impact:testing Affects testing type:documentation Improvements or additions to documentation labels Oct 21, 2025
Comment thread patina_dxe_core/src/gcd.rs Resolved
Comment thread patina_dxe_core/src/gcd.rs Resolved
Comment thread patina_dxe_core/src/gcd.rs Resolved
Comment thread patina_dxe_core/src/gcd.rs Resolved
Comment thread patina_dxe_core/src/gcd.rs Resolved
Comment thread patina_dxe_core/src/gcd.rs Resolved
Comment thread patina_dxe_core/src/gcd.rs Resolved
Comment thread patina_dxe_core/src/gcd.rs Resolved
Comment thread patina_dxe_core/src/lib.rs Resolved
Comment thread patina_dxe_core/Cargo.toml Resolved
@HappyCoding-2025

Copy link
Copy Markdown
Contributor Author

@makubacki @Javagedes @joschock @os-d -
Tested on QEMU for V2, it boots fine to shell.

For V1, ad @makubacki suggested, had to revert V2 support OpenDevicePartnership/patina-qemu#43
locally on patina-qemu and with this reverted and V1 support on Qemu, It is booting fine to shell with patina supporting V1 with feature flag enabled.

image

@HappyCoding-2025

Copy link
Copy Markdown
Contributor Author

@makubacki @Javagedes @joschock - could you pls check and review when free. Once this is merged, I would like to pick up another feature.

@os-d - thanks for approving. I have taken care of all the review comments.

Comment thread patina_dxe_core/src/gcd.rs Resolved
Comment thread patina_dxe_core/src/gcd.rs Resolved
Comment thread patina_dxe_core/src/test_support.rs Resolved
Comment thread patina_dxe_core/Cargo.toml Resolved
Comment thread docs/src/patina.md Resolved
Comment thread patina_dxe_core/src/gcd.rs Resolved
Comment thread docs/src/patina.md Resolved
Comment thread patina_dxe_core/src/gcd.rs Resolved
Comment thread patina_dxe_core/src/gcd.rs Resolved
Comment thread patina_dxe_core/src/gcd.rs Resolved
Comment thread patina_dxe_core/examples/std.rs Resolved
Comment thread patina_dxe_core/examples/std.rs Resolved
@HappyCoding-2025
HappyCoding-2025 merged commit 311368b into main Oct 27, 2025
@HappyCoding-2025
HappyCoding-2025 deleted the personal/rkartheek/v1 branch October 27, 2025 22:32
@os-d

os-d commented Oct 27, 2025

Copy link
Copy Markdown
Contributor

I should have removed my approval, that was from the original implementation. There were a couple of the comments that I think needed to be addressed in a different way, I'll put up a PR.

@makubacki

makubacki commented Oct 27, 2025 •

Copy link
Copy Markdown
Collaborator

I should have removed my approval, that was from the original implementation. There were a couple of the comments that I think needed to be addressed in a different way, I'll put up a PR.

I was also typing up a comment about some remaining duplication in the docs when the PR was merged. I assume you're aware of and will address that too.

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 impact:testing Affects testing type:documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants