Skip to content

Conversation

@LightAndLight
Copy link
Contributor

@LightAndLight LightAndLight mentioned this pull request Jun 8, 2024
@nicholasbishop
Copy link
Member

I don't think a repr is needed here, because this type is never passed directly to/from the firmware. It's used in BootServices::allocate_pages, which matches on the enum value and converts it to raw type and addr values:

let (ty, mut addr) = match ty {
AllocateType::AnyPages => (0, 0),
AllocateType::MaxAddress(addr) => (1, addr),
AllocateType::Address(addr) => (2, addr),
};

@LightAndLight
Copy link
Contributor Author

You're right. Also, the AllocateBuffer docs say that the type parameter is currently ignored.

@LightAndLight LightAndLight deleted the lightandlight/allocatetype-repr-c branch June 9, 2024 21:53
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