Project

General

Profile

Bug #2686 » 0001-Program-PAT-indices-5-as-WP-from-default-WT-and-6-as.patch

peeter, 06/28/2015 07:24 PM

View differences:

sys/platform/pc64/x86_64/pmap.c
1031 1031
		/*
1032 1032
		 * If we support the PAT then set-up entries for
1033 1033
		 * WRITE_PROTECTED and WRITE_COMBINING using bit patterns
1034
		 * 4 and 5.
1034
		 * 5 and 6.
1035 1035
		 */
1036
		pat_msr = (pat_msr & ~PAT_MASK(4)) |
1037
			  PAT_VALUE(4, PAT_WRITE_PROTECTED);
1038 1036
		pat_msr = (pat_msr & ~PAT_MASK(5)) |
1039
			  PAT_VALUE(5, PAT_WRITE_COMBINING);
1040
		pat_pte_index[PAT_WRITE_PROTECTED] = X86_PG_PTE_PAT | 0;
1041
		pat_pte_index[PAT_WRITE_COMBINING] = X86_PG_PTE_PAT | X86_PG_NC_PWT;
1037
			  PAT_VALUE(5, PAT_WRITE_PROTECTED);
1038
		pat_msr = (pat_msr & ~PAT_MASK(6)) |
1039
			  PAT_VALUE(6, PAT_WRITE_COMBINING);
1040
		pat_pte_index[PAT_WRITE_PROTECTED] = X86_PG_PTE_PAT | X86_PG_NC_PWT;
1041
		pat_pte_index[PAT_WRITE_COMBINING] = X86_PG_PTE_PAT | X86_PG_NC_PCD;
1042 1042

  
1043 1043
		/*
1044 1044
		 * Then enable the PAT
(4-4/7)