diff options
author | iwasaki <iwasaki@FreeBSD.org> | 2012-06-09 00:37:26 +0000 |
---|---|---|
committer | iwasaki <iwasaki@FreeBSD.org> | 2012-06-09 00:37:26 +0000 |
commit | 861bb3822c41d848219eb72645189b964249c326 (patch) | |
tree | d545096ae7b18322fd63d055e098b158b8862a01 /sys/amd64/include/pcb.h | |
parent | ccb8c35eab6b0cfd93a0939fbf01b0d77682dd41 (diff) | |
download | FreeBSD-src-861bb3822c41d848219eb72645189b964249c326.zip FreeBSD-src-861bb3822c41d848219eb72645189b964249c326.tar.gz |
Add x86/acpica/acpi_wakeup.c for amd64 and i386. Difference of
suspend/resume procedures are minimized among them.
common:
- Add global cpuset suspended_cpus to indicate APs are suspended/resumed.
- Remove acpi_waketag and acpi_wakemap from acpivar.h (no longer used).
- Add some variables in acpi_wakecode.S in order to minimize the difference
among amd64 and i386.
- Disable load_cr3() because now CR3 is restored in resumectx().
amd64:
- Add suspend/resume related members (such as MSR) in PCB.
- Modify savectx() for above new PCB members.
- Merge acpi_switch.S into cpu_switch.S as resumectx().
i386:
- Merge(and remove) suspendctx() into savectx() in order to match with
amd64 code.
Reviewed by: attilio@, acpi@
Diffstat (limited to 'sys/amd64/include/pcb.h')
-rw-r--r-- | sys/amd64/include/pcb.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/amd64/include/pcb.h b/sys/amd64/include/pcb.h index 70b2e62..619fba5 100644 --- a/sys/amd64/include/pcb.h +++ b/sys/amd64/include/pcb.h @@ -91,9 +91,20 @@ struct pcb { /* local tss, with i/o bitmap; NULL for common */ struct amd64tss *pcb_tssp; + /* model specific registers */ + register_t pcb_efer; + register_t pcb_star; + register_t pcb_lstar; + register_t pcb_cstar; + register_t pcb_sfmask; + register_t pcb_xsmask; + + /* fpu context for suspend/resume */ + void * pcb_fpususpend; + struct savefpu *pcb_save; - uint64_t pcb_pad[2]; + uint64_t pcb_pad[3]; }; #ifdef _KERNEL @@ -131,6 +142,7 @@ clear_pcb_flags(struct pcb *pcb, const u_int flags) void makectx(struct trapframe *, struct pcb *); int savectx(struct pcb *) __returns_twice; +void resumectx(struct pcb *); #endif |