RE: mmapping of page 0xfffff000 impossible ?

nathan.zook@amd.com
Sun, 10 Oct 1999 22:33:10 -0500


include/asm-i386/fixmap.h

"Leave one empty page between vmalloc'ed areas and the start of the fixmap,
and leave one page empty at the top of mem."

I would guess that you can't map the fixmap, either.

Nathan

> -----Original Message-----
> From: root [SMTP:koenig@tat.physik.uni-tuebingen.de]
> Sent: Sunday, October 10, 1999 9:53 PM
> To: linux-kernel-list
> Cc: Egbert Eich
> Subject: mmapping of page 0xfffff000 impossible ?
>
> why isn't it possible to mmap the very last page in 32bit address space ?
>
> strace output for 2.2.12 of the small sample program below:
> open("/dev/mem", O_RDWR) = 3
> mmap(NULL, 61440, PROT_READ, MAP_SHARED, 3, 0xffff0000) = 0x4011b000
> mmap(NULL, 61441, PROT_READ, MAP_SHARED, 3, 0xffff0000) = -1 EINVAL
> (Invalid argument)
>
> --------------------------------------------------------------------------
> -----
> #include <unistd.h>
> #include <sys/mman.h>
> #include <fcntl.h>
> main()
> {
> int f;
> void *p;
>
> f = open("/dev/mem", O_RDWR);
>
> /* this will work ... */
> p = mmap(NULL, 0xf000, PROT_READ, MAP_SHARED, f, 0xffff0000);
>
> /* this one won't :-( */
> p = mmap(NULL, 0xf001, PROT_READ, MAP_SHARED, f, 0xffff0000);
> }
> --------------------------------------------------------------------------
> -----
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.rutgers.edu
> Please read the FAQ at http://www.tux.org/lkml/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/