svn commit: r322523 - in stable/10/sys: amd64/amd64 amd64/include x86/x86
Sepherosa Ziehau
sepherosa at gmail.com
Tue Aug 15 03:21:00 UTC 2017
Thank you!
On Tue, Aug 15, 2017 at 7:46 AM, Jung-uk Kim <jkim at freebsd.org> wrote:
> Author: jkim
> Date: Mon Aug 14 23:46:10 2017
> New Revision: 322523
> URL: https://svnweb.freebsd.org/changeset/base/322523
>
> Log:
> MFC: r322323
>
> Split identify_cpu() into two functions for amd64 as we do for i386. This
> fixes a regression introduced in r322205.
>
> Approved by: re (marius)
>
> Modified:
> stable/10/sys/amd64/amd64/machdep.c
> stable/10/sys/amd64/include/md_var.h
> stable/10/sys/x86/x86/identcpu.c
> Directory Properties:
> stable/10/ (props changed)
>
> Modified: stable/10/sys/amd64/amd64/machdep.c
> ==============================================================================
> --- stable/10/sys/amd64/amd64/machdep.c Mon Aug 14 22:38:54 2017 (r322522)
> +++ stable/10/sys/amd64/amd64/machdep.c Mon Aug 14 23:46:10 2017 (r322523)
> @@ -1853,6 +1853,7 @@ hammer_time(u_int64_t modulep, u_int64_t physfree)
> ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, uintptr_t);
> #endif
>
> + identify_cpu();
> identify_hypervisor();
>
> /* Init basic tunables, hz etc */
> @@ -1950,7 +1951,7 @@ hammer_time(u_int64_t modulep, u_int64_t physfree)
> MODINFO_METADATA | MODINFOMD_EFI_MAP) != NULL)
> vty_set_preferred(VTY_VT);
>
> - identify_cpu(); /* Final stage of CPU initialization */
> + finishidentcpu(); /* Final stage of CPU initialization */
> initializecpu(); /* Initialize CPU registers */
> initializecpucache();
>
>
> Modified: stable/10/sys/amd64/include/md_var.h
> ==============================================================================
> --- stable/10/sys/amd64/include/md_var.h Mon Aug 14 22:38:54 2017 (r322522)
> +++ stable/10/sys/amd64/include/md_var.h Mon Aug 14 23:46:10 2017 (r322523)
> @@ -119,6 +119,7 @@ void fsbase_load_fault(void) __asm(__STRING(fsbase_loa
> void gsbase_load_fault(void) __asm(__STRING(gsbase_load_fault));
> void dump_add_page(vm_paddr_t);
> void dump_drop_page(vm_paddr_t);
> +void finishidentcpu(void);
> void identify_cpu(void);
> void identify_hypervisor(void);
> void initializecpu(void);
>
> Modified: stable/10/sys/x86/x86/identcpu.c
> ==============================================================================
> --- stable/10/sys/x86/x86/identcpu.c Mon Aug 14 22:38:54 2017 (r322522)
> +++ stable/10/sys/x86/x86/identcpu.c Mon Aug 14 23:46:10 2017 (r322523)
> @@ -1346,23 +1346,12 @@ fix_cpuid(void)
> return (false);
> }
>
> -/*
> - * Final stage of CPU identification.
> - */
> -#ifdef __i386__
> +#ifdef __amd64__
> void
> -finishidentcpu(void)
> -#else
> -void
> identify_cpu(void)
> -#endif
> {
> - u_int regs[4], cpu_stdext_disable;
> -#ifdef __i386__
> - u_char ccr3;
> -#endif
> + u_int regs[4];
>
> -#ifdef __amd64__
> do_cpuid(0, regs);
> cpu_high = regs[0];
> ((u_int *)&cpu_vendor)[0] = regs[1];
> @@ -1375,6 +1364,18 @@ identify_cpu(void)
> cpu_procinfo = regs[1];
> cpu_feature = regs[3];
> cpu_feature2 = regs[2];
> +}
> +#endif
> +
> +/*
> + * Final stage of CPU identification.
> + */
> +void
> +finishidentcpu(void)
> +{
> + u_int regs[4], cpu_stdext_disable;
> +#ifdef __i386__
> + u_char ccr3;
> #endif
>
> cpu_vendor_id = find_cpu_vendor_id();
> _______________________________________________
> svn-src-all at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-all
> To unsubscribe, send any mail to "svn-src-all-unsubscribe at freebsd.org"
--
Tomorrow Will Never Die
More information about the svn-src-stable
mailing list