/* Generic MTRR (Memory Type Range Register) driver.12Copyright (C) 1997-2000 Richard Gooch3Copyright (c) 2002 Patrick Mochel45This library is free software; you can redistribute it and/or6modify it under the terms of the GNU Library General Public7License as published by the Free Software Foundation; either8version 2 of the License, or (at your option) any later version.910This library is distributed in the hope that it will be useful,11but WITHOUT ANY WARRANTY; without even the implied warranty of12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU13Library General Public License for more details.1415You should have received a copy of the GNU Library General Public16License along with this library; if not, write to the Free17Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.1819Richard Gooch may be reached by email at [email protected]20The postal address is:21Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia.2223Source: "Pentium Pro Family Developer's Manual, Volume 3:24Operating System Writer's Guide" (Intel document number 242692),25section 11.11.72627This was cleaned and made readable by Patrick Mochel <[email protected]>28on 6-7 March 2002.29Source: Intel Architecture Software Developers Manual, Volume 3:30System Programming Guide; Section 9.11. (1997 edition - PPro).31*/3233#define DEBUG3435#include <linux/types.h> /* FIXME: kvm_para.h needs this */3637#include <linux/stop_machine.h>38#include <linux/kvm_para.h>39#include <linux/uaccess.h>40#include <linux/module.h>41#include <linux/mutex.h>42#include <linux/init.h>43#include <linux/sort.h>44#include <linux/cpu.h>45#include <linux/pci.h>46#include <linux/smp.h>47#include <linux/syscore_ops.h>4849#include <asm/processor.h>50#include <asm/e820.h>51#include <asm/mtrr.h>52#include <asm/msr.h>5354#include "mtrr.h"5556u32 num_var_ranges;5758unsigned int mtrr_usage_table[MTRR_MAX_VAR_RANGES];59static DEFINE_MUTEX(mtrr_mutex);6061u64 size_or_mask, size_and_mask;62static bool mtrr_aps_delayed_init;6364static const struct mtrr_ops *mtrr_ops[X86_VENDOR_NUM];6566const struct mtrr_ops *mtrr_if;6768static void set_mtrr(unsigned int reg, unsigned long base,69unsigned long size, mtrr_type type);7071void set_mtrr_ops(const struct mtrr_ops *ops)72{73if (ops->vendor && ops->vendor < X86_VENDOR_NUM)74mtrr_ops[ops->vendor] = ops;75}7677/* Returns non-zero if we have the write-combining memory type */78static int have_wrcomb(void)79{80struct pci_dev *dev;81u8 rev;8283dev = pci_get_class(PCI_CLASS_BRIDGE_HOST << 8, NULL);84if (dev != NULL) {85/*86* ServerWorks LE chipsets < rev 6 have problems with87* write-combining. Don't allow it and leave room for other88* chipsets to be tagged89*/90if (dev->vendor == PCI_VENDOR_ID_SERVERWORKS &&91dev->device == PCI_DEVICE_ID_SERVERWORKS_LE) {92pci_read_config_byte(dev, PCI_CLASS_REVISION, &rev);93if (rev <= 5) {94pr_info("mtrr: Serverworks LE rev < 6 detected. Write-combining disabled.\n");95pci_dev_put(dev);96return 0;97}98}99/*100* Intel 450NX errata # 23. Non ascending cacheline evictions to101* write combining memory may resulting in data corruption102*/103if (dev->vendor == PCI_VENDOR_ID_INTEL &&104dev->device == PCI_DEVICE_ID_INTEL_82451NX) {105pr_info("mtrr: Intel 450NX MMC detected. Write-combining disabled.\n");106pci_dev_put(dev);107return 0;108}109pci_dev_put(dev);110}111return mtrr_if->have_wrcomb ? mtrr_if->have_wrcomb() : 0;112}113114/* This function returns the number of variable MTRRs */115static void __init set_num_var_ranges(void)116{117unsigned long config = 0, dummy;118119if (use_intel())120rdmsr(MSR_MTRRcap, config, dummy);121else if (is_cpu(AMD))122config = 2;123else if (is_cpu(CYRIX) || is_cpu(CENTAUR))124config = 8;125126num_var_ranges = config & 0xff;127}128129static void __init init_table(void)130{131int i, max;132133max = num_var_ranges;134for (i = 0; i < max; i++)135mtrr_usage_table[i] = 1;136}137138struct set_mtrr_data {139atomic_t count;140atomic_t gate;141unsigned long smp_base;142unsigned long smp_size;143unsigned int smp_reg;144mtrr_type smp_type;145};146147static DEFINE_PER_CPU(struct cpu_stop_work, mtrr_work);148149/**150* mtrr_work_handler - Synchronisation handler. Executed by "other" CPUs.151* @info: pointer to mtrr configuration data152*153* Returns nothing.154*/155static int mtrr_work_handler(void *info)156{157#ifdef CONFIG_SMP158struct set_mtrr_data *data = info;159unsigned long flags;160161atomic_dec(&data->count);162while (!atomic_read(&data->gate))163cpu_relax();164165local_irq_save(flags);166167atomic_dec(&data->count);168while (atomic_read(&data->gate))169cpu_relax();170171/* The master has cleared me to execute */172if (data->smp_reg != ~0U) {173mtrr_if->set(data->smp_reg, data->smp_base,174data->smp_size, data->smp_type);175} else if (mtrr_aps_delayed_init) {176/*177* Initialize the MTRRs inaddition to the synchronisation.178*/179mtrr_if->set_all();180}181182atomic_dec(&data->count);183while (!atomic_read(&data->gate))184cpu_relax();185186atomic_dec(&data->count);187local_irq_restore(flags);188#endif189return 0;190}191192static inline int types_compatible(mtrr_type type1, mtrr_type type2)193{194return type1 == MTRR_TYPE_UNCACHABLE ||195type2 == MTRR_TYPE_UNCACHABLE ||196(type1 == MTRR_TYPE_WRTHROUGH && type2 == MTRR_TYPE_WRBACK) ||197(type1 == MTRR_TYPE_WRBACK && type2 == MTRR_TYPE_WRTHROUGH);198}199200/**201* set_mtrr - update mtrrs on all processors202* @reg: mtrr in question203* @base: mtrr base204* @size: mtrr size205* @type: mtrr type206*207* This is kinda tricky, but fortunately, Intel spelled it out for us cleanly:208*209* 1. Queue work to do the following on all processors:210* 2. Disable Interrupts211* 3. Wait for all procs to do so212* 4. Enter no-fill cache mode213* 5. Flush caches214* 6. Clear PGE bit215* 7. Flush all TLBs216* 8. Disable all range registers217* 9. Update the MTRRs218* 10. Enable all range registers219* 11. Flush all TLBs and caches again220* 12. Enter normal cache mode and reenable caching221* 13. Set PGE222* 14. Wait for buddies to catch up223* 15. Enable interrupts.224*225* What does that mean for us? Well, first we set data.count to the number226* of CPUs. As each CPU announces that it started the rendezvous handler by227* decrementing the count, We reset data.count and set the data.gate flag228* allowing all the cpu's to proceed with the work. As each cpu disables229* interrupts, it'll decrement data.count once. We wait until it hits 0 and230* proceed. We clear the data.gate flag and reset data.count. Meanwhile, they231* are waiting for that flag to be cleared. Once it's cleared, each232* CPU goes through the transition of updating MTRRs.233* The CPU vendors may each do it differently,234* so we call mtrr_if->set() callback and let them take care of it.235* When they're done, they again decrement data->count and wait for data.gate236* to be set.237* When we finish, we wait for data.count to hit 0 and toggle the data.gate flag238* Everyone then enables interrupts and we all continue on.239*240* Note that the mechanism is the same for UP systems, too; all the SMP stuff241* becomes nops.242*/243static void244set_mtrr(unsigned int reg, unsigned long base, unsigned long size, mtrr_type type)245{246struct set_mtrr_data data;247unsigned long flags;248int cpu;249250preempt_disable();251252data.smp_reg = reg;253data.smp_base = base;254data.smp_size = size;255data.smp_type = type;256atomic_set(&data.count, num_booting_cpus() - 1);257258/* Make sure data.count is visible before unleashing other CPUs */259smp_wmb();260atomic_set(&data.gate, 0);261262/* Start the ball rolling on other CPUs */263for_each_online_cpu(cpu) {264struct cpu_stop_work *work = &per_cpu(mtrr_work, cpu);265266if (cpu == smp_processor_id())267continue;268269stop_one_cpu_nowait(cpu, mtrr_work_handler, &data, work);270}271272273while (atomic_read(&data.count))274cpu_relax();275276/* Ok, reset count and toggle gate */277atomic_set(&data.count, num_booting_cpus() - 1);278smp_wmb();279atomic_set(&data.gate, 1);280281local_irq_save(flags);282283while (atomic_read(&data.count))284cpu_relax();285286/* Ok, reset count and toggle gate */287atomic_set(&data.count, num_booting_cpus() - 1);288smp_wmb();289atomic_set(&data.gate, 0);290291/* Do our MTRR business */292293/*294* HACK!295*296* We use this same function to initialize the mtrrs during boot,297* resume, runtime cpu online and on an explicit request to set a298* specific MTRR.299*300* During boot or suspend, the state of the boot cpu's mtrrs has been301* saved, and we want to replicate that across all the cpus that come302* online (either at the end of boot or resume or during a runtime cpu303* online). If we're doing that, @reg is set to something special and on304* this cpu we still do mtrr_if->set_all(). During boot/resume, this305* is unnecessary if at this point we are still on the cpu that started306* the boot/resume sequence. But there is no guarantee that we are still307* on the same cpu. So we do mtrr_if->set_all() on this cpu aswell to be308* sure that we are in sync with everyone else.309*/310if (reg != ~0U)311mtrr_if->set(reg, base, size, type);312else313mtrr_if->set_all();314315/* Wait for the others */316while (atomic_read(&data.count))317cpu_relax();318319atomic_set(&data.count, num_booting_cpus() - 1);320smp_wmb();321atomic_set(&data.gate, 1);322323/*324* Wait here for everyone to have seen the gate change325* So we're the last ones to touch 'data'326*/327while (atomic_read(&data.count))328cpu_relax();329330local_irq_restore(flags);331preempt_enable();332}333334/**335* mtrr_add_page - Add a memory type region336* @base: Physical base address of region in pages (in units of 4 kB!)337* @size: Physical size of region in pages (4 kB)338* @type: Type of MTRR desired339* @increment: If this is true do usage counting on the region340*341* Memory type region registers control the caching on newer Intel and342* non Intel processors. This function allows drivers to request an343* MTRR is added. The details and hardware specifics of each processor's344* implementation are hidden from the caller, but nevertheless the345* caller should expect to need to provide a power of two size on an346* equivalent power of two boundary.347*348* If the region cannot be added either because all regions are in use349* or the CPU cannot support it a negative value is returned. On success350* the register number for this entry is returned, but should be treated351* as a cookie only.352*353* On a multiprocessor machine the changes are made to all processors.354* This is required on x86 by the Intel processors.355*356* The available types are357*358* %MTRR_TYPE_UNCACHABLE - No caching359*360* %MTRR_TYPE_WRBACK - Write data back in bursts whenever361*362* %MTRR_TYPE_WRCOMB - Write data back soon but allow bursts363*364* %MTRR_TYPE_WRTHROUGH - Cache reads but not writes365*366* BUGS: Needs a quiet flag for the cases where drivers do not mind367* failures and do not wish system log messages to be sent.368*/369int mtrr_add_page(unsigned long base, unsigned long size,370unsigned int type, bool increment)371{372unsigned long lbase, lsize;373int i, replace, error;374mtrr_type ltype;375376if (!mtrr_if)377return -ENXIO;378379error = mtrr_if->validate_add_page(base, size, type);380if (error)381return error;382383if (type >= MTRR_NUM_TYPES) {384pr_warning("mtrr: type: %u invalid\n", type);385return -EINVAL;386}387388/* If the type is WC, check that this processor supports it */389if ((type == MTRR_TYPE_WRCOMB) && !have_wrcomb()) {390pr_warning("mtrr: your processor doesn't support write-combining\n");391return -ENOSYS;392}393394if (!size) {395pr_warning("mtrr: zero sized request\n");396return -EINVAL;397}398399if (base & size_or_mask || size & size_or_mask) {400pr_warning("mtrr: base or size exceeds the MTRR width\n");401return -EINVAL;402}403404error = -EINVAL;405replace = -1;406407/* No CPU hotplug when we change MTRR entries */408get_online_cpus();409410/* Search for existing MTRR */411mutex_lock(&mtrr_mutex);412for (i = 0; i < num_var_ranges; ++i) {413mtrr_if->get(i, &lbase, &lsize, <ype);414if (!lsize || base > lbase + lsize - 1 ||415base + size - 1 < lbase)416continue;417/*418* At this point we know there is some kind of419* overlap/enclosure420*/421if (base < lbase || base + size - 1 > lbase + lsize - 1) {422if (base <= lbase &&423base + size - 1 >= lbase + lsize - 1) {424/* New region encloses an existing region */425if (type == ltype) {426replace = replace == -1 ? i : -2;427continue;428} else if (types_compatible(type, ltype))429continue;430}431pr_warning("mtrr: 0x%lx000,0x%lx000 overlaps existing"432" 0x%lx000,0x%lx000\n", base, size, lbase,433lsize);434goto out;435}436/* New region is enclosed by an existing region */437if (ltype != type) {438if (types_compatible(type, ltype))439continue;440pr_warning("mtrr: type mismatch for %lx000,%lx000 old: %s new: %s\n",441base, size, mtrr_attrib_to_str(ltype),442mtrr_attrib_to_str(type));443goto out;444}445if (increment)446++mtrr_usage_table[i];447error = i;448goto out;449}450/* Search for an empty MTRR */451i = mtrr_if->get_free_region(base, size, replace);452if (i >= 0) {453set_mtrr(i, base, size, type);454if (likely(replace < 0)) {455mtrr_usage_table[i] = 1;456} else {457mtrr_usage_table[i] = mtrr_usage_table[replace];458if (increment)459mtrr_usage_table[i]++;460if (unlikely(replace != i)) {461set_mtrr(replace, 0, 0, 0);462mtrr_usage_table[replace] = 0;463}464}465} else {466pr_info("mtrr: no more MTRRs available\n");467}468error = i;469out:470mutex_unlock(&mtrr_mutex);471put_online_cpus();472return error;473}474475static int mtrr_check(unsigned long base, unsigned long size)476{477if ((base & (PAGE_SIZE - 1)) || (size & (PAGE_SIZE - 1))) {478pr_warning("mtrr: size and base must be multiples of 4 kiB\n");479pr_debug("mtrr: size: 0x%lx base: 0x%lx\n", size, base);480dump_stack();481return -1;482}483return 0;484}485486/**487* mtrr_add - Add a memory type region488* @base: Physical base address of region489* @size: Physical size of region490* @type: Type of MTRR desired491* @increment: If this is true do usage counting on the region492*493* Memory type region registers control the caching on newer Intel and494* non Intel processors. This function allows drivers to request an495* MTRR is added. The details and hardware specifics of each processor's496* implementation are hidden from the caller, but nevertheless the497* caller should expect to need to provide a power of two size on an498* equivalent power of two boundary.499*500* If the region cannot be added either because all regions are in use501* or the CPU cannot support it a negative value is returned. On success502* the register number for this entry is returned, but should be treated503* as a cookie only.504*505* On a multiprocessor machine the changes are made to all processors.506* This is required on x86 by the Intel processors.507*508* The available types are509*510* %MTRR_TYPE_UNCACHABLE - No caching511*512* %MTRR_TYPE_WRBACK - Write data back in bursts whenever513*514* %MTRR_TYPE_WRCOMB - Write data back soon but allow bursts515*516* %MTRR_TYPE_WRTHROUGH - Cache reads but not writes517*518* BUGS: Needs a quiet flag for the cases where drivers do not mind519* failures and do not wish system log messages to be sent.520*/521int mtrr_add(unsigned long base, unsigned long size, unsigned int type,522bool increment)523{524if (mtrr_check(base, size))525return -EINVAL;526return mtrr_add_page(base >> PAGE_SHIFT, size >> PAGE_SHIFT, type,527increment);528}529EXPORT_SYMBOL(mtrr_add);530531/**532* mtrr_del_page - delete a memory type region533* @reg: Register returned by mtrr_add534* @base: Physical base address535* @size: Size of region536*537* If register is supplied then base and size are ignored. This is538* how drivers should call it.539*540* Releases an MTRR region. If the usage count drops to zero the541* register is freed and the region returns to default state.542* On success the register is returned, on failure a negative error543* code.544*/545int mtrr_del_page(int reg, unsigned long base, unsigned long size)546{547int i, max;548mtrr_type ltype;549unsigned long lbase, lsize;550int error = -EINVAL;551552if (!mtrr_if)553return -ENXIO;554555max = num_var_ranges;556/* No CPU hotplug when we change MTRR entries */557get_online_cpus();558mutex_lock(&mtrr_mutex);559if (reg < 0) {560/* Search for existing MTRR */561for (i = 0; i < max; ++i) {562mtrr_if->get(i, &lbase, &lsize, <ype);563if (lbase == base && lsize == size) {564reg = i;565break;566}567}568if (reg < 0) {569pr_debug("mtrr: no MTRR for %lx000,%lx000 found\n",570base, size);571goto out;572}573}574if (reg >= max) {575pr_warning("mtrr: register: %d too big\n", reg);576goto out;577}578mtrr_if->get(reg, &lbase, &lsize, <ype);579if (lsize < 1) {580pr_warning("mtrr: MTRR %d not used\n", reg);581goto out;582}583if (mtrr_usage_table[reg] < 1) {584pr_warning("mtrr: reg: %d has count=0\n", reg);585goto out;586}587if (--mtrr_usage_table[reg] < 1)588set_mtrr(reg, 0, 0, 0);589error = reg;590out:591mutex_unlock(&mtrr_mutex);592put_online_cpus();593return error;594}595596/**597* mtrr_del - delete a memory type region598* @reg: Register returned by mtrr_add599* @base: Physical base address600* @size: Size of region601*602* If register is supplied then base and size are ignored. This is603* how drivers should call it.604*605* Releases an MTRR region. If the usage count drops to zero the606* register is freed and the region returns to default state.607* On success the register is returned, on failure a negative error608* code.609*/610int mtrr_del(int reg, unsigned long base, unsigned long size)611{612if (mtrr_check(base, size))613return -EINVAL;614return mtrr_del_page(reg, base >> PAGE_SHIFT, size >> PAGE_SHIFT);615}616EXPORT_SYMBOL(mtrr_del);617618/*619* HACK ALERT!620* These should be called implicitly, but we can't yet until all the initcall621* stuff is done...622*/623static void __init init_ifs(void)624{625#ifndef CONFIG_X86_64626amd_init_mtrr();627cyrix_init_mtrr();628centaur_init_mtrr();629#endif630}631632/* The suspend/resume methods are only for CPU without MTRR. CPU using generic633* MTRR driver doesn't require this634*/635struct mtrr_value {636mtrr_type ltype;637unsigned long lbase;638unsigned long lsize;639};640641static struct mtrr_value mtrr_value[MTRR_MAX_VAR_RANGES];642643static int mtrr_save(void)644{645int i;646647for (i = 0; i < num_var_ranges; i++) {648mtrr_if->get(i, &mtrr_value[i].lbase,649&mtrr_value[i].lsize,650&mtrr_value[i].ltype);651}652return 0;653}654655static void mtrr_restore(void)656{657int i;658659for (i = 0; i < num_var_ranges; i++) {660if (mtrr_value[i].lsize) {661set_mtrr(i, mtrr_value[i].lbase,662mtrr_value[i].lsize,663mtrr_value[i].ltype);664}665}666}667668669670static struct syscore_ops mtrr_syscore_ops = {671.suspend = mtrr_save,672.resume = mtrr_restore,673};674675int __initdata changed_by_mtrr_cleanup;676677/**678* mtrr_bp_init - initialize mtrrs on the boot CPU679*680* This needs to be called early; before any of the other CPUs are681* initialized (i.e. before smp_init()).682*683*/684void __init mtrr_bp_init(void)685{686u32 phys_addr;687688init_ifs();689690phys_addr = 32;691692if (cpu_has_mtrr) {693mtrr_if = &generic_mtrr_ops;694size_or_mask = 0xff000000; /* 36 bits */695size_and_mask = 0x00f00000;696phys_addr = 36;697698/*699* This is an AMD specific MSR, but we assume(hope?) that700* Intel will implement it to when they extend the address701* bus of the Xeon.702*/703if (cpuid_eax(0x80000000) >= 0x80000008) {704phys_addr = cpuid_eax(0x80000008) & 0xff;705/* CPUID workaround for Intel 0F33/0F34 CPU */706if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL &&707boot_cpu_data.x86 == 0xF &&708boot_cpu_data.x86_model == 0x3 &&709(boot_cpu_data.x86_mask == 0x3 ||710boot_cpu_data.x86_mask == 0x4))711phys_addr = 36;712713size_or_mask = ~((1ULL << (phys_addr - PAGE_SHIFT)) - 1);714size_and_mask = ~size_or_mask & 0xfffff00000ULL;715} else if (boot_cpu_data.x86_vendor == X86_VENDOR_CENTAUR &&716boot_cpu_data.x86 == 6) {717/*718* VIA C* family have Intel style MTRRs,719* but don't support PAE720*/721size_or_mask = 0xfff00000; /* 32 bits */722size_and_mask = 0;723phys_addr = 32;724}725} else {726switch (boot_cpu_data.x86_vendor) {727case X86_VENDOR_AMD:728if (cpu_has_k6_mtrr) {729/* Pre-Athlon (K6) AMD CPU MTRRs */730mtrr_if = mtrr_ops[X86_VENDOR_AMD];731size_or_mask = 0xfff00000; /* 32 bits */732size_and_mask = 0;733}734break;735case X86_VENDOR_CENTAUR:736if (cpu_has_centaur_mcr) {737mtrr_if = mtrr_ops[X86_VENDOR_CENTAUR];738size_or_mask = 0xfff00000; /* 32 bits */739size_and_mask = 0;740}741break;742case X86_VENDOR_CYRIX:743if (cpu_has_cyrix_arr) {744mtrr_if = mtrr_ops[X86_VENDOR_CYRIX];745size_or_mask = 0xfff00000; /* 32 bits */746size_and_mask = 0;747}748break;749default:750break;751}752}753754if (mtrr_if) {755set_num_var_ranges();756init_table();757if (use_intel()) {758get_mtrr_state();759760if (mtrr_cleanup(phys_addr)) {761changed_by_mtrr_cleanup = 1;762mtrr_if->set_all();763}764}765}766}767768void mtrr_ap_init(void)769{770if (!use_intel() || mtrr_aps_delayed_init)771return;772/*773* Ideally we should hold mtrr_mutex here to avoid mtrr entries774* changed, but this routine will be called in cpu boot time,775* holding the lock breaks it.776*777* This routine is called in two cases:778*779* 1. very earily time of software resume, when there absolutely780* isn't mtrr entry changes;781*782* 2. cpu hotadd time. We let mtrr_add/del_page hold cpuhotplug783* lock to prevent mtrr entry changes784*/785set_mtrr(~0U, 0, 0, 0);786}787788/**789* Save current fixed-range MTRR state of the BSP790*/791void mtrr_save_state(void)792{793smp_call_function_single(0, mtrr_save_fixed_ranges, NULL, 1);794}795796void set_mtrr_aps_delayed_init(void)797{798if (!use_intel())799return;800801mtrr_aps_delayed_init = true;802}803804/*805* Delayed MTRR initialization for all AP's806*/807void mtrr_aps_init(void)808{809if (!use_intel())810return;811812/*813* Check if someone has requested the delay of AP MTRR initialization,814* by doing set_mtrr_aps_delayed_init(), prior to this point. If not,815* then we are done.816*/817if (!mtrr_aps_delayed_init)818return;819820set_mtrr(~0U, 0, 0, 0);821mtrr_aps_delayed_init = false;822}823824void mtrr_bp_restore(void)825{826if (!use_intel())827return;828829mtrr_if->set_all();830}831832static int __init mtrr_init_finialize(void)833{834if (!mtrr_if)835return 0;836837if (use_intel()) {838if (!changed_by_mtrr_cleanup)839mtrr_state_warn();840return 0;841}842843/*844* The CPU has no MTRR and seems to not support SMP. They have845* specific drivers, we use a tricky method to support846* suspend/resume for them.847*848* TBD: is there any system with such CPU which supports849* suspend/resume? If no, we should remove the code.850*/851register_syscore_ops(&mtrr_syscore_ops);852853return 0;854}855subsys_initcall(mtrr_init_finialize);856857858