summaryrefslogtreecommitdiff
path: root/usr/src/uts/intel
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/uts/intel')
-rw-r--r--usr/src/uts/intel/ia32/ml/modstubs.s20
-rw-r--r--usr/src/uts/intel/io/acpica/osl.c49
-rw-r--r--usr/src/uts/intel/sys/acpica.h6
-rw-r--r--usr/src/uts/intel/sys/x86_archext.h8
4 files changed, 49 insertions, 34 deletions
diff --git a/usr/src/uts/intel/ia32/ml/modstubs.s b/usr/src/uts/intel/ia32/ml/modstubs.s
index 6d2fce1635..3b050716c0 100644
--- a/usr/src/uts/intel/ia32/ml/modstubs.s
+++ b/usr/src/uts/intel/ia32/ml/modstubs.s
@@ -1315,6 +1315,26 @@ fcnname/**/_info: \
END_MODULE(dcopy);
#endif
+/*
+ * Stubs for acpica
+ */
+#ifndef ACPICA_MODULE
+ MODULE(acpica,misc);
+ NO_UNLOAD_STUB(acpica, AcpiOsReadPort, nomod_minus_one) ;
+ NO_UNLOAD_STUB(acpica, AcpiOsWritePort, nomod_minus_one) ;
+ NO_UNLOAD_STUB(acpica, AcpiInstallNotifyHandler, nomod_minus_one) ;
+ NO_UNLOAD_STUB(acpica, AcpiRemoveNotifyHandler, nomod_minus_one) ;
+ NO_UNLOAD_STUB(acpica, AcpiEvaluateObject, nomod_minus_one) ;
+ NO_UNLOAD_STUB(acpica, AcpiEvaluateObjectTyped, nomod_minus_one) ;
+ NO_UNLOAD_STUB(acpica, AcpiSetRegister, nomod_minus_one) ;
+ NO_UNLOAD_STUB(acpica, AcpiGetRegister, nomod_minus_one) ;
+ NO_UNLOAD_STUB(acpica, AcpiOsFree, nomod_minus_one) ;
+ NO_UNLOAD_STUB(acpica, acpica_get_handle_cpu, nomod_minus_one) ;
+ NO_UNLOAD_STUB(acpica, acpica_get_global_FADT, nomod_minus_one) ;
+ NO_UNLOAD_STUB(acpica, __acpi_wbinvd, nomod_minus_one) ;
+ END_MODULE(acpica);
+#endif
+
#ifndef IPNET_MODULE
MODULE(ipnet,drv);
STUB(ipnet, ipnet_if_getdev, nomod_zero);
diff --git a/usr/src/uts/intel/io/acpica/osl.c b/usr/src/uts/intel/io/acpica/osl.c
index 41f85c9bdc..45edf50026 100644
--- a/usr/src/uts/intel/io/acpica/osl.c
+++ b/usr/src/uts/intel/io/acpica/osl.c
@@ -20,7 +20,7 @@
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
@@ -474,8 +474,16 @@ ACPI_CPU_FLAGS
AcpiOsAcquireLock(ACPI_HANDLE Handle)
{
- mutex_enter((kmutex_t *)Handle);
- return (0);
+
+ if (Handle == NULL)
+ return (AE_BAD_PARAMETER);
+
+ if (curthread == CPU->cpu_idle_thread) {
+ while (!mutex_tryenter((kmutex_t *)Handle))
+ /* spin */;
+ } else
+ mutex_enter((kmutex_t *)Handle);
+ return (AE_OK);
}
void
@@ -1365,24 +1373,8 @@ acpica_add_processor_to_map(UINT32 acpi_id, ACPI_HANDLE obj)
* Return the ACPI device node matching the CPU dev_info node.
*/
ACPI_STATUS
-acpica_get_handle_cpu(dev_info_t *dip, ACPI_HANDLE *rh)
+acpica_get_handle_cpu(int cpu_id, ACPI_HANDLE *rh)
{
- char *device_type_prop;
- int cpu_id;
-
- /*
- * if "device_type" != "cpu", error
- */
- if (ddi_prop_lookup_string(DDI_DEV_T_ANY, dip, 0,
- "device_type", &device_type_prop) != DDI_PROP_SUCCESS)
- return (AE_ERROR);
-
- if (strcmp("cpu", device_type_prop) != 0) {
- ddi_prop_free(device_type_prop);
- return (AE_ERROR);
- }
- ddi_prop_free(device_type_prop);
-
/*
* if cpu_map itself is NULL, we're a uppc system and
* acpica_build_processor_map() hasn't been called yet.
@@ -1394,19 +1386,10 @@ acpica_get_handle_cpu(dev_info_t *dip, ACPI_HANDLE *rh)
return (AE_ERROR);
}
- /*
- * get 'reg' and get obj from cpu_map
- */
- cpu_id = ddi_prop_get_int(DDI_DEV_T_ANY, dip, DDI_PROP_DONTPASS,
- "reg", -1);
if ((cpu_id < 0) || (cpu_map[cpu_id] == NULL) ||
(cpu_map[cpu_id]->obj == NULL))
return (AE_ERROR);
- /*
- * tag devinfo and obj
- */
- (void) acpica_tag_devinfo(dip, cpu_map[cpu_id]->obj);
*rh = cpu_map[cpu_id]->obj;
return (AE_OK);
}
@@ -1689,7 +1672,7 @@ acpica_get_handle(dev_info_t *dip, ACPI_HANDLE *rh)
if (ddi_prop_lookup_string(DDI_DEV_T_ANY, dip, DDI_PROP_DONTPASS,
"acpi-namespace", &acpiname) != DDI_PROP_SUCCESS) {
- return (acpica_get_handle_cpu(dip, rh));
+ return (AE_ERROR);
}
status = AcpiGetHandle(NULL, acpiname, rh);
@@ -1793,3 +1776,9 @@ acpica_build_processor_map()
ASSERT(status == AE_OK);
cpu_map_built = 1;
}
+
+void
+acpica_get_global_FADT(ACPI_TABLE_FADT **gbl_FADT)
+{
+ *gbl_FADT = &AcpiGbl_FADT;
+}
diff --git a/usr/src/uts/intel/sys/acpica.h b/usr/src/uts/intel/sys/acpica.h
index 8b3e1206c3..dddcc9bf78 100644
--- a/usr/src/uts/intel/sys/acpica.h
+++ b/usr/src/uts/intel/sys/acpica.h
@@ -19,15 +19,13 @@
* CDDL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_ACPICA_H
#define _SYS_ACPICA_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -125,11 +123,13 @@ extern ACPI_STATUS acpica_get_sci(int *, iflag_t *);
extern int acpica_get_bdf(dev_info_t *, int *, int *, int *);
extern ACPI_STATUS acpica_get_devinfo(ACPI_HANDLE, dev_info_t **);
extern ACPI_STATUS acpica_get_handle(dev_info_t *, ACPI_HANDLE *);
+extern ACPI_STATUS acpica_get_handle_cpu(int, ACPI_HANDLE *);
extern ACPI_STATUS acpica_eval_int(ACPI_HANDLE, char *, int *);
extern void acpica_map_cpu(processorid_t, UINT32);
extern void acpica_build_processor_map();
extern void acpica_ddi_save_resources(dev_info_t *);
extern void acpica_ddi_restore_resources(dev_info_t *);
+extern void acpica_get_global_FADT(ACPI_TABLE_FADT **);
#ifdef __cplusplus
}
diff --git a/usr/src/uts/intel/sys/x86_archext.h b/usr/src/uts/intel/sys/x86_archext.h
index 369dff14db..c5a88a30f3 100644
--- a/usr/src/uts/intel/sys/x86_archext.h
+++ b/usr/src/uts/intel/sys/x86_archext.h
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -357,6 +357,11 @@ extern "C" {
"\10mmx\7cmov\6de\5pge\4mtrr\3msr\2tsc\1lgpg"
/*
+ * Intel Deep C-State invariant TSC in leaf 0x80000007.
+ */
+#define CPUID_TSC_CSTATE_INVARIANCE (0x100)
+
+/*
* x86_type is a legacy concept; this is supplanted
* for most purposes by x86_feature; modern CPUs
* should be X86_TYPE_OTHER
@@ -605,6 +610,7 @@ extern uint_t cpuid_get_dtlb_nent(struct cpu *, size_t);
#if !defined(__xpv)
extern uint32_t *cpuid_mwait_alloc(struct cpu *);
extern void cpuid_mwait_free(struct cpu *);
+extern int cpuid_deep_cstates_supported(void);
#endif
struct cpu_ucode_info;