Ignore:
Timestamp:
2024-02-23T17:57:23Z (17 months ago)
Author:
GitHub <noreply@…>
Children:
192019f
Parents:
86f862c (diff), 90ba06c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
boba-buba <120932204+boba-buba@…> (2024-02-23 17:57:23)
git-committer:
GitHub <noreply@…> (2024-02-23 17:57:23)
Message:

Merge branch 'HelenOS:master' into topic/packet-capture

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/include/arch/mm/page.h

    r86f862c rf2cb80a  
    192192        unsigned int accessed : 1;
    193193        unsigned int dirty : 1;
    194         unsigned int unused : 1;
     194        unsigned int pat : 1;
    195195        unsigned int global : 1;
    196196        unsigned int soft_valid : 1;  /**< Valid content even if present bit is cleared. */
     
    211211            p->writeable << PAGE_WRITE_SHIFT |
    212212            (!p->no_execute) << PAGE_EXEC_SHIFT |
    213             p->global << PAGE_GLOBAL_SHIFT);
     213            p->global << PAGE_GLOBAL_SHIFT |
     214            p->page_write_through << PAGE_WRITE_COMBINE_SHIFT);
    214215}
    215216
     
    225226        pte_t *p = &pt[i];
    226227
    227         p->page_cache_disable = !(flags & PAGE_CACHEABLE);
    228228        p->present = !(flags & PAGE_NOT_PRESENT);
    229229        p->uaccessible = (flags & PAGE_USER) != 0;
     
    232232        p->global = (flags & PAGE_GLOBAL) != 0;
    233233
     234        if (flags & PAGE_WRITE_COMBINE) {
     235                /* We have mapped PCD+PWT bits to write-combine mode via PAT MSR. */
     236                /* (If PAT is unsupported, it will default to uncached.) */
     237                p->page_cache_disable = 1;
     238                p->page_write_through = 1;
     239        } else {
     240                p->page_cache_disable = !(flags & PAGE_CACHEABLE);
     241                p->page_write_through = 0;
     242        }
     243
    234244        /*
    235245         * Ensure that there is at least one bit set even if the present bit is cleared.
Note: See TracChangeset for help on using the changeset viewer.