diff options
author | Eric Anholt <eric@anholt.net> | 2007-04-30 17:13:09 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2007-04-30 19:15:24 -0700 |
commit | a4f1a7872f6f959bb4bc6568face710bee3589de (patch) | |
tree | 1ba5d1c8338b55ecbda56aa454e29bda39508046 /src/i810_reg.h | |
parent | 7d0d34cfdcc67d07e7667e13a9413743853134f8 (diff) |
Allow physical-memory allocations within stolen memory.
Because stolen memory happens to be a contiguous block of high system memory,
we can just read the GTT entries for it to get physical addresses for our
allocations there if needed. This reduces fragmentation of the aperture space,
and will often reclaim up to 7 MB of memory that had been left unused since the
simplified aperture manager was put in place, but without reintroducing the
complexities of the old aperture manager.
Diffstat (limited to 'src/i810_reg.h')
-rw-r--r-- | src/i810_reg.h | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/i810_reg.h b/src/i810_reg.h index bc944fe5..491c3894 100644 --- a/src/i810_reg.h +++ b/src/i810_reg.h @@ -526,6 +526,15 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define PGETBL_SIZE_256KB (1 << 1) #define PGETBL_SIZE_128KB (2 << 1) +#define I830_PTE_BASE 0x10000 +#define PTE_ADDRESS_MASK 0xfffff000 +#define PTE_ADDRESS_MASK_HIGH 0x000000f0 /* i915+ */ +#define PTE_MAPPING_TYPE_UNCACHED (0 << 1) +#define PTE_MAPPING_TYPE_DCACHE (1 << 1) /* i830 only */ +#define PTE_MAPPING_TYPE_CACHED (3 << 1) +#define PTE_MAPPING_TYPE_MASK (3 << 1) +#define PTE_VALID (1 << 0) + /** @defgroup PGE_ERR * @{ */ @@ -577,18 +586,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # define PGTBL_ERR_HOST_GTT_PTE (1 << 0) /** @} */ -/* Page table entries loaded via mmio region, p323 - */ -#define PTE_BASE 0x10000 -#define PTE_ADDR_MASK 0x3FFFF000 -#define PTE_TYPE_MASK 0x00000006 -#define PTE_LOCAL 0x00000002 -#define PTE_MAIN_UNCACHED 0x00000000 -#define PTE_MAIN_CACHED 0x00000006 -#define PTE_VALID_MASK 0x00000001 -#define PTE_VALID 0x00000001 - - /* Ring buffer registers, p277, overview p19 */ #define LP_RING 0x2030 |