diff options
author | Peter Wemm <peter@FreeBSD.org> | 2003-10-10 23:35:15 +0000 |
---|---|---|
committer | Peter Wemm <peter@FreeBSD.org> | 2003-10-10 23:35:15 +0000 |
commit | c369afae3fd4e400a72085f3d9bb450274df6dab (patch) | |
tree | 32dc799513aad209dca6a20f39d4d2e6707c59a1 /sys | |
parent | ffa02b4681588c4aed4989b2363a441c92451687 (diff) | |
download | src-c369afae3fd4e400a72085f3d9bb450274df6dab.tar.gz src-c369afae3fd4e400a72085f3d9bb450274df6dab.zip |
Set page zero read/write right from the start rather than trying to
change it later on.
Notes
Notes:
svn path=/head/; revision=120992
Diffstat (limited to 'sys')
-rw-r--r-- | sys/i386/i386/locore.s | 8 | ||||
-rw-r--r-- | sys/i386/i386/machdep.c | 7 |
2 files changed, 7 insertions, 8 deletions
diff --git a/sys/i386/i386/locore.s b/sys/i386/i386/locore.s index 2579ba76e57d..9818bb54e4ab 100644 --- a/sys/i386/i386/locore.s +++ b/sys/i386/i386/locore.s @@ -786,8 +786,14 @@ no_kernend: movl %esi, R(SMPpt) /* relocated to KVM space */ #endif /* SMP */ -/* Map read-only from zero to the beginning of the kernel text section */ +/* Map page zero read-write so bios32 calls can use it */ xorl %eax, %eax + movl $PG_RW,%edx + movl $PAGE_SIZE,%ecx + fillkptphys(%edx) + +/* Map read-only from page 1 to the beginning of the kernel text section */ + movl $PAGE_MASK, %eax xorl %edx,%edx movl $R(btext),%ecx addl $PAGE_MASK,%ecx diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index f253c971f112..a0ff4a24624f 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -1504,13 +1504,6 @@ getmemsize(int first) char *cp; struct bios_smap *smap; - /* - * Change the mapping of the page at address zero from r/o to r/w - * so that vm86 can scribble on this page. Note that this page is - * not in the general free page pool. - */ - pmap_kenter(KERNBASE, 0); - hasbrokenint12 = 0; TUNABLE_INT_FETCH("hw.hasbrokenint12", &hasbrokenint12); bzero(&vmf, sizeof(vmf)); |