Skip to content
Snippets Groups Projects
Commit b90233bc authored by Jeremy Soller's avatar Jeremy Soller
Browse files

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

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

See merge request !124
parents 93e0db1a c7b207f4
No related branches found
No related tags found
1 merge request!124Use #[repr(packed)] with correct alignment for paging.
......@@ -6,6 +6,7 @@ use crate::memory::Frame;
use super::PhysicalAddress;
/// A page table entry
#[repr(packed(8))]
pub struct Entry(u64);
bitflags! {
......
......@@ -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>,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment