summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2012-06-13 21:03:01 +0000
committerjkim <jkim@FreeBSD.org>2012-06-13 21:03:01 +0000
commitd1d32ebbe590b2417e7c158f2cf2265006ea68bf (patch)
tree0452601b7184f9c8ae2440c7f2697d9835717e9d /sys/i386
parent2531f6420107e5e3ef5dbf077ad00baec45d02b3 (diff)
downloadFreeBSD-src-d1d32ebbe590b2417e7c158f2cf2265006ea68bf.zip
FreeBSD-src-d1d32ebbe590b2417e7c158f2cf2265006ea68bf.tar.gz
- Fix resumectx() prototypes to reflect reality.
- For i386, simply jump to resumectx() with PCB in %ecx. - Fix a style(9) nit while I am here.
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/acpica/acpi_wakecode.S6
-rw-r--r--sys/i386/i386/swtch.s5
-rw-r--r--sys/i386/include/pcb.h2
3 files changed, 5 insertions, 8 deletions
diff --git a/sys/i386/acpica/acpi_wakecode.S b/sys/i386/acpica/acpi_wakecode.S
index 5f66ef1..88f32d7 100644
--- a/sys/i386/acpica/acpi_wakecode.S
+++ b/sys/i386/acpica/acpi_wakecode.S
@@ -142,8 +142,8 @@ wakeup_32:
mov %ax, %ds
/* Get PCB and return address. */
- movl wakeup_pcb - wakeup_start(%ebx), %esi
- movl wakeup_ret - wakeup_start(%ebx), %edi
+ movl wakeup_pcb - wakeup_start(%ebx), %ecx
+ movl wakeup_ret - wakeup_start(%ebx), %edx
/* Restore CR4 and CR3. */
movl wakeup_cr4 - wakeup_start(%ebx), %eax
@@ -166,7 +166,7 @@ wakeup_32:
jmp 1f
1:
/* Jump to return address. */
- jmp *%edi
+ jmp *%edx
.data
diff --git a/sys/i386/i386/swtch.s b/sys/i386/i386/swtch.s
index adf554a..80aa6c4 100644
--- a/sys/i386/i386/swtch.s
+++ b/sys/i386/i386/swtch.s
@@ -460,13 +460,10 @@ ENTRY(savectx)
END(savectx)
/*
- * resumectx(pcb in %esi)
+ * resumectx(pcb) __fastcall
* Resuming processor state from pcb.
*/
ENTRY(resumectx)
- /* Fetch PCB. */
- movl %esi,%ecx
-
/* Restore GDT. */
lgdt PCB_GDT(%ecx)
diff --git a/sys/i386/include/pcb.h b/sys/i386/include/pcb.h
index 108ecfe..9cefed1 100644
--- a/sys/i386/include/pcb.h
+++ b/sys/i386/include/pcb.h
@@ -97,7 +97,7 @@ struct trapframe;
void makectx(struct trapframe *, struct pcb *);
int savectx(struct pcb *) __returns_twice;
-void resumectx(struct pcb *);
+void resumectx(struct pcb *) __fastcall;
#endif
#endif /* _I386_PCB_H_ */
OpenPOWER on IntegriCloud