Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

uefi: add BootPolicy type#1326

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nicholasbishop merged 6 commits intorust-osdev:mainfromphip1611:boot-policy
Aug 14, 2024
Merged

Conversation

phip1611
Copy link
Member

This was decoupled from#1297 for better review-ability.

Checklist

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

This type is used in three functions of the UEFI spec. Having an enum instead of aboolean simplifies the interface as the variants can be properly documented.
- public modules- private modules- public uses- private usesThis is consistent with other parts of the code.
This adds the new `BootPolicy` type into `LoadImageSource`.
The existing code duplication is just temporary until the old APIis deleted. Nevertheless, it is nicer to have this conversion closeto the actual type.
/// various UEFI functions that load files (typically UEFI images).
///
/// This type is not ABI compatible. On the ABI level, this is an UEFI
/// boolean.

Choose a reason for hiding this comment

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

It seems like it could be made compatible: addrepr(u8) andBootSelection = 1,ExactMatch = 0.

(As long as this type is only passed into UEFI APIs, and not read from them; in that casenewtype_enum might be better.)

Copy link
MemberAuthor

@phip1611phip1611Aug 13, 2024
edited
Loading

Choose a reason for hiding this comment

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

Do we want to postpone that decision/discussion to#1307?

Choose a reason for hiding this comment

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

As long as the type is only being passed into the API, UB shouldn't be a concern -- we'll always initializeBootPolicy correctly.

Copy link
MemberAuthor

@phip1611phip1611Aug 14, 2024
edited
Loading

Choose a reason for hiding this comment

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

Were you just adding thoughts to the discussion or do you want this doccomment to be removed before we merge it? That's not clear to me right now :)

Choose a reason for hiding this comment

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

I was thinking we should make changes before merging, but actually since there is no declaredrepr right now, it wouldn't be a breaking change to addrepr(u8) in the future I think. So let's go ahead and merge.

phip1611 reacted with thumbs up emoji
@nicholasbishopnicholasbishop added this pull request to themerge queueAug 14, 2024
Merged via the queue intorust-osdev:main with commit59790f8Aug 14, 2024
13 checks passed
@phip1611phip1611 deleted the boot-policy branchMay 1, 2025 09:14
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@nicholasbishopnicholasbishopnicholasbishop approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@phip1611@nicholasbishop

[8]ページ先頭

©2009-2025 Movatter.jp