summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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