Exemple #1
0
static void _npg_map_1G(offset_t addr, uint64_t attr)
{
   npg_pdpe_t *pdpe = __npg_resolve_pdpe(addr, attr);

   debug(PG_MAP, "map 1G 0x%X 0x%X\n", addr, attr);
   __npg_map_1G(pdpe, addr, attr);
}
Exemple #2
0
static void _npg_map_2M(offset_t addr, uint64_t attr)
{
   npg_pdpe_t  *pdpe = __npg_resolve_pdpe(addr, attr);
   npg_pde64_t *pde;

   debug(PG_MAP, "map 2M 0x%X 0x%X\n", addr, attr);
   if(npg_large(pdpe))
      return;

   pde = __npg_resolve_pde(pdpe, addr, attr);
   __npg_map_2M(pde, addr, attr);
}
Exemple #3
0
/*
** Intermediate services working on ALIGNED addresses
*/
static void _npg_map_512G(offset_t addr, uint64_t attr)
{
   npg_pdpe_t *pdp = __npg_resolve_pdpe(pg_512G_align(addr), attr);
   uint32_t   i;

   debug(PG_MAP, "map 512G 0x%X 0x%X\n", addr, attr);
   for(i=0 ; i<PDPE_PER_PDP ; i++)
   {
      __npg_map_1G(&pdp[i], addr, attr);
      addr += PG_1G_SIZE;
   }
}
Exemple #4
0
static void _npg_map_4K(offset_t addr, uint64_t attr)
{
   npg_pdpe_t  *pdpe = __npg_resolve_pdpe(addr, attr);
   npg_pde64_t *pde  = __npg_resolve_pde(pdpe, addr, attr);
   npg_pte64_t *pte;

   debug(PG_MAP, "map 4K 0x%X 0x%X\n", addr, attr);
   if(npg_large(pdpe) || npg_large(pde))
      return;

   pte = __npg_resolve_pte(pde, addr, attr);
   npg_set_page_entry(pte, attr, page_nr(addr));
}