maint: migrate to rustc 1.94.0-nightly

This commit is contained in:
2026-01-06 14:41:08 +02:00
parent 3491e1a227
commit 57143f9d8d
325 changed files with 919 additions and 910 deletions
+4 -4
View File
@@ -1,9 +1,9 @@
use core::{arch::global_asm, cell::UnsafeCell, marker::PhantomData};
use kernel_arch_interface::{
Architecture,
mem::{KernelTableManager, PhysicalMemoryAllocator},
task::{StackBuilder, TaskContext, UserContextInfo},
Architecture,
};
use libk_mm_interface::address::PhysicalAddress;
use tock_registers::{
@@ -13,9 +13,9 @@ use tock_registers::{
use yggdrasil_abi::error::Error;
use crate::{
ArchitectureImpl, PerCpuData,
mem::{self},
registers::SATP,
ArchitectureImpl, PerCpuData,
};
pub const CONTEXT_SIZE: usize = 14 * size_of::<usize>();
@@ -86,7 +86,7 @@ impl<K: KernelTableManager, PA: PhysicalMemoryAllocator<Address = PhysicalAddres
stack.push(context.entry);
stack.push(context.argument);
setup_common_context(&mut stack, __rv64_task_enter_user as _);
setup_common_context(&mut stack, (__rv64_task_enter_user as *const ()).addr());
let sp = stack.build();
let satp = InMemoryRegister::new(0);
@@ -118,7 +118,7 @@ impl<K: KernelTableManager, PA: PhysicalMemoryAllocator<Address = PhysicalAddres
stack.push(entry as _);
stack.push(arg);
setup_common_context(&mut stack, __rv64_task_enter_kernel as _);
setup_common_context(&mut stack, (__rv64_task_enter_kernel as *const ()).addr());
let sp = stack.build();
+2 -2
View File
@@ -11,18 +11,18 @@ use core::{
use alloc::{boxed::Box, collections::btree_map::BTreeMap, vec::Vec};
use device_api::interrupt::LocalInterruptController;
use kernel_arch_interface::{
Architecture,
cpu::{CpuData, CpuImpl, IpiQueue},
sync::IrqSafeSpinlock,
task::Scheduler,
util::OneTimeInit,
Architecture,
};
use tock_registers::interfaces::{ReadWriteable, Readable};
use registers::SSTATUS;
pub mod mem;
pub use mem::{process::ProcessAddressSpaceImpl, KernelTableManagerImpl};
pub use mem::{KernelTableManagerImpl, process::ProcessAddressSpaceImpl};
pub mod context;
pub use context::TaskContextImpl;
pub mod intrinsics;
+4 -5
View File
@@ -2,12 +2,11 @@ use kernel_arch_interface::sync::IrqSafeSpinlock;
use libk_mm_interface::{address::PhysicalAddress, table::EntryLevel};
use crate::{
mem::{
auto_lower_address,
table::{PageEntry, PageTable, L1},
KERNEL_VIRT_OFFSET,
},
ArchitectureImpl,
mem::{
KERNEL_VIRT_OFFSET, auto_lower_address,
table::{L1, PageEntry, PageTable},
},
};
pub const IDENTITY_SIZE_L1: usize = 64;
+2 -2
View File
@@ -3,13 +3,13 @@ use kernel_arch_interface::mem::{
};
use libk_mm_interface::{
address::PhysicalAddress,
table::{page_index, EntryLevel, EntryLevelExt},
table::{EntryLevel, EntryLevelExt, page_index},
};
use tock_registers::interfaces::Writeable;
use yggdrasil_abi::error::Error;
use crate::{
mem::table::{PageTable, L1, L3},
mem::table::{L1, L3, PageTable},
registers::SATP,
};
+1 -1
View File
@@ -19,8 +19,8 @@ use crate::mem::{
};
use super::{
table::{DroppableRange, PageTable, L1, L2, L3},
KernelTableManagerImpl, USER_BOUNDARY,
table::{DroppableRange, L1, L2, L3, PageTable},
};
pub struct ProcessAddressSpaceImpl<TA: TableAllocator> {
+4 -4
View File
@@ -10,8 +10,8 @@ use libk_mm_interface::{
pointer::{PhysicalRef, PhysicalRefMut},
process::PageAttributeUpdate,
table::{
page_index, EntryLevel, EntryLevelDrop, NextPageTable, NonTerminalEntryLevel,
TableAllocator,
EntryLevel, EntryLevelDrop, NextPageTable, NonTerminalEntryLevel, TableAllocator,
page_index,
},
};
use yggdrasil_abi::error::Error;
@@ -109,8 +109,8 @@ impl<L: EntryLevel> PageTable<L> {
}
}
pub fn new_zeroed<'a, TA: TableAllocator>(
) -> Result<PhysicalRefMut<'a, PageTable<L>, KernelTableManagerImpl>, Error> {
pub fn new_zeroed<'a, TA: TableAllocator>()
-> Result<PhysicalRefMut<'a, PageTable<L>, KernelTableManagerImpl>, Error> {
let physical = TA::allocate_page_table()?;
let mut table =
unsafe { PhysicalRefMut::<'a, Self, KernelTableManagerImpl>::map(physical) };
+1 -5
View File
@@ -78,11 +78,7 @@ unsafe fn sbi_do_call(
);
}
let a0 = a0 as i64;
if a0 == 0 {
Ok(a1)
} else {
Err(a0.into())
}
if a0 == 0 { Ok(a1) } else { Err(a0.into()) }
}
pub fn sbi_hart_start(hart_id: u64, start_addr: u64, opaque: u64) -> Result<(), Error> {