Merge branch 'paging-repr-packed' into 'master'

Use #[repr(packed)] with correct alignment for paging.

See merge request redox-os/kernel!124
This commit is contained in:
Jeremy Soller
2020-06-11 13:17:51 +00:00
2 changed files with 2 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ use crate::memory::Frame;
use super::PhysicalAddress;
/// A page table entry
#[repr(packed(8))]
pub struct Entry(u64);
bitflags! {

View File

@@ -39,6 +39,7 @@ impl HierarchicalLevel for Level2 {
type NextLevel = Level1;
}
#[repr(packed(4096))]
pub struct Table<L: TableLevel> {
entries: [Entry; ENTRY_COUNT],
level: PhantomData<L>,