Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/arch/i386/i386



On Wed, 25 Jul 2007 16:04:27 +0200
"Julio M. Merino Vidal" <jmmv84%gmail.com@localhost> wrote:

> Are you sure that is correct?  The original code was only calling  
> est_init when the cpu_vendor was one of CPUVENDOR_INTEL or  
> CPUVENDOR_IDT.  Now it calls est_init with any vendor.  According to  
> the est_init code, I see:
> 
>          if (CPUID2FAMILY(curcpu()->ci_signature) == 15)
>                  bus_clock = p4_get_bus_clock(curcpu());
>          else if (CPUID2FAMILY(curcpu()->ci_signature) == 6) {
>                  if (vendor == CPUVENDOR_IDT)
>                          bus_clock = via_get_bus_clock(curcpu());
>                  else
>                          bus_clock = p3_get_bus_clock(curcpu());
>          }
> 
> So when cpu_vendor != CPUVENDOR_IDT, it calls p3_get_bus_clock.  And  
> that function only seems to recognize Intel CPUs.  So with your  
> change, this function will get called with any kind of CPU and return  
> invalid values.

Family 15 is amd64 with EM64T and family 3 is i386.

cpu_vendor will always be CPUVENDOR_INTEL or CPUVENDOR_IDT, and CPUID2_EST
is only available in those CPUs anyway.

What do you see wrong here? I don't understand you.

-- 
Juan Romero Pardines    - The NetBSD Project
http://plog.xtrarom.org - NetBSD/pkgsrc news in Spanish



Home | Main Index | Thread Index | Old Index