-
-
Notifications
You must be signed in to change notification settings - Fork 70
acpi: Allow Madt and Mcfg fields to be accessed without allocator_api #161
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
Conversation
acpi/src/madt.rs
Outdated
global_system_interrupt_base: u32, | ||
pub header: EntryHeader, | ||
pub io_apic_id: u8, | ||
pub _reserved: u8, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might not be necessary to expose reserved fields unless users should be allowed to construct these structs themselves. If the latter is the case, then maybe a new
function could be provided to get a default instance and then the user may assign to relevant fields. My suggestion sounds like it might overcomplicate things, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I don't feel that reserved fields need to be exposed, and just clutter the documentation.
I don't foresee an instance where people will be constructing tables themselves from outside the library tbh, so that shouldn't be included in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. I updated the MR to not make the _reserved
fields public.
ffb1b87
to
eaa0a1a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GicdEntry::gic_version
should also be exposed, right?
In the absence of the allocator_api feature being enabled and/or other situtations it is useful to be able to access ACPI table fields directly. This also allows the low-level use of the tables, especially when higher-level processing is not yet implemented. Thus, this revision makes them and the Mcfg 'entries()' method public.
eaa0a1a
to
0b5d2f6
Compare
Yes, I somehow missed that before. Now fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, and apologies for the delay in getting this merged!
In the absence of the allocator_api feature being enabled and/or other situtations it is useful to be able to access ACPI table fields directly.
This also allows the low-level use of the tables, especially when higher-level processing is not yet implemented.
Thus, this revision makes them and the Mcfg 'entries()' method public.