From ef58943ab3d439a34a1586ccd4abc8c5266f7d01 Mon Sep 17 00:00:00 2001 From: kib Date: Fri, 28 Mar 2014 15:38:38 +0000 Subject: MFC r263475: Fix two issues with /dev/mem access on amd64, both causing kernel page faults. First, for accesses to direct map region should check for the limit by which direct map is instantiated. Second, for accesses to the kernel map, use a new thread private flag TDP_DEVMEMIO, which instructs vm_fault() to return error when fault happens on the MAP_ENTRY_NOFAULT entry, instead of panicing. MFC r263498: Add change forgotten in r263475. Make dmaplimit accessible outside amd64/pmap.c. --- sys/amd64/include/pmap.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/amd64/include') diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index 01de629..1b5f6a0 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -368,6 +368,7 @@ extern vm_paddr_t phys_avail[]; extern vm_paddr_t dump_avail[]; extern vm_offset_t virtual_avail; extern vm_offset_t virtual_end; +extern vm_paddr_t dmaplimit; #define pmap_page_get_memattr(m) ((vm_memattr_t)(m)->md.pat_mode) #define pmap_page_is_write_mapped(m) (((m)->aflags & PGA_WRITEABLE) != 0) -- cgit v1.1