refactor: unsafe only in adapter + libkos; forbid(unsafe_code) everywhere else; libkos Window (volatile, bounds-checked MMIO/DMA/shared mem), entry!, thread::spawn; MapRegion returns pages; kernel const-built (with_cores/install_platform); newtype addrs
This commit is contained in:
@@ -55,8 +55,8 @@ pub struct FrameTable<const N: usize = MAX_FRAMES> {
|
||||
}
|
||||
|
||||
impl<const N: usize> FrameTable<N> {
|
||||
pub fn new(base: PhysicalAddress, total: usize) -> Self {
|
||||
let total = total.min(N);
|
||||
pub const fn new(base: PhysicalAddress, total: usize) -> Self {
|
||||
let total = if total < N { total } else { N };
|
||||
Self {
|
||||
base,
|
||||
total,
|
||||
|
||||
Reference in New Issue
Block a user