summaryrefslogtreecommitdiff
path: root/usr/src/uts/i86pc/os/cpuid.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/uts/i86pc/os/cpuid.c')
-rw-r--r--usr/src/uts/i86pc/os/cpuid.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/usr/src/uts/i86pc/os/cpuid.c b/usr/src/uts/i86pc/os/cpuid.c
index 182c4aa7a6..b87c5f9887 100644
--- a/usr/src/uts/i86pc/os/cpuid.c
+++ b/usr/src/uts/i86pc/os/cpuid.c
@@ -306,6 +306,7 @@ static struct cpuid_info cpuid_info0;
* file to try and keep people using the expected cpuid_* interfaces.
*/
extern uint32_t _cpuid_skt(uint_t, uint_t, uint_t, uint_t);
+extern const char *_cpuid_sktstr(uint_t, uint_t, uint_t, uint_t);
extern uint32_t _cpuid_chiprev(uint_t, uint_t, uint_t, uint_t);
extern const char *_cpuid_chiprevstr(uint_t, uint_t, uint_t, uint_t);
extern uint_t _cpuid_vendorstr_to_vendorcode(char *);
@@ -495,6 +496,10 @@ cpuid_pass1(cpu_t *cpu)
extern int idle_cpu_prefer_mwait;
#endif
+
+#if !defined(__xpv)
+ determine_platform();
+#endif
/*
* Space statically allocated for cpu0, ensure pointer is set
*/
@@ -1226,9 +1231,6 @@ cpuid_pass1(cpu_t *cpu)
cpi->cpi_model, cpi->cpi_step);
pass1_done:
-#if !defined(__xpv)
- determine_platform();
-#endif
cpi->cpi_pass = 1;
return (feature);
}
@@ -2484,6 +2486,24 @@ cpuid_getsockettype(struct cpu *cpu)
return (cpu->cpu_m.mcpu_cpi->cpi_socket);
}
+const char *
+cpuid_getsocketstr(cpu_t *cpu)
+{
+ static const char *socketstr = NULL;
+ struct cpuid_info *cpi;
+
+ ASSERT(cpuid_checkpass(cpu, 1));
+ cpi = cpu->cpu_m.mcpu_cpi;
+
+ /* Assume that socket types are the same across the system */
+ if (socketstr == NULL)
+ socketstr = _cpuid_sktstr(cpi->cpi_vendor, cpi->cpi_family,
+ cpi->cpi_model, cpi->cpi_step);
+
+
+ return (socketstr);
+}
+
int
cpuid_get_chipid(cpu_t *cpu)
{