From 22d3dfbcd4c606d40e5ae36970db4661c302859f Mon Sep 17 00:00:00 2001 From: bunnei Date: Sun, 3 Mar 2019 23:54:16 -0500 Subject: gpu: Rewrite virtual memory manager using PageTable. --- src/common/page_table.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/common/page_table.h') diff --git a/src/common/page_table.h b/src/common/page_table.h index 8339f2890..8b8ff0bb8 100644 --- a/src/common/page_table.h +++ b/src/common/page_table.h @@ -21,6 +21,8 @@ enum class PageType : u8 { RasterizerCachedMemory, /// Page is mapped to a I/O region. Writing and reading to this page is handled by functions. Special, + /// Page is allocated for use. + Allocated, }; struct SpecialRegion { @@ -66,7 +68,7 @@ struct PageTable { * Contains MMIO handlers that back memory regions whose entries in the `attribute` vector is * of type `Special`. */ - boost::icl::interval_map> special_regions; + boost::icl::interval_map> special_regions; /** * Vector of fine grained page attributes. If it is set to any value other than `Memory`, then @@ -74,6 +76,8 @@ struct PageTable { */ std::vector attributes; + std::vector backing_addr; + const std::size_t page_size_in_bits{}; }; -- cgit v1.2.3