x86_setup_mtrrs should be split to
x86_setup_fixed_mtrrs x86_setup_var_mtrrs x86_setup_enable_mtrrs
and for Opteron it can reuse x86_setup_var_mtrrs x86_setup_enable_mtrrs
and x86_setup_var_mtrrs can take the cupid or sth as parameter to find out 40bit or 32 bit.
YH
-----Original Message----- From: ebiederman@lnxi.com [mailto:ebiederman@lnxi.com] Sent: Thursday, November 11, 2004 6:20 PM To: YhLu Cc: 'Ronald G. Minnich'; 'linuxbios@clustermatic.org' Subject: Re: mtrr
YhLu YhLu@tyan.com writes:
In the cpu/x86/mtrr/mtrr.c
#warning "FIXME I do not properly handle address more than 36 physical address bits" #ifdef k8 # define ADDRESS_BITS 40 #else # define ADDRESS_BITS 36 #endif #define ADDRESS_BITS_HIGH (ADDRESS_BITS - 32) #define ADDRESS_MASK_HIGH ((1u << ADDRESS_BITS_HIGH) - 1)
It seems someone already remove k8 from Option.lb
Then ....
Regards
Interesting. The mtrr's actually work and the kernel is confused.
However what we need to do is call the appropriate cpuid function to compute it or pass in the number of address bits. It should not be a compile time option, at least not in the generic code. What happens when we get can plug in cpus with different address bit limits.
Eric