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
/*
* If we support the PAT then set-up entries for
* WRITE_PROTECTED and WRITE_COMBINING using bit patterns
* 4 and 5.
* 5 and 6.
*/
pat_msr = (pat_msr & ~PAT_MASK(4)) |
PAT_VALUE(4, PAT_WRITE_PROTECTED);
pat_msr = (pat_msr & ~PAT_MASK(5)) |
PAT_VALUE(5, PAT_WRITE_COMBINING);
pat_pte_index[PAT_WRITE_PROTECTED] = X86_PG_PTE_PAT | 0;
pat_pte_index[PAT_WRITE_COMBINING] = X86_PG_PTE_PAT | X86_PG_NC_PWT;
PAT_VALUE(5, PAT_WRITE_PROTECTED);
pat_msr = (pat_msr & ~PAT_MASK(6)) |
PAT_VALUE(6, PAT_WRITE_COMBINING);
pat_pte_index[PAT_WRITE_PROTECTED] = X86_PG_PTE_PAT | X86_PG_NC_PWT;
pat_pte_index[PAT_WRITE_COMBINING] = X86_PG_PTE_PAT | X86_PG_NC_PCD;
/*
* Then enable the PAT
(4-4/7)