Deleted Added
full compact
initcpu.c (361561) initcpu.c (362383)
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 361561 2020-05-27 18:55:24Z kib $");
31__FBSDID("$FreeBSD: stable/11/sys/amd64/amd64/initcpu.c 362383 2020-06-19 13:48:23Z 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>

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

256 load_cr4(cr4);
257 if ((amd_feature & AMDID_NX) != 0) {
258 msr = rdmsr(MSR_EFER) | EFER_NXE;
259 wrmsr(MSR_EFER, msr);
260 pg_nx = PG_NX;
261 }
262 hw_ibrs_recalculate(false);
263 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>

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

256 load_cr4(cr4);
257 if ((amd_feature & AMDID_NX) != 0) {
258 msr = rdmsr(MSR_EFER) | EFER_NXE;
259 wrmsr(MSR_EFER, msr);
260 pg_nx = PG_NX;
261 }
262 hw_ibrs_recalculate(false);
263 hw_ssb_recalculate(false);
264 x86_rngds_mitg_recalculate(false);
264 switch (cpu_vendor_id) {
265 case CPU_VENDOR_AMD:
266 init_amd();
267 break;
268 case CPU_VENDOR_CENTAUR:
269 init_via();
270 break;
271 }

--- 38 unchanged lines hidden ---
265 switch (cpu_vendor_id) {
266 case CPU_VENDOR_AMD:
267 init_amd();
268 break;
269 case CPU_VENDOR_CENTAUR:
270 init_via();
271 break;
272 }

--- 38 unchanged lines hidden ---