HEADS UP Re: cvs commit: src/sys/conf options.i386
src/sys/i386/i386 bios.c locore.s machdep.c mpboot.s pmap.c
vm86bios.s vm_machdep.c src/sys/i386/include _types.h bus_at386.h
jake at locore.ca
Sun Mar 30 21:23:08 PST 2003
Apparently, On Sun, Mar 30, 2003 at 05:30:37PM -0600,
Mike Silbersack said words to the effect of;
> On Sun, 30 Mar 2003, Jake Burkholder wrote:
> > I'm not sure I understand the question, you mean is it possible to use
> > separate address spaces for the kernel and userland, giving a full 4G each?
> > Yes it is possible, but it is not practical. It would be prohibitively
> > expensive and ugly. For example you would need to use task gates for
> > system calls, and copyin or copyout would need to look up the user pages
> > and map them temporarily, something like that.
> > Keep in mind that the restriction is what can be mapped. It is still
> > possible to keep around huge amounts of memory as long as its not all
> > mapped all the time. For example many device drivers just do dma and
> > don't need a virtual mapping for every chunk of memory they see, avoiding
> > mapping and unmapping it would save a lot of KVA.
> > Jake
> Yes, 4G/4G is what I was asking about. The reason I'm confused is that I
> don't understand how copies from the upper 2G of a 6G box work any better
> than copies from overlapping user memory with < 4G addresses. Are we
> using 64 pointers throughout the kernel while in PAE mode? (I didn't
> think i386 supported that, which is why I'm asking.)
PAE makes the page table entries bigger so they can hold 64 bit physical
addresses, but it does not give you more of them, pointers are still 32bit.
On x86 the kernel is mapped into each process' address space, which is why
it takes a chunk of it, and this is how copyin and copyout work, you can
just access the current process' address space directly. All copyin and
copyout do on x86 is handle page faults due to unmapped user memory, which
should not normally happen in kernel mode. If they were separate this would
be much more complicated, and entering the kernel would require switching
address space, instead of just increasing the priviledge level.
More information about the cvs-src