[LinuxBIOS] Merge complete....

YhLu YhLu at tyan.com
Thu Jun 23 00:42:17 CEST 2005

void x86_setup_mtrrs(unsigned address_bits)
/* this routine needs to know how many address bits a given processor
 * supports.  CPUs get grumpy when you set too many bits in 
 * their mtrr registers :(  I would generically call cpuid here
 * and find out how many physically supported but some cpus are
 * buggy, and report more bits then they actually support.
        /* Try this the simple way of incrementally adding together
         * mtrrs.  If this doesn't work out we can get smart again 
         * and clear out the mtrrs.
        struct var_mtrr_state var_state;

        if(address_bits != 40) { ----------------------------------------
skip it for AMD
                /* Initialized the fixed_mtrrs to uncached */
                printk_debug("Setting fixed MTRRs(%d-%d) type: UC\n",
                        0, NUM_FIXED_RANGES);
                set_fixed_mtrrs(0, NUM_FIXED_RANGES, MTRR_TYPE_UNCACHEABLE);

                /* Now see which of the fixed mtrrs cover ram.
                        set_fixed_mtrr_resource, NULL);
                printk_debug("DONE fixed MTRRs\n");

More information about the coreboot mailing list