-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Error with x86_64 #1363
Comments
Duplicate of rust-osdev/bootloader#477
|
Anyone with this issue following the blog, can replace exit qemu function temporarily with: use core::arch::asm;
pub fn exit_qemu(exit_code: QemuExitCode) {
unsafe {
asm!("out dx, eax", in("dx") 0xf4, in("eax") exit_code as u32, options(nomem, nostack, preserves_flags));
}
} and remove the x86_64 from dependencies. Code is pulled directly from x86_64 crate source code and seems to be working fine for me. This solution is only temporary and should probably be replaced sooner or lates. Should suffice at least until the end of testing chapter. |
it works now, just use 0.15.2 |
I'm still getting an error after updating to error[E0308]: mismatched types
--> /Users/x/.cargo/registry/src/index.crates.io-6f17d22bba15001f/x86_64-0.15.2/src/structures/paging/page_table.rs:357:9
|
356 | fn steps_between(start: &Self, end: &Self) -> (usize, Option<usize>) {
| ---------------------- expected `(usize, Option<usize>)` because of return type
357 | Step::steps_between(&start.0, &end.0)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(usize, Option<usize>)`, found `Option<usize>`
|
= note: expected tuple `(usize, Option<usize>)`
found enum `Option<usize>` Version error[E0053]: method `steps_between` has an incompatible type for trait
--> /Users/x/.cargo/registry/src/index.crates.io-6f17d22bba15001f/x86_64-0.14.13/src/structures/paging/page.rs:284:51
|
284 | fn steps_between(start: &Self, end: &Self) -> (usize, Option<usize>) {
| ^^^^^^^^^^^^^^^^^^^^^^ expected `Option<usize>`, found `(usize, Option<usize>)`
|
= note: expected signature `fn(&Page<_>, &Page<_>) -> Option<usize>`
found signature `fn(&Page<_>, &Page<_>) -> (usize, Option<usize>)`
help: change the output type to match the trait
|
284 | fn steps_between(start: &Self, end: &Self) -> Option<usize> { My other dependencies: bootloader = "0.9"
volatile = "0.2.6"
spin = "0.5.2"
EDIT Fixed ✅ running:
|
I'm stuck at "testing" with this error
The text was updated successfully, but these errors were encountered: