+Pte_ptr::create_page(Phys_mem_addr addr, Page::Attr attr)
+{
+ Mword r = (level < Pdir::Depth) ? (Mword)Pse_bit : 0;
+ typedef L4_fpage::Rights R;
+ typedef Page::Type T;
+ typedef Page::Kern K;
+ if (attr.rights & R::W()) r |= Writable;
+ if (attr.rights & R::U()) r |= User;
+ if (!(attr.rights & R::X())) r |= XD;
+ if (attr.type == T::Normal()) r |= Page::CACHEABLE;
+ if (attr.type == T::Buffered()) r |= Page::BUFFERED;
+ if (attr.type == T::Uncached()) r |= Page::NONCACHEABLE;
+ if (attr.kern & K::Global()) r |= global();
+ *pte = cxx::int_value<Phys_mem_addr>(addr) | r | Valid;
+}