Changeset de96d3b in mainline for kernel/arch/amd64/src/amd64.c


Ignore:
Timestamp:
2024-01-03T16:54:15Z (4 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master, topic/simplify-dev-export
Children:
00e6288, 25e1490
Parents:
7130754
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2024-01-01 04:12:52)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2024-01-03 16:54:15)
Message:

On x86 CPUs supporting it, use write-combining memory mode for framebuffer

With this, kernel printouts are about three times faster in QEMU.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/src/amd64.c

    r7130754 rde96d3b  
    6060#include <arch/vreg.h>
    6161#include <arch/kseg.h>
     62#include <arch/mm/pat.h>
    6263#include <genarch/pic/pic_ops.h>
    6364
     
    115116        /* Disable alignment check */
    116117        write_cr0(read_cr0() & ~CR0_AM);
     118
     119        /* Use PCD+PWT bit combination in PTE to mean write-combining mode. */
     120        if (pat_supported())
     121                pat_set_mapping(false, true, true, PAT_TYPE_WRITE_COMBINING);
    117122
    118123        if (config.cpu_active == 1) {
Note: See TracChangeset for help on using the changeset viewer.