diff usr/src/uts/intel/ia32/os/archdep.c @ 3446:5903aece022d

PSARC 2006/469 EOF and removal of eeprom -I PSARC 2006/568 direct boot (dboot) for x86 6219282 interrupt service routine called twice 6223946 potential infinite loop in fbt.c 6228819 tsc_gethrtimeunscaled resets to 0 on suspend 6342201 hat_unload() and cross call usage are needlessly slow on x86, x64 6378723 ctfconvert can't handle GCC empty struct C extension 6379124 ctfconvert can't handle C99 flexible array members 6401187 merging ip's CTF data into genunix introduces a race 6437553 shmat(2) fails on platforms that don't support large pages 6449286 eeprom -I should be torched 6464072 need support for firmware properties 6465816 need a debug record page 6467491 64-bit processes must point %fs or %gs to null selector to utilize [fs|gs]base 6475880 vestiges of old boot code on i386/amd64 should be purged 6475956 Interrupt handling code on x86 platforms should be easier to understand 6477828 pcplusmp psm module should be rearranged to allow multiple platforms to share the same apic code 6477867 x86 KDI should belong in the kernel 6477871 fix for 6232859 also needed for kmdb 6477872 MDB MMU commands need improvements 6477873 cpr debugging can be improved 6477877 mstate accounting should be reset when gethrtimef() is changed 6477915 32-bit x86 kernel should use interrupt gates for all traps 6477963 _update_sregs should be written in C 6477976 no longer need to capture [fs,gs]base in struct regs on every exception 6478642 Solaris needs to support multiple x86 platforms 6478648 ON could use an new & unencumbered xsvc driver 6478734 kernel lint not in C99 mode 6478826 swrand should have framework to lock individual pages 6480763 if interrupts can't be disabled, re-onlining an offline cpu fails 6481824 /dev/fb is not created if installation is done over tty 6483747 clock-tick processing should re-include threads waiting for I/O 6485872 use PTOU macro to access user area instead of old "u" from user.h 6486263 need way to extend kernel core dumps with pages that don't have page_t's 6486435 eeprom, prtdiag should only be platform specific where necessary 6486436 genunix mdb module makefiles duplicate list of files 6486437 intr_common.c should be common 6486445 /dev/mem needs support for page_t-less pages 6486451 cpu_pause() routine should be mach-specific 6486456 SIMULATOR_SUPPORT should die 6486832 x86 platform will need memlist/memseg locking 6486911 amd64 port not finished 6486972 platform TOD setting code may not have real TOD hdw to set 6492647 Better trap trace support for x-calls 6493613 apic_disable_intr() needs round robin fix 6497633 ctfmerge could allow for no ctf sections 6500637 floating point context switching is needlessly slow 6500656 move floating point configuration to C 6500666 need a means to override the setting of uname -m in the kernel build 6500669 update x86 defines 6502790 Files in the boot archive should be individually compressed 6503792 live upgrade environment + bfu + alternate root == incorrect menu.lst file 6504373 kmdb promif shouldn't needlessly busy-wait 6504374 ::interrupts could show level/edge 6506305 opteron erratum 123 should be enabled 6507629 porting x86 platform code to Xen 6510847 kobj.c is unaware of sparc hole between nucleus text and data (from dtrace)
author mrj
date Fri, 19 Jan 2007 08:10:06 -0800
parents f74a135872bc
children 8cf697a3acff
line wrap: on
line diff
--- a/usr/src/uts/intel/ia32/os/archdep.c	Thu Jan 18 16:23:02 2007 -0800
+++ b/usr/src/uts/intel/ia32/os/archdep.c	Fri Jan 19 08:10:06 2007 -0800
@@ -19,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -295,17 +295,6 @@
 #endif
 		fpu->fpu_regs.kfpu_status = fp->fp_reg_set.fpchip_state.status;
 		fpu->fpu_flags |= FPU_VALID;
-
-		/*
-		 * If we are changing the fpu_flags in the current context,
-		 * disable floating point (turn on CR0_TS bit) to track
-		 * FPU_VALID after clearing any errors (frstor chokes
-		 * otherwise)
-		 */
-		if (lwp == ttolwp(curthread)) {
-			(void) fperr_reset();
-			fpdisable();
-		}
 	} else {
 		/*
 		 * If we are trying to change the FPU state of a thread which
@@ -934,6 +923,11 @@
 	 * 32-bit lwp ...
 	 */
 	auxv_hwcap &= ~AV_386_SEP;
+#else
+	/*
+	 * 32-bit processes can -always- use the lahf/sahf instructions
+	 */
+	auxv_hwcap |= AV_386_AHF;
 #endif
 
 	if (auxv_hwcap_include || auxv_hwcap_exclude)
@@ -953,6 +947,11 @@
 	 */
 	if (!cpuid_syscall32_insn(NULL))
 		auxv_hwcap32 &= ~AV_386_AMD_SYSC;
+
+	/*
+	 * 32-bit processes can -always- use the lahf/sahf instructions
+	 */
+	auxv_hwcap32 |= AV_386_AHF;
 #endif
 
 	if (auxv_hwcap32_include || auxv_hwcap32_exclude)
@@ -1016,8 +1015,8 @@
 	PANICNVADD(pnv, "r13", rp->r_r13);
 	PANICNVADD(pnv, "r14", rp->r_r14);
 	PANICNVADD(pnv, "r15", rp->r_r15);
-	PANICNVADD(pnv, "fsbase", rp->r_fsbase);
-	PANICNVADD(pnv, "gsbase", rp->r_gsbase);
+	PANICNVADD(pnv, "fsbase", rdmsr(MSR_AMD_FSBASE));
+	PANICNVADD(pnv, "gsbase", rdmsr(MSR_AMD_GSBASE));
 	PANICNVADD(pnv, "ds", rp->r_ds);
 	PANICNVADD(pnv, "es", rp->r_es);
 	PANICNVADD(pnv, "fs", rp->r_fs);