Skip to content

Add device path node types to uefi-raw #1445

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

Merged
merged 3 commits into from
Oct 23, 2024

Conversation

nicholasbishop
Copy link
Member

These nodes are very similar to the nodes generated in the uefi crate. The main difference is in DST nodes: instead of creating a trailing DST slice, a zero-length array is created instead. This ensures that pointers are thin, and matches the API style used elsewhere in uefi-raw.

Closes #1441

Checklist

  • Sensible git history (for example, squash "typo" or "fix" commits). See the Rewriting History guide for help.
  • Update the changelog (if necessary)

Rather than using a full crate path such as
`crate::proto::device_path::hardware::BmcInterfaceType`, shorten it to just
`device_path::hardware::BmcInterfaceType`. This will make it easier to use the
same spec file for generating nodes in uefi-raw.
* Rename `gen_code_as_string` to `gen_uefi_code_as_string`
* Factor out part of that function to a new `code_to_string` function
These nodes are very similar to the nodes generated in the `uefi` crate. The
main difference is in DST nodes: instead of creating a trailing DST slice, a
zero-length array is created instead. This ensures that pointers are thin, and
matches the API style used elsewhere in `uefi-raw`.
Copy link
Member

@phip1611 phip1611 left a comment

Choose a reason for hiding this comment

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

What do we want to do with the failed coverage steps? Do we want to make them optional?

@nicholasbishop
Copy link
Member Author

They are already optional in that they won't prevent the PR from being merged. I think I'd rather they didn't mark the PR red, though I'm not yet sure how to do that.

@nicholasbishop nicholasbishop added this pull request to the merge queue Oct 23, 2024
Merged via the queue into rust-osdev:main with commit e50b09f Oct 23, 2024
15 of 17 checks passed
@nicholasbishop nicholasbishop deleted the bishop-raw-nodes-2 branch October 23, 2024 14:20
@nicholasbishop
Copy link
Member Author

@kukrimate FYI I'm hoping this covers the same stuff as #1435 -- if you have time, please let me know if this works for your use case, or if there's anything missing.

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.

Extend device path node code generation to generate types for uefi-raw
2 participants