Skip to content

Commit c0311ff

Browse files
Fix compilation errors on nightly related to asm
Add `use core::arch::asm` in a couple places, and add a temporary override of the qemu-exit dep to point at a branch with the asm fix. Partially fixes #329 (but keep it open until qemu-exit can be switched back to a normal release.)
1 parent ceb55f2 commit c0311ff

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

Cargo.toml

+2
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ members = [
4646
]
4747

4848
[patch.crates-io]
49+
# TODO: workaround for https://github.com/rust-osdev/uefi-rs/issues/329
50+
qemu-exit = { git = "https://github.com/toku-sa-n/qemu-exit.git", rev = "7279783c309423168398394682faa93ff81cdd31" }
4951
uefi-macros = { path = "uefi-macros" }
5052
uefi = { path = "." }
5153

uefi-services/src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
1919
#![no_std]
2020
#![feature(alloc_error_handler)]
21-
#![feature(asm)]
2221
#![feature(lang_items)]
2322
#![feature(panic_info_message)]
2423
#![feature(abi_efiapi)]
@@ -28,6 +27,7 @@ extern crate log;
2827
// Core types.
2928
extern crate uefi;
3029

30+
use core::arch::asm;
3131
use core::ffi::c_void;
3232
use core::ptr::NonNull;
3333

@@ -187,14 +187,14 @@ fn panic_handler(info: &core::panic::PanicInfo) -> ! {
187187
loop {
188188
unsafe {
189189
// Try to at least keep CPU from running at 100%
190-
core::arch::asm!("hlt", options(nomem, nostack));
190+
asm!("hlt", options(nomem, nostack));
191191
}
192192
}
193193
} else if #[cfg(target_arch = "aarch64")] {
194194
loop {
195195
unsafe {
196196
// Try to at least keep CPU from running at 100%
197-
core::arch::asm!("hlt 420", options(nomem, nostack));
197+
asm!("hlt 420", options(nomem, nostack));
198198
}
199199
}
200200
} else {

uefi-test-runner/src/main.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![no_std]
22
#![no_main]
3-
#![feature(asm)]
43
#![feature(abi_efiapi)]
54

65
#[macro_use]

0 commit comments

Comments
 (0)