Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/i386 Explain the computation



details:   https://anonhg.NetBSD.org/src/rev/95f4717e66c4
branches:  trunk
changeset: 350149:95f4717e66c4
user:      maxv <maxv%NetBSD.org@localhost>
date:      Fri Jan 06 08:36:56 2017 +0000

description:
Explain the computation

diffstat:

 sys/arch/i386/i386/locore.S |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (37 lines):

diff -r 744d1ab000a1 -r 95f4717e66c4 sys/arch/i386/i386/locore.S
--- a/sys/arch/i386/i386/locore.S       Fri Jan 06 08:32:26 2017 +0000
+++ b/sys/arch/i386/i386/locore.S       Fri Jan 06 08:36:56 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.S,v 1.143 2016/12/16 19:52:22 maxv Exp $        */
+/*     $NetBSD: locore.S,v 1.144 2017/01/06 08:36:56 maxv Exp $        */
 
 /*
  * Copyright-o-rama!
@@ -128,7 +128,7 @@
  */
 
 #include <machine/asm.h>
-__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.143 2016/12/16 19:52:22 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.144 2017/01/06 08:36:56 maxv Exp $");
 
 #include "opt_compat_oldboot.h"
 #include "opt_copy_symtab.h"
@@ -633,7 +633,7 @@
        incl    %eax            /* one more PTP for VAs stolen by bootstrap */
 1:     movl    %eax,RELOC(nkptp)+1*4
 
-       /* tablesize = (PDP_SIZE + UPAGES + nkptp) << PGSHIFT; */
+       /* tablesize = (PDP_SIZE + UPAGES + nkptp[1]) << PGSHIFT; */
        addl    $(PDP_SIZE+UPAGES),%eax
 #ifdef PAE
        incl    %eax            /* one more page for L3 */
@@ -643,7 +643,8 @@
 #endif
        movl    %eax,RELOC(tablesize)
 
-       /* Ensure that nkptp covers BOOTSTRAP TABLES. */
+       /* Ensure that nkptp[1] covers BOOTSTRAP TABLES, ie:
+        * (esi + tablesize) >> L2_SHIFT + 1 < nkptp[1] */
        addl    %esi,%eax
        addl    $~L2_FRAME,%eax
        shrl    $L2_SHIFT,%eax



Home | Main Index | Thread Index | Old Index