Skip to content
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 asm imports on latest nightly #209

Merged
merged 5 commits into from
Dec 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 10 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ required-features = ["uefi_bin"]

[dependencies]
xmas-elf = { version = "0.6.2", optional = true }
x86_64 = { version = "0.13.2", optional = true, default-features = false, features = ["instructions", "inline_asm"] }
x86_64 = { version = "0.14.7", optional = true, default-features = false, features = ["instructions", "inline_asm"] }
usize_conversions = { version = "0.2.0", optional = true }
bit_field = { version = "0.10.0", optional = true }
log = { version = "0.4.8", optional = true }
Expand Down
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Unreleased

- Fix `asm` imports on latest nightly ([#209](https://github.com/rust-osdev/bootloader/pull/209))

# 0.10.9 – 2021-10-07

- Add support for framebuffer configuration ([#179](https://github.com/rust-osdev/bootloader/pull/179))

# 0.10.8 – 2021-08-22

- Pad UEFI FAT file length ([#180](https://github.com/rust-osdev/bootloader/pull/180))
Expand Down
2 changes: 1 addition & 1 deletion examples/test_framework/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ members = [

[dependencies]
bootloader = { path = "../.." } # replace this with a version number
x86_64 = "0.14.2"
x86_64 = "0.14.7"
uart_16550 = "0.2.14"
spin = { version = "0.9.0", features = ["lazy"] }
7 changes: 5 additions & 2 deletions src/bin/bios.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ use bootloader::{
binary::SystemInfo,
boot_info::{FrameBufferInfo, PixelFormat},
};
use core::panic::PanicInfo;
use core::slice;
use core::{
arch::{asm, global_asm},
panic::PanicInfo,
slice,
};
use usize_conversions::usize_from;
use x86_64::structures::paging::{FrameAllocator, OffsetPageTable};
use x86_64::structures::paging::{
Expand Down
2 changes: 1 addition & 1 deletion src/bin/uefi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use bootloader::{
binary::{legacy_memory_region::LegacyFrameAllocator, parsed_config::CONFIG, SystemInfo},
boot_info::FrameBufferInfo,
};
use core::{mem, panic::PanicInfo, slice};
use core::{arch::asm, mem, panic::PanicInfo, slice};
use uefi::{
prelude::{entry, Boot, Handle, ResultExt, Status, SystemTable},
proto::console::gop::{GraphicsOutput, PixelFormat},
Expand Down
1 change: 1 addition & 0 deletions src/binary/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use crate::{
boot_info::{BootInfo, FrameBuffer, FrameBufferInfo, MemoryRegion, TlsTemplate},
};
use core::{
arch::asm,
mem::{self, MaybeUninit},
slice,
};
Expand Down
10 changes: 7 additions & 3 deletions tests/runner/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::{
io::Write,
path::{Path, PathBuf},
process::Command,
process::{Command, Stdio},
};

const QEMU_ARGS: &[&str] = &[
Expand Down Expand Up @@ -28,8 +29,11 @@ fn main() {
run_cmd.args(QEMU_ARGS);
run_cmd.args(std::env::args().skip(2).collect::<Vec<_>>());

let exit_status = run_cmd.status().unwrap();
match exit_status.code() {
let child_output = run_cmd.output().unwrap();
std::io::stderr().write_all(&child_output.stderr).unwrap();
std::io::stderr().write_all(&child_output.stdout).unwrap();

match child_output.status.code() {
Some(33) => {} // success
Some(35) => panic!("Test failed"), // success
other => panic!("Test failed with unexpected exit code `{:?}`", other),
Expand Down
2 changes: 1 addition & 1 deletion tests/test_kernels/default_settings/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ edition = "2018"

[dependencies]
bootloader = { path = "../../.." }
x86_64 = { version = "0.13.2", default-features = false, features = ["instructions", "inline_asm"] }
x86_64 = { version = "0.14.7", default-features = false, features = ["instructions", "inline_asm"] }
uart_16550 = "0.2.10"
2 changes: 1 addition & 1 deletion tests/test_kernels/higher_half/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ edition = "2018"

[dependencies]
bootloader = { path = "../../.." }
x86_64 = { version = "0.13.2", default-features = false, features = ["instructions", "inline_asm"] }
x86_64 = { version = "0.14.7", default-features = false, features = ["instructions", "inline_asm"] }
uart_16550 = "0.2.10"
2 changes: 1 addition & 1 deletion tests/test_kernels/map_phys_mem/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2018"

[target.'cfg(target_arch = "x86_64")'.dependencies]
bootloader = { path = "../../.." }
x86_64 = { version = "0.13.2", default-features = false, features = ["instructions", "inline_asm"] }
x86_64 = { version = "0.14.7", default-features = false, features = ["instructions", "inline_asm"] }
uart_16550 = "0.2.10"

[package.metadata.bootloader]
Expand Down