summaryrefslogtreecommitdiff
path: root/i386
diff options
context:
space:
mode:
Diffstat (limited to 'i386')
-rw-r--r--i386/i386/i386asm.sym2
-rw-r--r--i386/i386/locore.S5
2 files changed, 5 insertions, 2 deletions
diff --git a/i386/i386/i386asm.sym b/i386/i386/i386asm.sym
index b1670e8..39dbcaf 100644
--- a/i386/i386/i386asm.sym
+++ b/i386/i386/i386asm.sym
@@ -86,6 +86,8 @@ offset i386_interrupt_state i efl
offset i386_tss tss esp0
offset i386_tss tss ss0
+offset machine_slot sub_type cpu_type
+
expr I386_PGBYTES NBPG
expr VM_MIN_ADDRESS
expr VM_MAX_ADDRESS
diff --git a/i386/i386/locore.S b/i386/i386/locore.S
index 77ca05b..29c7791 100644
--- a/i386/i386/locore.S
+++ b/i386/i386/locore.S
@@ -1290,11 +1290,12 @@ Entry(copyoutmsg)
/*
* Check whether user address space is writable
- * before writing to it - hardware is broken.
- * XXX only have to do this on 386's.
+ * before writing to it - i386 hardware is broken.
*/
copyout_retry:
#if !defined(MACH_HYP) && !PAE
+ cmpl $3,machine_slot+SUB_TYPE_CPU_TYPE
+ ja 0f /* Skip on i486 and above */
movl %cr3,%ecx /* point to page directory */
movl %edi,%eax /* get page directory bits */
shrl $(PDESHIFT),%eax /* from user address */