vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Tobias Weingartner wrote: > On Thursday, October 11, Mike Belopuhov wrote: >> --- arch/amd64/amd64/pmap.c Thu Oct 11 09:22:50 2007 +0400 >> +++ arch/amd64/amd64/pmap.c Thu Oct 11 15:34:57 2007 +0400 >> @@ -2077,10 +2077,6 @@ pmap_enter(struct pmap *pmap, vaddr_t va >> int error; >> >> #ifdef DIAGNOSTIC >> - /* sanity check: totally out of range? */ >> - if (va >= VM_MAX_KERNEL_ADDRESS) >> - panic("pmap_enter: too big"); >> - >> if (va == (vaddr_t) PDP_BASE || va == (vaddr_t) APDP_BASE) >> panic("pmap_enter: trying to map over PDP/APDP!"); >> > > Why is this necessary? > > --Toby. > This is necessary because on amd64 kernel_map is mapped under KERNBASE, that determines start of kernel's .text segment. Unfortunately we can't load LKMs under KERNBASE (this is actually due to ld' behavior, but I suspect that kernel can't jump into codo under KERNBASE, don't know for sure), so we make a special lkm_map map, where we will subsequently allocate place for LKMs. On amd64 kernel_map is located between VM_MIN_KERNEL_ADDRESS and VM_MAX_KERNEL_ADDRESS: #define VM_MIN_KERNEL_ADDRESS 0xffff800000000000 #define VM_MAX_KERNEL_ADDRESS 0xffff800100000000 but KERNBASE is 0xffffffff80000000. On the counterpart i386 has kernel_map mapped inside KERNBASE, so it hasn't such problem. -- you're never too old to rock'n'roll if you're too young to die. |