Save L4's physical address earlier. Also, PDE_SIZE has nothing to do

here, we are just zeroing out the upper 32bits of the 64bit pointer.
This commit is contained in:
maxv 2016-05-22 10:11:55 +00:00
parent eeda8f022a
commit 7123eade7b

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore.S,v 1.92 2016/05/15 07:17:53 maxv Exp $ */
/* $NetBSD: locore.S,v 1.93 2016/05/22 10:11:55 maxv Exp $ */
/*
* Copyright-o-rama!
@ -606,6 +606,11 @@ no_NOX:
addl $PGOFSET,%esi
andl $~PGOFSET,%esi
/* We are on the BOOTSTRAP TABLES. Save L4's physical address. */
movl $RELOC(PDPpaddr),%ebp
movl %esi,(%ebp)
movl $0,4(%ebp)
/* Now, zero out the BOOTSTRAP TABLES (before filling them in). */
movl %esi,%edi
xorl %eax,%eax
@ -733,11 +738,6 @@ no_NOX:
movl %eax,(%ebx)
movl $0,(PDE_SIZE-4)(%ebx)
/* Save physical address of L4. */
movl $RELOC(PDPpaddr),%ebp
movl %esi,(%ebp)
movl $0,(PDE_SIZE-4)(%ebp)
/*
* Startup checklist:
* 1. Enable PAE (and SSE while here).