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/i386/i386/initcpu.c 345414 2019-03-22 14:49:22Z kib $");
31__FBSDID("$FreeBSD: stable/11/sys/i386/i386/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>

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

764 uint64_t msr;
765
766 msr = rdmsr(MSR_EFER) | EFER_NXE;
767 wrmsr(MSR_EFER, msr);
768 pg_nx = PG_NX;
769 elf32_nxstack = 1;
770 }
771#endif
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>

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

764 uint64_t msr;
765
766 msr = rdmsr(MSR_EFER) | EFER_NXE;
767 wrmsr(MSR_EFER, msr);
768 pg_nx = PG_NX;
769 elf32_nxstack = 1;
770 }
771#endif
772 hw_mds_recalculate();
772 if ((amd_feature & AMDID_RDTSCP) != 0 ||
773 (cpu_stdext_feature2 & CPUID_STDEXT2_RDPID) != 0)
774 wrmsr(MSR_TSC_AUX, PCPU_GET(cpuid));
775}
776
777void
778initializecpucache(void)
779{

--- 296 unchanged lines hidden ---
773 if ((amd_feature & AMDID_RDTSCP) != 0 ||
774 (cpu_stdext_feature2 & CPUID_STDEXT2_RDPID) != 0)
775 wrmsr(MSR_TSC_AUX, PCPU_GET(cpuid));
776}
777
778void
779initializecpucache(void)
780{

--- 296 unchanged lines hidden ---