initcpu.c (349955) | initcpu.c (358582) |
---|---|
1/*- 2 * Copyright (c) KATO Takenori, 1997, 1998. 3 * 4 * All rights reserved. Unpublished rights reserved under the copyright 5 * laws of Japan. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 14 unchanged lines hidden (view full) --- 23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) KATO Takenori, 1997, 1998. 3 * 4 * All rights reserved. Unpublished rights reserved under the copyright 5 * laws of Japan. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 14 unchanged lines hidden (view full) --- 23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: stable/11/sys/amd64/amd64/initcpu.c 349955 2019-07-12 20:05:30Z jhb $"); | 31__FBSDID("$FreeBSD: stable/11/sys/amd64/amd64/initcpu.c 358582 2020-03-03 15:12:00Z kib $"); |
32 33#include "opt_cpu.h" 34 35#include <sys/param.h> 36#include <sys/kernel.h> 37#include <sys/pcpu.h> 38#include <sys/systm.h> 39#include <sys/sysctl.h> --- 200 unchanged lines hidden (view full) --- 240 if (!IS_BSP() && (cpu_stdext_feature & CPUID_STDEXT_SMEP)) 241 cr4 |= CR4_SMEP; 242 load_cr4(cr4); 243 if ((amd_feature & AMDID_NX) != 0) { 244 msr = rdmsr(MSR_EFER) | EFER_NXE; 245 wrmsr(MSR_EFER, msr); 246 pg_nx = PG_NX; 247 } | 32 33#include "opt_cpu.h" 34 35#include <sys/param.h> 36#include <sys/kernel.h> 37#include <sys/pcpu.h> 38#include <sys/systm.h> 39#include <sys/sysctl.h> --- 200 unchanged lines hidden (view full) --- 240 if (!IS_BSP() && (cpu_stdext_feature & CPUID_STDEXT_SMEP)) 241 cr4 |= CR4_SMEP; 242 load_cr4(cr4); 243 if ((amd_feature & AMDID_NX) != 0) { 244 msr = rdmsr(MSR_EFER) | EFER_NXE; 245 wrmsr(MSR_EFER, msr); 246 pg_nx = PG_NX; 247 } |
248 hw_ibrs_recalculate(); | 248 hw_ibrs_recalculate(false); |
249 hw_ssb_recalculate(false); 250 switch (cpu_vendor_id) { 251 case CPU_VENDOR_AMD: 252 init_amd(); 253 break; 254 case CPU_VENDOR_CENTAUR: 255 init_via(); 256 break; --- 39 unchanged lines hidden --- | 249 hw_ssb_recalculate(false); 250 switch (cpu_vendor_id) { 251 case CPU_VENDOR_AMD: 252 init_amd(); 253 break; 254 case CPU_VENDOR_CENTAUR: 255 init_via(); 256 break; --- 39 unchanged lines hidden --- |