149 cp->cpu_brandstr = kmem_zalloc(CPU_IDSTRLEN, KM_SLEEP);
150
151 /*
152 * If called for the BSP, cp is equal to current CPU.
153 * For non-BSPs, cpuid info of cp is not ready yet, so use cpuid info
154 * of current CPU as default values for cpu_idstr and cpu_brandstr.
155 * They will be corrected in mp_startup_common() after cpuid_pass1()
156 * has been invoked on target CPU.
157 */
158 (void) cpuid_getidstr(CPU, cp->cpu_idstr, CPU_IDSTRLEN);
159 (void) cpuid_getbrandstr(CPU, cp->cpu_brandstr, CPU_IDSTRLEN);
160 }
161
162 /*
163 * Configure syscall support on this CPU.
164 */
165 /*ARGSUSED*/
166 void
167 init_cpu_syscall(struct cpu *cp)
168 {
169 uint64_t flags;
170
171 kpreempt_disable();
172
173 #if defined(__amd64)
174 if (is_x86_feature(x86_featureset, X86FSET_MSR) &&
175 is_x86_feature(x86_featureset, X86FSET_ASYSC)) {
176 uint64_t flags;
177
178 #if !defined(__lint)
179 /*
180 * The syscall instruction imposes a certain ordering on
181 * segment selectors, so we double-check that ordering
182 * here.
183 */
184 ASSERT(KDS_SEL == KCS_SEL + 8);
185 ASSERT(UDS_SEL == U32CS_SEL + 8);
186 ASSERT(UCS_SEL == U32CS_SEL + 16);
187 #endif
188 /*
189 * Turn syscall/sysret extensions on.
190 */
|
149 cp->cpu_brandstr = kmem_zalloc(CPU_IDSTRLEN, KM_SLEEP);
150
151 /*
152 * If called for the BSP, cp is equal to current CPU.
153 * For non-BSPs, cpuid info of cp is not ready yet, so use cpuid info
154 * of current CPU as default values for cpu_idstr and cpu_brandstr.
155 * They will be corrected in mp_startup_common() after cpuid_pass1()
156 * has been invoked on target CPU.
157 */
158 (void) cpuid_getidstr(CPU, cp->cpu_idstr, CPU_IDSTRLEN);
159 (void) cpuid_getbrandstr(CPU, cp->cpu_brandstr, CPU_IDSTRLEN);
160 }
161
162 /*
163 * Configure syscall support on this CPU.
164 */
165 /*ARGSUSED*/
166 void
167 init_cpu_syscall(struct cpu *cp)
168 {
169 kpreempt_disable();
170
171 #if defined(__amd64)
172 if (is_x86_feature(x86_featureset, X86FSET_MSR) &&
173 is_x86_feature(x86_featureset, X86FSET_ASYSC)) {
174 uint64_t flags;
175
176 #if !defined(__lint)
177 /*
178 * The syscall instruction imposes a certain ordering on
179 * segment selectors, so we double-check that ordering
180 * here.
181 */
182 ASSERT(KDS_SEL == KCS_SEL + 8);
183 ASSERT(UDS_SEL == U32CS_SEL + 8);
184 ASSERT(UCS_SEL == U32CS_SEL + 16);
185 #endif
186 /*
187 * Turn syscall/sysret extensions on.
188 */
|