From cdddfdc2653d5535bd6a0120f09d8cafb4320ddc Mon Sep 17 00:00:00 2001 From: Anatol Ulrich Date: Sat, 10 Aug 2024 21:40:13 +0200 Subject: [PATCH] use ptr::addr_of --- platforms/x86_64/core/src/interrupt.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platforms/x86_64/core/src/interrupt.rs b/platforms/x86_64/core/src/interrupt.rs index 724f3979..1f0b724c 100644 --- a/platforms/x86_64/core/src/interrupt.rs +++ b/platforms/x86_64/core/src/interrupt.rs @@ -2,6 +2,7 @@ use core::{ ptr, sync::atomic::{AtomicPtr, AtomicUsize, Ordering}, }; + use hal_core::{interrupt, VAddr}; pub use hal_x86_64::interrupt::*; use hal_x86_64::{ @@ -73,7 +74,7 @@ static TSS: sync::Lazy = sync::Lazy::new(|| { let mut tss = task::StateSegment::empty(); tss.interrupt_stacks[Idt::DOUBLE_FAULT_IST_OFFSET] = unsafe { // safety: asdf - VAddr::of(&DOUBLE_FAULT_STACK).offset(DOUBLE_FAULT_STACK_SIZE as i32) + VAddr::of(ptr::addr_of!(DOUBLE_FAULT_STACK)).offset(DOUBLE_FAULT_STACK_SIZE as i32) }; tracing::debug!(?tss, "TSS initialized"); tss