summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_trap.c
diff options
context:
space:
mode:
authorrgrimes <rgrimes@FreeBSD.org>1993-10-15 10:34:29 +0000
committerrgrimes <rgrimes@FreeBSD.org>1993-10-15 10:34:29 +0000
commit98dbbc53998595e1b7b1ea3fef2e47953b042007 (patch)
treeb0fa090928a4f2995fc098bce238ddb8767438d9 /sys/kern/subr_trap.c
parent276a33545ed507d395c6fe135adde8b98d2d23ad (diff)
downloadFreeBSD-src-98dbbc53998595e1b7b1ea3fef2e47953b042007.zip
FreeBSD-src-98dbbc53998595e1b7b1ea3fef2e47953b042007.tar.gz
genassym.c:
Remove NKMEMCLUSTERS, it is no longer define or used. locores.s: Fix comment on PTDpde and APTDpde to be pde instead of pte Add new equation for calculating location of Sysmap Remove Bill's old #ifdef garbage for counting up memory, that stuff will never be made to work and was just cluttering up the file. Add code that places the PTD, page table pages, and kernel stack below the 640k ISA hole if there is room for it, otherwise put this stuff all at 1MB. This fixes the 28K bogusity in the boot blocks, that can now go away! Fix the caclulation of where first is to be dependent on NKPDE so that we can skip over the above mentioned areas. The 28K thing is now 44K in size due to the increase in kernel virtual memory space, but since we no longer have to worry about that this is no big deal. Use if NNPX > 0 instead of ifdef NPX for floating point code. machdep.c Change the calculation of for the buffer cache to be 20% of all memory above 2MB and add back the upper limit of 2/5's of the VM_KMEM_SIZE so that we do not eat ALL of the kernel memory space on large memory machines, note that this will not even come into effect unless you have more than 32MB. The current buffer cache limit is 6.7MB due to this caclulation. It seems that we where erroniously allocating bufpages pages for buffer_map. buffer_map is UNUSED in this implementation of the buffer cache, but since the map is referenced in several if statements a quick fix was to simply allocate 1 vm page (but no real memory) to it. pmap.h Remove rcsid, don't want them in the kernel files! Removed some cruft inside an #ifdef DEBUGx that caused compiler errors if you where compiling this for debug. Use the #defines for PD_SHIFT and PG_SHIFT in place of constants. trap.c: Remove patch kit header and rcsid, fix $Id$. Now include "npx.h" and use NNPX for controlling the floating point code. Remove a now completly invalid check for a maximum virtual address, the virtual address now ends at 0xFFFFFFFF so there is no more MAX!! (Thanks David, I completly missed that one!) vm_machdep.c Remove patch kit header and rcsid, fix $Id$. Now include "npx.h" and use NNPX for controlling the floating point code. Replace several 0xFE00000 constants with KERNBASE
Diffstat (limited to 'sys/kern/subr_trap.c')
-rw-r--r--sys/kern/subr_trap.c38
1 files changed, 5 insertions, 33 deletions
diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c
index 545fdd3..989a732 100644
--- a/sys/kern/subr_trap.c
+++ b/sys/kern/subr_trap.c
@@ -33,22 +33,15 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#)trap.c 7.4 (Berkeley) 5/13/91
- *
- * PATCHES MAGIC LEVEL PATCH THAT GOT US HERE
- * -------------------- ----- ----------------------
- * CURRENT PATCH LEVEL: 1 00137
- * -------------------- ----- ----------------------
- *
- * 08 Apr 93 Bruce Evans Several VM system fixes
- * Paul Kranenburg Add counter for vmstat
+ * from: @(#)trap.c 7.4 (Berkeley) 5/13/91
+ * $Id$
*/
-static char rcsid[] = "$Header: /a/cvs/386BSD/src/sys/i386/i386/trap.c,v 1.2 1993/07/27 10:52:20 davidg Exp $";
/*
* 386 Trap and System call handleing
*/
+#include "npx.h"
#include "machine/cpu.h"
#include "machine/psl.h"
#include "machine/reg.h"
@@ -206,10 +199,10 @@ copyfault:
goto out;
case T_DNA|T_USER:
-#ifdef NPX
+#if NNPX > 0
/* if a transparent fault (due to context switch "late") */
if (npxdna()) return;
-#endif
+#endif /* NNPX > 0 */
#ifdef MATH_EMULATE
i = math_emulate(&frame);
if (i == 0) return;
@@ -258,27 +251,6 @@ copyfault:
va = trunc_page((vm_offset_t)eva);
/*
- * Avoid even looking at pde_v(va) for high va's. va's
- * above VM_MAX_KERNEL_ADDRESS don't correspond to normal
- * PDE's (half of them correspond to APDEpde and half to
- * an unmapped kernel PDE). va's betweeen 0xFEC00000 and
- * VM_MAX_KERNEL_ADDRESS correspond to unmapped kernel PDE's
- * (XXX - why are only 3 initialized when 6 are required to
- * reach VM_MAX_KERNEL_ADDRESS?). Faulting in an unmapped
- * kernel page table would give inconsistent PTD's.
- *
- * XXX - faulting in unmapped page tables wastes a page if
- * va turns out to be invalid.
- *
- * XXX - should "kernel address space" cover the kernel page
- * tables? Might have same problem with PDEpde as with
- * APDEpde (or there may be no problem with APDEpde).
- */
- if (va > 0xFEBFF000) {
- rv = KERN_FAILURE; /* becomes SIGBUS */
- goto nogo;
- }
- /*
* It is only a kernel address space fault iff:
* 1. (type & T_USER) == 0 and
* 2. pcb_onfault not set or
OpenPOWER on IntegriCloud