summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2000-10-13 22:03:29 +0000
committerpeter <peter@FreeBSD.org>2000-10-13 22:03:29 +0000
commit8c6ec068a999f6244259ddb917ee683cf10a010b (patch)
treee3c9ee21486b5fc3e613f96e93048071c8cf8f33 /sys
parent18a6c0bbda4d273543836dac790b44245f2cc239 (diff)
downloadFreeBSD-src-8c6ec068a999f6244259ddb917ee683cf10a010b.zip
FreeBSD-src-8c6ec068a999f6244259ddb917ee683cf10a010b.tar.gz
savectx() is now used exclusively by the crash dump system. Move the
i386 specific gunk (copy %cr3 to the pcb) from the MI dumpsys() to the MD savectx().
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/cpu_switch.S3
-rw-r--r--sys/amd64/amd64/swtch.s3
-rw-r--r--sys/i386/i386/swtch.s3
-rw-r--r--sys/kern/kern_shutdown.c3
4 files changed, 9 insertions, 3 deletions
diff --git a/sys/amd64/amd64/cpu_switch.S b/sys/amd64/amd64/cpu_switch.S
index 6e325c2..b538182 100644
--- a/sys/amd64/amd64/cpu_switch.S
+++ b/sys/amd64/amd64/cpu_switch.S
@@ -381,6 +381,9 @@ ENTRY(savectx)
movl (%esp),%eax
movl %eax,PCB_EIP(%ecx)
+ movl %cr3,%eax
+ movl %eax,PCB_CR3(%ecx)
+
movl %ebx,PCB_EBX(%ecx)
movl %esp,PCB_ESP(%ecx)
movl %ebp,PCB_EBP(%ecx)
diff --git a/sys/amd64/amd64/swtch.s b/sys/amd64/amd64/swtch.s
index 6e325c2..b538182 100644
--- a/sys/amd64/amd64/swtch.s
+++ b/sys/amd64/amd64/swtch.s
@@ -381,6 +381,9 @@ ENTRY(savectx)
movl (%esp),%eax
movl %eax,PCB_EIP(%ecx)
+ movl %cr3,%eax
+ movl %eax,PCB_CR3(%ecx)
+
movl %ebx,PCB_EBX(%ecx)
movl %esp,PCB_ESP(%ecx)
movl %ebp,PCB_EBP(%ecx)
diff --git a/sys/i386/i386/swtch.s b/sys/i386/i386/swtch.s
index 6e325c2..b538182 100644
--- a/sys/i386/i386/swtch.s
+++ b/sys/i386/i386/swtch.s
@@ -381,6 +381,9 @@ ENTRY(savectx)
movl (%esp),%eax
movl %eax,PCB_EIP(%ecx)
+ movl %cr3,%eax
+ movl %eax,PCB_CR3(%ecx)
+
movl %ebx,PCB_EBX(%ecx)
movl %esp,PCB_ESP(%ecx)
movl %ebp,PCB_EBP(%ecx)
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c
index eda2620..15f2d5e 100644
--- a/sys/kern/kern_shutdown.c
+++ b/sys/kern/kern_shutdown.c
@@ -473,9 +473,6 @@ dumpsys(void)
int error;
savectx(&dumppcb);
-#ifdef __i386__
- dumppcb.pcb_cr3 = rcr3();
-#endif
if (dumping++) {
printf("Dump already in progress, bailing...\n");
return;
OpenPOWER on IntegriCloud