summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorrgrimes <rgrimes@FreeBSD.org>1993-09-29 02:37:41 +0000
committerrgrimes <rgrimes@FreeBSD.org>1993-09-29 02:37:41 +0000
commit7b6449320312d30fe1302a16e10602d020af0283 (patch)
tree0953ccd37d7b7f25e7e7ac49ff2cf65e6deb4d9a /sys/amd64
parent86d6cbf750658eb8c52561bad216206f54e9c640 (diff)
downloadFreeBSD-src-7b6449320312d30fe1302a16e10602d020af0283.zip
FreeBSD-src-7b6449320312d30fe1302a16e10602d020af0283.tar.gz
Add symbolic name for system page directory end, and change constant to
a calculation for the system page directory tables.
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/locore.S5
-rw-r--r--sys/amd64/amd64/locore.s5
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/amd64/amd64/locore.S b/sys/amd64/amd64/locore.S
index 74235a2..6f4d937 100644
--- a/sys/amd64/amd64/locore.S
+++ b/sys/amd64/amd64/locore.S
@@ -80,6 +80,7 @@
.set SYSTEM,0xFE000000 # virtual address of system start
/*note: gas copys sign bit (e.g. arithmetic >>), can't do SYSTEM>>22! */
.set SYSPDROFF,0x3F8 # Page dir index of System Base
+ .set SYSPDREND,0x3FA # Page dir index of System End
/*
@@ -343,8 +344,8 @@ ENTRY(btext)
movl %eax,(%esi) # which is where temp maps!
/* kernel pde's */
- movl $ 3,%ecx # for this many pde s,
- lea (SYSPDROFF*4)(%esi), %ebx # offset of pde for kernel
+ movl $(SYSPDREND-SYSPDROFF+1), %ecx # for this many pde s,
+ lea (SYSPDROFF*4)(%esi), %ebx # offset of pde for kernel
fillkpt
/* install a pde recursively mapping page directory as a page table! */
diff --git a/sys/amd64/amd64/locore.s b/sys/amd64/amd64/locore.s
index 74235a2..6f4d937 100644
--- a/sys/amd64/amd64/locore.s
+++ b/sys/amd64/amd64/locore.s
@@ -80,6 +80,7 @@
.set SYSTEM,0xFE000000 # virtual address of system start
/*note: gas copys sign bit (e.g. arithmetic >>), can't do SYSTEM>>22! */
.set SYSPDROFF,0x3F8 # Page dir index of System Base
+ .set SYSPDREND,0x3FA # Page dir index of System End
/*
@@ -343,8 +344,8 @@ ENTRY(btext)
movl %eax,(%esi) # which is where temp maps!
/* kernel pde's */
- movl $ 3,%ecx # for this many pde s,
- lea (SYSPDROFF*4)(%esi), %ebx # offset of pde for kernel
+ movl $(SYSPDREND-SYSPDROFF+1), %ecx # for this many pde s,
+ lea (SYSPDROFF*4)(%esi), %ebx # offset of pde for kernel
fillkpt
/* install a pde recursively mapping page directory as a page table! */
OpenPOWER on IntegriCloud