Lines Matching +full:low +full:- +full:power +full:- +full:disable
1 // SPDX-License-Identifier: GPL-2.0
13 unsigned long low, high; in amd_get_mtrr() local
15 rdmsr(MSR_K6_UWCCR, low, high); in amd_get_mtrr()
18 low = high; in amd_get_mtrr()
20 *base = (low & 0xFFFE0000) >> PAGE_SHIFT; in amd_get_mtrr()
22 if (low & 1) in amd_get_mtrr()
24 if (low & 2) in amd_get_mtrr()
26 if (!(low & 3)) { in amd_get_mtrr()
45 low = (~low) & 0x1FFFC; in amd_get_mtrr()
46 *size = (low + 4) << (15 - PAGE_SHIFT); in amd_get_mtrr()
50 * amd_set_mtrr - Set variable MTRR register on the local CPU.
65 * Low is MTRR0, High MTRR 1 in amd_set_mtrr()
69 * Blank to disable in amd_set_mtrr()
81 * But ~(x - 1) == ~x + 1 == -x. Two's complement rocks! in amd_set_mtrr()
83 regs[reg] = (-size >> (15 - PAGE_SHIFT) & 0x0001FFFC) in amd_set_mtrr()
89 * disable local interrupts, write back the cache, set the mtrr in amd_set_mtrr()
103 * o Power of 2 block in amd_validate_add_page()
104 * o base suitably aligned to the power in amd_validate_add_page()
106 if (type > MTRR_TYPE_WRCOMB || size < (1 << (17 - PAGE_SHIFT)) in amd_validate_add_page()
107 || (size & ~(size - 1)) - size || (base & (size - 1))) in amd_validate_add_page()
108 return -EINVAL; in amd_validate_add_page()