3 # Test scenario by Michiel Boland <michiel@boland.org>
5 # panic: pmap_remove_all: page 0xc491f000 is fictitious
7 [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1
13 sed '1,/^EOF/d' < $odir/$0 > mmap.c
14 mycc -o mmap -Wall mmap.c
22 #include <sys/types.h>
28 static const off_t map_address = 0xa0000;
29 static const size_t map_size = 0x1000;
31 static int testit(int fd)
36 p = mmap(NULL, 2 * map_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd,
38 if (p == MAP_FAILED) {
43 if (munmap(p, map_size) == -1) {
54 fd = open("/dev/mem", O_RDWR);