FreeBSD/sys/amd64/acpica/acpi_machdep.c
/*
 * Map some memory using the crashdump map.  'offset' is an offset in
 * pages into the crashdump map to use for the start of the mapping.
 */
Map some memory using the crashdump map.  'offset' is an offset in
pages into the crashdump map to use for the start of the mapping.
Map some memory using the crashdump map . ' offset ' is an offset in pages into the crashdump map to use for the start of the mapping .
static void *
table_map(vm_paddr_t pa, int offset, vm_offset_t length)
{
	vm_offset_t va, off;
	void *data;
	off = pa & PAGE_MASK;
	length = round_page(length + off);
	pa = pa & PG_FRAME;
	va = (vm_offset_t)pmap_kenter_temporary(pa, offset) +
	    (offset * PAGE_SIZE);
	data = (void *)(va + off);
	length -= PAGE_SIZE;
	while (length > 0) {
		va += PAGE_SIZE;
		pa += PAGE_SIZE;
		length -= PAGE_SIZE;
		pmap_kenter(va, pa);
		invlpg(va);
	}
	return (data);
}
static void * table_map ( vm_paddr_t pa , int offset , vm_offset_t length ) { vm_offset_t va , off ; void * data ; off = pa & PAGE_MASK ; length = round_page ( length + off ) ; pa = pa & PG_FRAME ; va = ( vm_offset_t ) pmap_kenter_temporary ( pa , offset ) + ( offset * PAGE_SIZE ) ; data = ( void * ) ( va + off ) ; length -= PAGE_SIZE ; while ( length > 0 ) { va += PAGE_SIZE ; pa += PAGE_SIZE ; length -= PAGE_SIZE ; pmap_kenter ( va , pa ) ; invlpg ( va ) ; } return ( data ) ; }
Map some memory using the crashdump map.
Map some memory using the crashdump map .