-
Notifications
You must be signed in to change notification settings - Fork 133
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
fix signature of Step::steps_between implementations #513
Conversation
Oops, this obviously doesn't work on stable, duh. I'll revert back to the old implementations and fix them instead. |
…2apic releases a new version that uses the fix
6870ce6
to
3a2f7c5
Compare
Re @tsoutsman tsatke/devos@547946e:
We'll likely do a minor release (we can't do patch releases because we're pre 1.0), so you won't have to wait on x2apic to bump its dependency on x86_64. Running |
7df91fa
to
3700f6d
Compare
f14c81e
to
c5843de
Compare
A recent nightly changed the signature of Step::steps_between to match the signature of Iterator::size_hint. This patch changes our implementations to match the new signature.
Without the as_slice call, the value passed to from_ptr was &[i32; 5] which is *not* a slice.
Previously, we scaled count as a usize, not a u64. This is bad because stepping forward by 0x10_0000 is perfectly fine, yet we were always rejecting this because 0x10_0000 * 0x1000 doesn't fit in usize on 32-bit platforms. Similarly, we would fail to return a step count above or equal to 0x10_0000 because the call to <VirtAddr as Step>::steps_between would fail. Never scale usize values, instead, always scale u64 values. To make this easier to work with, this patch adds variants of the Step functions to VirtAddr that take and return u64 instead of usize. This patch also adds some regression tests.
c5843de
to
b4b6663
Compare
This should probably also be backported to the 0.14 series. Blog os depends on bootloader 0.9 which uses x86_64 0.14. |
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.
Thank you!
I'm preparing a release now. I'll work on the backport tomorrow. |
0.15.2 release PR is here: #519 |
A recent nightly changed the signature of
Step::steps_between
to match the signature ofIterator::size_hint
. This PR changes our implementations to match the new signature. This PR also fixes theStep
implementation ofPage
on 32-bit platforms.Closes #512
Cc @isaka-james @tsatke