PERFORCE change 181877 for review
Bjoern A. Zeeb
bz at FreeBSD.org
Thu Aug 5 17:40:42 UTC 2010
http://p4web.freebsd.org/@@181877?ac=10
Change 181877 by bz at bz_dumpster on 2010/08/05 17:40:08
IFC @181876
Affected files ...
.. //depot/projects/soc2009/anchie_send/src/sys/amd64/acpica/acpi_switch.S#5 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/amd64/acpica/acpi_wakecode.S#4 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/amd64/acpica/acpi_wakeup.c#6 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/amd64/amd64/cpu_switch.S#6 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/amd64/amd64/genassym.c#5 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/amd64/amd64/initcpu.c#4 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/amd64/amd64/mp_machdep.c#7 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/amd64/include/pcb.h#4 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/boot/common/loader.8#2 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/cam/cam.c#5 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/cam/scsi/scsi_target.c#5 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/compat/freebsd32/freebsd32_misc.c#8 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/conf/NOTES#11 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/dev/acpica/acpi_pcib.c#3 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/dev/acpica/acpi_pcib_acpi.c#5 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/dev/acpica/acpi_pcib_pci.c#3 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/dev/acpica/acpi_pcibvar.h#2 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/dev/coretemp/coretemp.c#4 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/dev/drm/drm_pciids.h#6 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/dev/pci/pcib_private.h#2 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/dev/sound/pci/hda/hdac.c#8 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/fs/nfs/nfs_var.h#8 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/fs/nfsclient/nfs_clstate.c#8 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/fs/nfsclient/nfs_clsubs.c#7 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/fs/nfsclient/nfs_clvnops.c#11 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/geom/part/g_part.c#8 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/geom/sched/g_sched.c#2 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/i386/i386/initcpu.c#4 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/kern/vfs_subr.c#10 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/mips/include/param.h#8 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/mips/include/vmparam.h#7 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/mips/mips/exception.S#9 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/mips/mips/genassym.c#5 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/mips/mips/pmap.c#12 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/mips/mips/tick.c#7 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/mips/rmi/on_chip.c#4 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/mips/sibyte/sb_machdep.c#6 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/net/rtsock.c#33 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h#2 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/netinet/sctp_output.c#12 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/nfsclient/nfs_node.c#4 integrate
.. //depot/projects/soc2009/anchie_send/src/sys/nfsclient/nfs_vnops.c#8 integrate
Differences ...
==== //depot/projects/soc2009/anchie_send/src/sys/amd64/acpica/acpi_switch.S#5 (text+ko) ====
@@ -1,7 +1,7 @@
/*-
* Copyright (c) 2001 Takanori Watanabe <takawata at jp.freebsd.org>
* Copyright (c) 2001 Mitsuru IWASAKI <iwasaki at jp.freebsd.org>
- * Copyright (c) 2008-2009 Jung-uk Kim <jkim at FreeBSD.org>
+ * Copyright (c) 2008-2010 Jung-uk Kim <jkim at FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/amd64/acpica/acpi_switch.S,v 1.7 2010/07/29 16:41:21 jkim Exp $
+ * $FreeBSD: src/sys/amd64/acpica/acpi_switch.S,v 1.10 2010/08/03 16:08:58 jkim Exp $
*/
#include <machine/asmacros.h>
@@ -34,14 +34,11 @@
#include "acpi_wakedata.h"
#include "assym.s"
-#define WAKEUP_CTX(member) wakeup_ ## member - wakeup_ctx(%rdi)
-#define WAKEUP_PCB(member) PCB_ ## member(%r11)
-#define WAKEUP_XPCB(member) XPCB_ ## member(%r11)
+#define WAKEUP_CTX(member) wakeup_ ## member - wakeup_ctx(%rsi)
ENTRY(acpi_restorecpu)
/* Switch to KPML4phys. */
- movq %rsi, %rax
- movq %rax, %cr3
+ movq %rdi, %cr3
/* Restore GDT. */
lgdt WAKEUP_CTX(gdt)
@@ -49,7 +46,7 @@
1:
/* Fetch PCB. */
- movq WAKEUP_CTX(xpcb), %r11
+ movq WAKEUP_CTX(pcb), %rdi
/* Force kernel segment registers. */
movl $KDSEL, %eax
@@ -62,16 +59,16 @@
movw %ax, %gs
movl $MSR_FSBASE, %ecx
- movl WAKEUP_PCB(FSBASE), %eax
- movl 4 + WAKEUP_PCB(FSBASE), %edx
+ movl PCB_FSBASE(%rdi), %eax
+ movl 4 + PCB_FSBASE(%rdi), %edx
wrmsr
movl $MSR_GSBASE, %ecx
- movl WAKEUP_PCB(GSBASE), %eax
- movl 4 + WAKEUP_PCB(GSBASE), %edx
+ movl PCB_GSBASE(%rdi), %eax
+ movl 4 + PCB_GSBASE(%rdi), %edx
wrmsr
movl $MSR_KGSBASE, %ecx
- movl WAKEUP_XPCB(KGSBASE), %eax
- movl 4 + WAKEUP_XPCB(KGSBASE), %edx
+ movl PCB_KGSBASE(%rdi), %eax
+ movl 4 + PCB_KGSBASE(%rdi), %edx
wrmsr
/* Restore EFER. */
@@ -103,19 +100,20 @@
wrmsr
/* Restore CR0 except for FPU mode. */
- movq WAKEUP_XPCB(CR0), %rax
+ movq PCB_CR0(%rdi), %rax
+ movq %rax, %rcx
andq $~(CR0_EM | CR0_TS), %rax
movq %rax, %cr0
/* Restore CR2 and CR4. */
- movq WAKEUP_XPCB(CR2), %rax
+ movq PCB_CR2(%rdi), %rax
movq %rax, %cr2
- movq WAKEUP_XPCB(CR4), %rax
+ movq PCB_CR4(%rdi), %rax
movq %rax, %cr4
/* Restore descriptor tables. */
- lidt WAKEUP_XPCB(IDT)
- lldt WAKEUP_XPCB(LDT)
+ lidt PCB_IDT(%rdi)
+ lldt PCB_LDT(%rdi)
#define SDT_SYSTSS 9
#define SDT_SYSBSY 11
@@ -123,48 +121,44 @@
/* Clear "task busy" bit and reload TR. */
movq PCPU(TSS), %rax
andb $(~SDT_SYSBSY | SDT_SYSTSS), 5(%rax)
- movw WAKEUP_XPCB(TR), %ax
+ movw PCB_TR(%rdi), %ax
ltr %ax
#undef SDT_SYSTSS
#undef SDT_SYSBSY
/* Restore other callee saved registers. */
- movq WAKEUP_PCB(R15), %r15
- movq WAKEUP_PCB(R14), %r14
- movq WAKEUP_PCB(R13), %r13
- movq WAKEUP_PCB(R12), %r12
- movq WAKEUP_PCB(RBP), %rbp
- movq WAKEUP_PCB(RSP), %rsp
- movq WAKEUP_PCB(RBX), %rbx
+ movq PCB_R15(%rdi), %r15
+ movq PCB_R14(%rdi), %r14
+ movq PCB_R13(%rdi), %r13
+ movq PCB_R12(%rdi), %r12
+ movq PCB_RBP(%rdi), %rbp
+ movq PCB_RSP(%rdi), %rsp
+ movq PCB_RBX(%rdi), %rbx
/* Restore debug registers. */
- movq WAKEUP_PCB(DR0), %rax
+ movq PCB_DR0(%rdi), %rax
movq %rax, %dr0
- movq WAKEUP_PCB(DR1), %rax
+ movq PCB_DR1(%rdi), %rax
movq %rax, %dr1
- movq WAKEUP_PCB(DR2), %rax
+ movq PCB_DR2(%rdi), %rax
movq %rax, %dr2
- movq WAKEUP_PCB(DR3), %rax
+ movq PCB_DR3(%rdi), %rax
movq %rax, %dr3
- movq WAKEUP_PCB(DR6), %rax
+ movq PCB_DR6(%rdi), %rax
movq %rax, %dr6
- movq WAKEUP_PCB(DR7), %rax
+ movq PCB_DR7(%rdi), %rax
movq %rax, %dr7
/* Restore FPU state. */
- movq PCPU(FPCURTHREAD), %rax
- testq %rax, %rax
- je 1f
- fxrstor WAKEUP_PCB(USERFPU)
-1:
+ fninit
+ fxrstor PCB_USERFPU(%rdi)
- /* Restore CR0 with FPU mode. */
- movq WAKEUP_XPCB(CR0), %rax
- movq %rax, %cr0
+ /* Reload CR0. */
+ movq %rcx, %cr0
/* Restore return address. */
- movq WAKEUP_PCB(RIP), %rax
+ movq PCB_RIP(%rdi), %rax
movq %rax, (%rsp)
/* Indicate the CPU is resumed. */
@@ -173,19 +167,3 @@
ret
END(acpi_restorecpu)
-
-ENTRY(acpi_savecpu)
- /* Fetch XPCB and save CPU context. */
- movq %rdi, %r10
- call savectx2
- movq %r10, %r11
-
- /* Patch caller's return address and stack pointer. */
- movq (%rsp), %rax
- movq %rax, WAKEUP_PCB(RIP)
- movq %rsp, %rax
- movq %rax, WAKEUP_PCB(RSP)
-
- movl $1, %eax
- ret
-END(acpi_savecpu)
==== //depot/projects/soc2009/anchie_send/src/sys/amd64/acpica/acpi_wakecode.S#4 (text+ko) ====
@@ -2,7 +2,7 @@
* Copyright (c) 2001 Takanori Watanabe <takawata at jp.freebsd.org>
* Copyright (c) 2001 Mitsuru IWASAKI <iwasaki at jp.freebsd.org>
* Copyright (c) 2003 Peter Wemm
- * Copyright (c) 2008-2009 Jung-uk Kim <jkim at FreeBSD.org>
+ * Copyright (c) 2008-2010 Jung-uk Kim <jkim at FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/amd64/acpica/acpi_wakecode.S,v 1.6 2010/07/12 21:08:35 jkim Exp $
+ * $FreeBSD: src/sys/amd64/acpica/acpi_wakecode.S,v 1.8 2010/08/03 15:32:08 jkim Exp $
*/
#include <machine/asmacros.h>
@@ -210,8 +210,8 @@
mov %ax, %ds
/* Restore arguments and return. */
- movq wakeup_ctx - wakeup_start(%rbx), %rdi
- movq wakeup_kpml4 - wakeup_start(%rbx), %rsi
+ movq wakeup_kpml4 - wakeup_start(%rbx), %rdi
+ movq wakeup_ctx - wakeup_start(%rbx), %rsi
movq wakeup_retaddr - wakeup_start(%rbx), %rax
jmp *%rax
@@ -265,7 +265,7 @@
wakeup_ctx:
.quad 0
-wakeup_xpcb:
+wakeup_pcb:
.quad 0
wakeup_gdt:
.word 0
==== //depot/projects/soc2009/anchie_send/src/sys/amd64/acpica/acpi_wakeup.c#6 (text+ko) ====
@@ -2,7 +2,7 @@
* Copyright (c) 2001 Takanori Watanabe <takawata at jp.freebsd.org>
* Copyright (c) 2001 Mitsuru IWASAKI <iwasaki at jp.freebsd.org>
* Copyright (c) 2003 Peter Wemm
- * Copyright (c) 2008-2009 Jung-uk Kim <jkim at FreeBSD.org>
+ * Copyright (c) 2008-2010 Jung-uk Kim <jkim at FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/acpica/acpi_wakeup.c,v 1.32 2010/07/26 19:53:09 jkim Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/acpica/acpi_wakeup.c,v 1.33 2010/08/02 17:35:00 jkim Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -66,13 +66,12 @@
extern int acpi_reset_video;
#ifdef SMP
-extern struct xpcb **stopxpcbs;
+extern struct pcb **susppcbs;
#else
-static struct xpcb **stopxpcbs;
+static struct pcb **susppcbs;
#endif
-int acpi_restorecpu(struct xpcb *, vm_offset_t);
-int acpi_savecpu(struct xpcb *);
+int acpi_restorecpu(struct pcb *, vm_offset_t);
static void *acpi_alloc_wakeup_handler(void);
static void acpi_stop_beep(void *);
@@ -105,10 +104,10 @@
int apic_id = cpu_apic_ids[cpu];
int ms;
- WAKECODE_FIXUP(wakeup_xpcb, struct xpcb *, stopxpcbs[cpu]);
- WAKECODE_FIXUP(wakeup_gdt, uint16_t, stopxpcbs[cpu]->xpcb_gdt.rd_limit);
+ WAKECODE_FIXUP(wakeup_pcb, struct pcb *, susppcbs[cpu]);
+ WAKECODE_FIXUP(wakeup_gdt, uint16_t, susppcbs[cpu]->pcb_gdt.rd_limit);
WAKECODE_FIXUP(wakeup_gdt + 2, uint64_t,
- stopxpcbs[cpu]->xpcb_gdt.rd_base);
+ susppcbs[cpu]->pcb_gdt.rd_base);
WAKECODE_FIXUP(wakeup_cpu, int, cpu);
/* do an INIT IPI: assert RESET */
@@ -245,7 +244,7 @@
cr3 = rcr3();
load_cr3(KPML4phys);
- if (acpi_savecpu(stopxpcbs[0])) {
+ if (savectx(susppcbs[0])) {
#ifdef SMP
if (wakeup_cpus != 0 && suspend_cpus(wakeup_cpus) == 0) {
device_printf(sc->acpi_dev,
@@ -258,11 +257,11 @@
WAKECODE_FIXUP(resume_beep, uint8_t, (acpi_resume_beep != 0));
WAKECODE_FIXUP(reset_video, uint8_t, (acpi_reset_video != 0));
- WAKECODE_FIXUP(wakeup_xpcb, struct xpcb *, stopxpcbs[0]);
+ WAKECODE_FIXUP(wakeup_pcb, struct pcb *, susppcbs[0]);
WAKECODE_FIXUP(wakeup_gdt, uint16_t,
- stopxpcbs[0]->xpcb_gdt.rd_limit);
+ susppcbs[0]->pcb_gdt.rd_limit);
WAKECODE_FIXUP(wakeup_gdt + 2, uint64_t,
- stopxpcbs[0]->xpcb_gdt.rd_base);
+ susppcbs[0]->pcb_gdt.rd_base);
WAKECODE_FIXUP(wakeup_cpu, int, 0);
/* Call ACPICA to enter the desired sleep state */
@@ -332,9 +331,9 @@
printf("%s: can't alloc wake memory\n", __func__);
return (NULL);
}
- stopxpcbs = malloc(mp_ncpus * sizeof(*stopxpcbs), M_DEVBUF, M_WAITOK);
+ susppcbs = malloc(mp_ncpus * sizeof(*susppcbs), M_DEVBUF, M_WAITOK);
for (i = 0; i < mp_ncpus; i++)
- stopxpcbs[i] = malloc(sizeof(**stopxpcbs), M_DEVBUF, M_WAITOK);
+ susppcbs[i] = malloc(sizeof(**susppcbs), M_DEVBUF, M_WAITOK);
return (wakeaddr);
}
==== //depot/projects/soc2009/anchie_send/src/sys/amd64/amd64/cpu_switch.S#6 (text+ko) ====
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/amd64/amd64/cpu_switch.S,v 1.175 2010/07/29 16:49:20 jkim Exp $
+ * $FreeBSD: src/sys/amd64/amd64/cpu_switch.S,v 1.177 2010/08/03 15:32:08 jkim Exp $
*/
#include <machine/asmacros.h>
@@ -302,128 +302,65 @@
* Update pcb, saving current processor state.
*/
ENTRY(savectx)
- /* Fetch PCB. */
- movq %rdi,%rcx
-
/* Save caller's return address. */
movq (%rsp),%rax
- movq %rax,PCB_RIP(%rcx)
+ movq %rax,PCB_RIP(%rdi)
- movq %cr3,%rax
- movq %rax,PCB_CR3(%rcx)
+ movq %rbx,PCB_RBX(%rdi)
+ movq %rsp,PCB_RSP(%rdi)
+ movq %rbp,PCB_RBP(%rdi)
+ movq %r12,PCB_R12(%rdi)
+ movq %r13,PCB_R13(%rdi)
+ movq %r14,PCB_R14(%rdi)
+ movq %r15,PCB_R15(%rdi)
- movq %rbx,PCB_RBX(%rcx)
- movq %rsp,PCB_RSP(%rcx)
- movq %rbp,PCB_RBP(%rcx)
- movq %r12,PCB_R12(%rcx)
- movq %r13,PCB_R13(%rcx)
- movq %r14,PCB_R14(%rcx)
- movq %r15,PCB_R15(%rcx)
-
- /*
- * If fpcurthread == NULL, then the fpu h/w state is irrelevant and the
- * state had better already be in the pcb. This is true for forks
- * but not for dumps (the old book-keeping with FP flags in the pcb
- * always lost for dumps because the dump pcb has 0 flags).
- *
- * If fpcurthread != NULL, then we have to save the fpu h/w state to
- * fpcurthread's pcb and copy it to the requested pcb, or save to the
- * requested pcb and reload. Copying is easier because we would
- * have to handle h/w bugs for reloading. We used to lose the
- * parent's fpu state for forks by forgetting to reload.
- */
- pushfq
- cli
- movq PCPU(FPCURTHREAD),%rax
- testq %rax,%rax
- je 1f
-
- movq TD_PCB(%rax),%rdi
- movq PCB_SAVEFPU(%rdi),%rdi
- clts
- fxsave (%rdi)
- smsw %ax
- orb $CR0_TS,%al
- lmsw %ax
-
- movq $PCB_SAVEFPU_SIZE,%rdx /* arg 3 */
- leaq PCB_USERFPU(%rcx),%rsi /* arg 2 */
- /* arg 1 (%rdi) already loaded */
- call bcopy
-1:
- popfq
-
- ret
-END(savectx)
-
-/*
- * savectx2(xpcb)
- * Update xpcb, saving current processor state.
- */
-ENTRY(savectx2)
- /* Fetch XPCB. */
- movq %rdi,%r8
-
- /* Save caller's return address. */
- movq (%rsp),%rax
- movq %rax,PCB_RIP(%r8)
-
- movq %rbx,PCB_RBX(%r8)
- movq %rsp,PCB_RSP(%r8)
- movq %rbp,PCB_RBP(%r8)
- movq %r12,PCB_R12(%r8)
- movq %r13,PCB_R13(%r8)
- movq %r14,PCB_R14(%r8)
- movq %r15,PCB_R15(%r8)
-
- movq %cr0,%rax
- movq %rax,XPCB_CR0(%r8)
+ movq %cr0,%rsi
+ movq %rsi,PCB_CR0(%rdi)
movq %cr2,%rax
- movq %rax,XPCB_CR2(%r8)
+ movq %rax,PCB_CR2(%rdi)
+ movq %cr3,%rax
+ movq %rax,PCB_CR3(%rdi)
movq %cr4,%rax
- movq %rax,XPCB_CR4(%r8)
+ movq %rax,PCB_CR4(%rdi)
movq %dr0,%rax
- movq %rax,PCB_DR0(%r8)
+ movq %rax,PCB_DR0(%rdi)
movq %dr1,%rax
- movq %rax,PCB_DR1(%r8)
+ movq %rax,PCB_DR1(%rdi)
movq %dr2,%rax
- movq %rax,PCB_DR2(%r8)
+ movq %rax,PCB_DR2(%rdi)
movq %dr3,%rax
- movq %rax,PCB_DR3(%r8)
+ movq %rax,PCB_DR3(%rdi)
movq %dr6,%rax
- movq %rax,PCB_DR6(%r8)
+ movq %rax,PCB_DR6(%rdi)
movq %dr7,%rax
- movq %rax,PCB_DR7(%r8)
-
- sgdt XPCB_GDT(%r8)
- sidt XPCB_IDT(%r8)
- sldt XPCB_LDT(%r8)
- str XPCB_TR(%r8)
+ movq %rax,PCB_DR7(%rdi)
movl $MSR_FSBASE,%ecx
rdmsr
shlq $32,%rdx
leaq (%rax,%rdx),%rax
- movq %rax,PCB_FSBASE(%r8)
+ movq %rax,PCB_FSBASE(%rdi)
movl $MSR_GSBASE,%ecx
rdmsr
shlq $32,%rdx
leaq (%rax,%rdx),%rax
- movq %rax,PCB_GSBASE(%r8)
+ movq %rax,PCB_GSBASE(%rdi)
movl $MSR_KGSBASE,%ecx
rdmsr
shlq $32,%rdx
leaq (%rax,%rdx),%rax
- movq %rax,XPCB_KGSBASE(%r8)
+ movq %rax,PCB_KGSBASE(%rdi)
+
+ sgdt PCB_GDT(%rdi)
+ sidt PCB_IDT(%rdi)
+ sldt PCB_LDT(%rdi)
+ str PCB_TR(%rdi)
- movq PCPU(FPCURTHREAD),%rax
- testq %rax,%rax
- je 1f
clts
- fxsave PCB_USERFPU(%r8)
-1:
+ fxsave PCB_USERFPU(%rdi)
+ movq %rsi,%cr0 /* The previous %cr0 is saved in %rsi. */
- movl $1, %eax
+ movl $1,%eax
ret
-END(savectx2)
+END(savectx)
==== //depot/projects/soc2009/anchie_send/src/sys/amd64/amd64/genassym.c#5 (text+ko) ====
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.179 2010/07/29 16:41:21 jkim Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.181 2010/08/02 18:12:30 jkim Exp $");
#include "opt_compat.h"
#include "opt_hwpmc_hooks.h"
@@ -123,7 +123,7 @@
ASSYM(DMAP_MIN_ADDRESS, DMAP_MIN_ADDRESS);
ASSYM(DMAP_MAX_ADDRESS, DMAP_MAX_ADDRESS);
ASSYM(MCLBYTES, MCLBYTES);
-ASSYM(PCB_CR3, offsetof(struct pcb, pcb_cr3));
+
ASSYM(PCB_R15, offsetof(struct pcb, pcb_r15));
ASSYM(PCB_R14, offsetof(struct pcb, pcb_r14));
ASSYM(PCB_R13, offsetof(struct pcb, pcb_r13));
@@ -134,40 +134,35 @@
ASSYM(PCB_RIP, offsetof(struct pcb, pcb_rip));
ASSYM(PCB_FSBASE, offsetof(struct pcb, pcb_fsbase));
ASSYM(PCB_GSBASE, offsetof(struct pcb, pcb_gsbase));
+ASSYM(PCB_KGSBASE, offsetof(struct pcb, pcb_kgsbase));
+ASSYM(PCB_CR0, offsetof(struct pcb, pcb_cr0));
+ASSYM(PCB_CR2, offsetof(struct pcb, pcb_cr2));
+ASSYM(PCB_CR3, offsetof(struct pcb, pcb_cr3));
+ASSYM(PCB_CR4, offsetof(struct pcb, pcb_cr4));
ASSYM(PCB_DR0, offsetof(struct pcb, pcb_dr0));
ASSYM(PCB_DR1, offsetof(struct pcb, pcb_dr1));
ASSYM(PCB_DR2, offsetof(struct pcb, pcb_dr2));
ASSYM(PCB_DR3, offsetof(struct pcb, pcb_dr3));
ASSYM(PCB_DR6, offsetof(struct pcb, pcb_dr6));
ASSYM(PCB_DR7, offsetof(struct pcb, pcb_dr7));
-ASSYM(PCB_USERFPU, offsetof(struct pcb, pcb_user_save));
+ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags));
+ASSYM(PCB_ONFAULT, offsetof(struct pcb, pcb_onfault));
+ASSYM(PCB_GS32SD, offsetof(struct pcb, pcb_gs32sd));
ASSYM(PCB_TSSP, offsetof(struct pcb, pcb_tssp));
+ASSYM(PCB_SAVEFPU, offsetof(struct pcb, pcb_save));
+ASSYM(PCB_SAVEFPU_SIZE, sizeof(struct savefpu));
ASSYM(PCB_FULL_IRET, offsetof(struct pcb, pcb_full_iret));
+ASSYM(PCB_GDT, offsetof(struct pcb, pcb_gdt));
+ASSYM(PCB_IDT, offsetof(struct pcb, pcb_idt));
+ASSYM(PCB_LDT, offsetof(struct pcb, pcb_ldt));
+ASSYM(PCB_TR, offsetof(struct pcb, pcb_tr));
+ASSYM(PCB_USERFPU, offsetof(struct pcb, pcb_user_save));
+ASSYM(PCB_SIZE, sizeof(struct pcb));
ASSYM(PCB_DBREGS, PCB_DBREGS);
ASSYM(PCB_32BIT, PCB_32BIT);
ASSYM(PCB_GS32BIT, PCB_GS32BIT);
ASSYM(PCB_FULLCTX, PCB_FULLCTX);
-ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags));
-ASSYM(PCB_SAVEFPU, offsetof(struct pcb, pcb_save));
-ASSYM(PCB_SAVEFPU_SIZE, sizeof(struct savefpu));
-ASSYM(PCB_ONFAULT, offsetof(struct pcb, pcb_onfault));
-ASSYM(PCB_GS32SD, offsetof(struct pcb, pcb_gs32sd));
-
-ASSYM(PCB_SIZE, sizeof(struct pcb));
-
-ASSYM(XPCB_PCB, offsetof(struct xpcb, xpcb_pcb));
-ASSYM(XPCB_CR0, offsetof(struct xpcb, xpcb_cr0));
-ASSYM(XPCB_CR2, offsetof(struct xpcb, xpcb_cr2));
-ASSYM(XPCB_CR4, offsetof(struct xpcb, xpcb_cr4));
-ASSYM(XPCB_KGSBASE, offsetof(struct xpcb, xpcb_kgsbase));
-ASSYM(XPCB_GDT, offsetof(struct xpcb, xpcb_gdt));
-ASSYM(XPCB_IDT, offsetof(struct xpcb, xpcb_idt));
-ASSYM(XPCB_LDT, offsetof(struct xpcb, xpcb_ldt));
-ASSYM(XPCB_TR, offsetof(struct xpcb, xpcb_tr));
-
-ASSYM(XPCB_SIZE, sizeof(struct xpcb));
-
ASSYM(COMMON_TSS_RSP0, offsetof(struct amd64tss, tss_rsp0));
ASSYM(TF_R15, offsetof(struct trapframe, tf_r15));
==== //depot/projects/soc2009/anchie_send/src/sys/amd64/amd64/initcpu.c#4 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/initcpu.c,v 1.59 2009/11/13 13:07:01 kib Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/initcpu.c,v 1.60 2010/08/02 17:01:23 jhb Exp $");
#include "opt_cpu.h"
@@ -177,17 +177,17 @@
if ((cpu_feature & CPUID_CLFSH) != 0)
cpu_clflush_line_size = ((cpu_procinfo >> 8) & 0xff) * 8;
/*
- * XXXKIB: (temporary) hack to work around traps generated when
- * CLFLUSHing APIC registers window.
+ * XXXKIB: (temporary) hack to work around traps generated
+ * when CLFLUSHing APIC register window under virtualization
+ * environments. These environments tend to disable the
+ * CPUID_SS feature even though the native CPU supports it.
*/
TUNABLE_INT_FETCH("hw.clflush_disable", &hw_clflush_disable);
- if (cpu_vendor_id == CPU_VENDOR_INTEL && !(cpu_feature & CPUID_SS) &&
- hw_clflush_disable == -1)
+ if (vm_guest != VM_GUEST_NO && hw_clflush_disable == -1)
cpu_feature &= ~CPUID_CLFSH;
/*
* Allow to disable CLFLUSH feature manually by
- * hw.clflush_disable tunable. This may help Xen guest on some AMD
- * CPUs.
+ * hw.clflush_disable tunable.
*/
if (hw_clflush_disable == 1)
cpu_feature &= ~CPUID_CLFSH;
==== //depot/projects/soc2009/anchie_send/src/sys/amd64/amd64/mp_machdep.c#7 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.320 2010/07/26 19:53:09 jkim Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.321 2010/08/02 17:35:00 jkim Exp $");
#include "opt_cpu.h"
#include "opt_kstack_pages.h"
@@ -100,7 +100,7 @@
void *dpcpu;
struct pcb stoppcbs[MAXCPU];
-struct xpcb **stopxpcbs = NULL;
+struct pcb **susppcbs = NULL;
/* Variables needed for SMP tlb shootdown. */
vm_offset_t smp_tlb_addr1;
@@ -1336,7 +1336,7 @@
rf = intr_disable();
cr3 = rcr3();
- if (savectx2(stopxpcbs[cpu])) {
+ if (savectx(susppcbs[cpu])) {
wbinvd();
atomic_set_int(&stopped_cpus, cpumask);
}
==== //depot/projects/soc2009/anchie_send/src/sys/amd64/include/pcb.h#4 (text+ko) ====
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)pcb.h 5.10 (Berkeley) 5/12/91
- * $FreeBSD: src/sys/amd64/include/pcb.h,v 1.73 2010/06/05 15:59:59 kib Exp $
+ * $FreeBSD: src/sys/amd64/include/pcb.h,v 1.75 2010/08/02 18:12:30 jkim Exp $
*/
#ifndef _AMD64_PCB_H_
@@ -44,7 +44,6 @@
#include <machine/segments.h>
struct pcb {
- register_t pcb_cr3;
register_t pcb_r15;
register_t pcb_r14;
register_t pcb_r13;
@@ -55,6 +54,18 @@
register_t pcb_rip;
register_t pcb_fsbase;
register_t pcb_gsbase;
+ register_t pcb_kgsbase;
+ register_t pcb_cr0;
+ register_t pcb_cr2;
+ register_t pcb_cr3;
+ register_t pcb_cr4;
+ register_t pcb_dr0;
+ register_t pcb_dr1;
+ register_t pcb_dr2;
+ register_t pcb_dr3;
+ register_t pcb_dr6;
+ register_t pcb_dr7;
+
u_long pcb_flags;
#define PCB_DBREGS 0x02 /* process using debug registers */
#define PCB_KERNFPU 0x04 /* kernel uses fpu */
@@ -64,44 +75,30 @@
#define PCB_32BIT 0x40 /* process has 32 bit context (segs etc) */
#define PCB_FULLCTX 0x80 /* full context restore on sysret */
- u_int64_t pcb_dr0;
- u_int64_t pcb_dr1;
- u_int64_t pcb_dr2;
- u_int64_t pcb_dr3;
- u_int64_t pcb_dr6;
- u_int64_t pcb_dr7;
-
- struct savefpu pcb_user_save;
uint16_t pcb_initial_fpucw;
caddr_t pcb_onfault; /* copyin/out fault recovery */
/* 32-bit segment descriptor */
- struct user_segment_descriptor pcb_gs32sd;
+ struct user_segment_descriptor pcb_gs32sd;
/* local tss, with i/o bitmap; NULL for common */
struct amd64tss *pcb_tssp;
struct savefpu *pcb_save;
char pcb_full_iret;
-};
+
+ struct region_descriptor pcb_gdt;
+ struct region_descriptor pcb_idt;
+ struct region_descriptor pcb_ldt;
+ uint16_t pcb_tr;
-struct xpcb {
- struct pcb xpcb_pcb;
- register_t xpcb_cr0;
- register_t xpcb_cr2;
- register_t xpcb_cr4;
- register_t xpcb_kgsbase;
- struct region_descriptor xpcb_gdt;
- struct region_descriptor xpcb_idt;
- struct region_descriptor xpcb_ldt;
- uint16_t xpcb_tr;
+ struct savefpu pcb_user_save;
};
#ifdef _KERNEL
struct trapframe;
void makectx(struct trapframe *, struct pcb *);
-void savectx(struct pcb *);
-int savectx2(struct xpcb *);
+int savectx(struct pcb *);
#endif
#endif /* _AMD64_PCB_H_ */
==== //depot/projects/soc2009/anchie_send/src/sys/boot/common/loader.8#2 (text+ko) ====
@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/sys/boot/common/loader.8,v 1.96 2009/02/16 02:42:17 thompsa Exp $
+.\" $FreeBSD: src/sys/boot/common/loader.8,v 1.97 2010/08/02 13:11:35 uqs Exp $
.\"
.Dd February 15, 2009
.Dt LOADER 8
@@ -806,7 +806,7 @@
exception guard.
.It Ic .#
Works like
-.Ic .
+.Ic "."
but without outputting a trailing space.
.It Ic fclose Pq Ar fd --
Closes a file.
==== //depot/projects/soc2009/anchie_send/src/sys/cam/cam.c#5 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/cam.c,v 1.16 2010/01/28 08:41:30 mav Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/cam.c,v 1.17 2010/08/02 18:06:49 bcr Exp $");
#include <sys/param.h>
#ifdef _KERNEL
@@ -59,7 +59,7 @@
{ CAM_REQ_ABORTED, "CCB request aborted by the host" },
{ CAM_UA_ABORT, "Unable to abort CCB request" },
{ CAM_REQ_CMP_ERR, "CCB request completed with an error" },
- { CAM_BUSY, "CAM subsytem is busy" },
+ { CAM_BUSY, "CAM subsystem is busy" },
{ CAM_REQ_INVALID, "CCB request was invalid" },
{ CAM_PATH_INVALID, "Supplied Path ID is invalid" },
{ CAM_DEV_NOT_THERE, "Device Not Present" },
==== //depot/projects/soc2009/anchie_send/src/sys/cam/scsi/scsi_target.c#5 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_target.c,v 1.81 2009/10/23 08:27:55 mav Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_target.c,v 1.82 2010/08/02 18:06:49 bcr Exp $");
#include <sys/param.h>
@@ -1174,7 +1174,7 @@
return (EINVAL);
case CAM_RESRC_UNAVAIL: /* Resource Unavailable */
return (ENOMEM);
- case CAM_BUSY: /* CAM subsytem is busy */
+ case CAM_BUSY: /* CAM subsystem is busy */
case CAM_UA_ABORT: /* Unable to abort CCB request */
return (EBUSY);
default:
==== //depot/projects/soc2009/anchie_send/src/sys/compat/freebsd32/freebsd32_misc.c#8 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/freebsd32/freebsd32_misc.c,v 1.110 2010/07/27 17:31:03 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/freebsd32/freebsd32_misc.c,v 1.113 2010/08/04 14:38:20 kib Exp $");
#include "opt_compat.h"
#include "opt_inet.h"
@@ -1059,6 +1059,8 @@
if (control != NULL)
error = freebsd32_copy_msg_out(&msg, control);
+ else
+ msg.msg_controllen = 0;
if (error == 0)
error = freebsd32_copyoutmsghdr(&msg, uap->msg);
@@ -1614,8 +1616,9 @@
}
static void
-copy_stat( struct stat *in, struct stat32 *out)
+copy_stat(struct stat *in, struct stat32 *out)
{
+
CP(*in, *out, st_dev);
CP(*in, *out, st_ino);
CP(*in, *out, st_mode);
@@ -1631,6 +1634,7 @@
CP(*in, *out, st_blksize);
CP(*in, *out, st_flags);
CP(*in, *out, st_gen);
+ TS_CP(*in, *out, st_birthtim);
}
int
==== //depot/projects/soc2009/anchie_send/src/sys/conf/NOTES#11 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1588 2010/07/28 15:36:12 mdf Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1589 2010/08/05 16:28:17 olli Exp $
#
# NOTES -- Lines that can be cut/pasted into kernel and hints configs.
#
@@ -195,7 +195,7 @@
# workloads on SMP machines. It supports cpu-affinity, per-cpu runqueues
# and scheduler locks. It also has a stronger notion of interactivity
# which leads to better responsiveness even on uniprocessor machines. This
-# will eventually become the default scheduler.
+# is the default scheduler.
#
# SCHED_STATS is a debugging option which keeps some stats in the sysctl
# tree at 'kern.sched.stats' and is useful for debugging scheduling decisions.
@@ -501,7 +501,7 @@
#options RESTARTABLE_PANICS
#
-# This option let some drivers co-exist that can't co-exist in a running
+# This option lets some drivers co-exist that can't co-exist in a running
# system. This is used to be able to compile all kernel code in one go for
# quality assurance purposes (like this file, which the option takes it name
# from.)
@@ -521,7 +521,7 @@
#
# The hwpmc driver that allows the use of in-CPU performance monitoring
-# counters for performance monitoring. The base kernel needs to configured
+# counters for performance monitoring. The base kernel needs to be configured
# with the 'options' line, while the hwpmc device can be either compiled
# in or loaded as a loadable kernel module.
#
@@ -592,12 +592,12 @@
# soon to have a new base RFC and many many more
# extensions. This release supports all the extensions
# including many drafts (most about to become RFC's).
-# It is the premeier SCTP implementation in the NET
+# It is the reference implementation of SCTP
# and is quite well tested.
#
# Note YOU MUST have both INET and INET6 defined.
-# you don't have to enable V6, but SCTP is
-# dual stacked and so far we have not teased apart
+# You don't have to enable V6, but SCTP is
+# dual stacked and so far we have not torn apart
# the V6 and V4.. since an association can span
# both a V6 and V4 address at the SAME time :-)
#
@@ -605,7 +605,7 @@
# There are bunches of options:
# this one turns on all sorts of
# nastly printing that you can
-# do. Its all controled by a
+# do. It's all controlled by a
# bit mask (settable by socket opt and
# by sysctl). Including will not cause
# logging until you set the bits.. but it
@@ -615,9 +615,9 @@
# faster.. if you are not debugging don't use.
options SCTP_DEBUG
#
-# This option turns off the CRC32c checksum. Basically
-# You will not be able to talk to anyone else that
-# has not done this. Its more for expermentation to
+# This option turns off the CRC32c checksum. Basically,
+# you will not be able to talk to anyone else who
+# has not done this. Its more for experimentation to
# see how much CPU the CRC32c really takes. Most new
# cards for TCP support checksum offload.. so this
# option gives you a "view" into what SCTP would be
@@ -636,13 +636,13 @@
# see. I have used this to produce interesting
# charts and graphs as well :->
#
-# I have not yet commited the tools to get and print
+# I have not yet committed the tools to get and print
# the logs, I will do that eventually .. before then
# if you want them send me an email rrs at freebsd.org
# You basically must have ktr(4) enabled for these
# and you then set the sysctl to turn on/off various
# logging bits. Use ktrdump(8) to pull the log and run
-# it through a dispaly program.. and graphs and other
+# it through a display program.. and graphs and other
# things too.
#
options SCTP_LOCK_LOGGING
@@ -798,8 +798,7 @@
# The `bpf' device enables the Berkeley Packet Filter. Be
# aware of the legal and administrative consequences of enabling this
-# option. The number of devices determines the maximum number of
-# simultaneous BPF clients programs runnable. DHCP requires bpf.
+# option. DHCP requires bpf.
device bpf
# The `disc' device implements a minimal network interface,
@@ -938,7 +937,7 @@
options MBUF_STRESS_TEST
options MBUF_PROFILING
-# Statically Link in accept filters
+# Statically link in accept filters
options ACCEPT_FILTER_DATA
options ACCEPT_FILTER_DNS
options ACCEPT_FILTER_HTTP
@@ -996,7 +995,7 @@
options NFSLOCKD #Network Lock Manager
options NFSCL #experimental NFS client with NFSv4
options NFSD #experimental NFS server with NFSv4
-options KGSSAPI #Kernel GSSAPI implementaion
+options KGSSAPI #Kernel GSSAPI implementation
# NT File System. Read-mostly, see mount_ntfs(8) for details.
# For a full read-write NTFS support consider sysutils/fusefs-ntfs
@@ -1059,7 +1058,7 @@
# if you let these users run programs, so confine it to file-servers
# (but it'll save you lots of headaches in those cases). Root owned
# directories are exempt and X bits are cleared. The suid bit must be
-# set on the directory as well; see chmod(1) PC owners can't see/set
+# set on the directory as well; see chmod(1). PC owners can't see/set
# ownerships so they keep getting their toes trodden on. This saves
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list