FreeBSD/sys/arm/arm/pmap-v4.c
/*
 * This is used to stuff certain critical values into the PCB where they
 * can be accessed quickly from cpu_switch() et al.
 */
This is used to stuff certain critical values into the PCB where they
can be accessed quickly from cpu_switch() et al.
This is used to stuff certain critical values into the PCB where they can be accessed quickly from cpu_switch () et al .
void
pmap_set_pcb_pagedir(pmap_t pm, struct pcb *pcb)
{
	struct l2_bucket *l2b;
	pcb->pcb_pagedir = pm->pm_l1->l1_physaddr;
	pcb->pcb_dacr = (DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL * 2)) |
	    (DOMAIN_CLIENT << (pm->pm_domain * 2));
	if (vector_page < KERNBASE) {
		pcb->pcb_pl1vec = &pm->pm_l1->l1_kva[L1_IDX(vector_page)];
		l2b = pmap_get_l2_bucket(pm, vector_page);
		pcb->pcb_l1vec = l2b->l2b_phys | L1_C_PROTO |
	 	    L1_C_DOM(pm->pm_domain) | L1_C_DOM(PMAP_DOMAIN_KERNEL);
	} else
		pcb->pcb_pl1vec = NULL;
}
void pmap_set_pcb_pagedir ( pmap_t pm , struct pcb * pcb ) { struct l2_bucket * l2b ; pcb -> pcb_pagedir = pm -> pm_l1 -> l1_physaddr ; pcb -> pcb_dacr = ( DOMAIN_CLIENT << ( PMAP_DOMAIN_KERNEL * 2 ) ) | ( DOMAIN_CLIENT << ( pm -> pm_domain * 2 ) ) ; if ( vector_page < KERNBASE ) { pcb -> pcb_pl1vec = & pm -> pm_l1 -> l1_kva [ L1_IDX ( vector_page ) ] ; l2b = pmap_get_l2_bucket ( pm , vector_page ) ; pcb -> pcb_l1vec = l2b -> l2b_phys | L1_C_PROTO | L1_C_DOM ( pm -> pm_domain ) | L1_C_DOM ( PMAP_DOMAIN_KERNEL ) ; } else pcb -> pcb_pl1vec = NULL ; }
This is used to stuff certain critical values into the PCB where they
 can be accessed quickly from cpu_switch() et al.
This is used to stuff certain critical values into the PCB where they can be accessed quickly from cpu_switch () et al .