mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:38:10 +00:00
Kernel: Let's try disabling the CPU's page-level caching for framebuffers.
This commit is contained in:
parent
44e1a45b2a
commit
458706c4cf
2 changed files with 24 additions and 1 deletions
|
@ -114,6 +114,7 @@ private:
|
|||
bool m_anonymous { false };
|
||||
off_t m_inode_offset { 0 };
|
||||
size_t m_size { 0 };
|
||||
bool m_allow_cpu_caching { true };
|
||||
RetainPtr<Inode> m_inode;
|
||||
Vector<RetainPtr<PhysicalPage>> m_physical_pages;
|
||||
Lock m_paging_lock;
|
||||
|
@ -292,6 +293,8 @@ private:
|
|||
Present = 1 << 0,
|
||||
ReadWrite = 1 << 1,
|
||||
UserSupervisor = 1 << 2,
|
||||
WriteThrough = 1 << 3,
|
||||
CacheDisabled = 1 << 4,
|
||||
};
|
||||
|
||||
bool is_present() const { return raw() & Present; }
|
||||
|
@ -303,6 +306,12 @@ private:
|
|||
bool is_writable() const { return raw() & ReadWrite; }
|
||||
void set_writable(bool b) { set_bit(ReadWrite, b); }
|
||||
|
||||
bool is_write_through() const { return raw() & WriteThrough; }
|
||||
void set_write_through(bool b) { set_bit(WriteThrough, b); }
|
||||
|
||||
bool is_cache_disabled() const { return raw() & CacheDisabled; }
|
||||
void set_cache_disabled(bool b) { set_bit(CacheDisabled, b); }
|
||||
|
||||
void set_bit(byte bit, bool value)
|
||||
{
|
||||
if (value)
|
||||
|
@ -331,6 +340,8 @@ private:
|
|||
Present = 1 << 0,
|
||||
ReadWrite = 1 << 1,
|
||||
UserSupervisor = 1 << 2,
|
||||
WriteThrough = 1 << 3,
|
||||
CacheDisabled = 1 << 4,
|
||||
};
|
||||
|
||||
bool is_present() const { return raw() & Present; }
|
||||
|
@ -342,6 +353,12 @@ private:
|
|||
bool is_writable() const { return raw() & ReadWrite; }
|
||||
void set_writable(bool b) { set_bit(ReadWrite, b); }
|
||||
|
||||
bool is_write_through() const { return raw() & WriteThrough; }
|
||||
void set_write_through(bool b) { set_bit(WriteThrough, b); }
|
||||
|
||||
bool is_cache_disabled() const { return raw() & CacheDisabled; }
|
||||
void set_cache_disabled(bool b) { set_bit(CacheDisabled, b); }
|
||||
|
||||
void set_bit(byte bit, bool value)
|
||||
{
|
||||
if (value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue