Deleted Added
full compact
initcpu.c (345414) initcpu.c (347568)
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 345414 2019-03-22 14:49:22Z kib $");
31__FBSDID("$FreeBSD: stable/11/sys/amd64/amd64/initcpu.c 347568 2019-05-14 17:05:02Z 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>

--- 202 unchanged lines hidden (view full) ---

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();
249 hw_ssb_recalculate(false);
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>

--- 202 unchanged lines hidden (view full) ---

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();
249 hw_ssb_recalculate(false);
250 hw_mds_recalculate();
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;
257 }

--- 38 unchanged lines hidden ---
251 switch (cpu_vendor_id) {
252 case CPU_VENDOR_AMD:
253 init_amd();
254 break;
255 case CPU_VENDOR_CENTAUR:
256 init_via();
257 break;
258 }

--- 38 unchanged lines hidden ---