diff options
author | Dave Airlie <airlied@linux.ie> | 2005-10-09 10:36:50 +0000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2005-10-09 10:36:50 +0000 |
commit | 524fb1440760a14c53fb3f238aad6c3cdb7e6a08 (patch) | |
tree | f6c825d3f990238c7229614d2ac739f59335feda /src/radeon_exa.c | |
parent | e526211b86ec5343002978debfcf78f74a10c69e (diff) |
Secure the Radeon PCIE GART tables in framebuffer memory by not allowingXORG-6_8_99_901
the clients to get access to a secure area of framebuffer.
Diffstat (limited to 'src/radeon_exa.c')
-rw-r--r-- | src/radeon_exa.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/radeon_exa.c b/src/radeon_exa.c index 9e962869..3cbadf01 100644 --- a/src/radeon_exa.c +++ b/src/radeon_exa.c @@ -380,7 +380,7 @@ Bool RADEONSetupMemEXA (ScreenPtr pScreen) screen_size = pScrn->virtualY * byteStride; info->exa.card.memoryBase = info->FB + pScrn->fbOffset; - info->exa.card.memorySize = info->FbMapSize; + info->exa.card.memorySize = info->FbMapSize - info->FbSecureSize; info->exa.card.offScreenBase = screen_size; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Allocating from a screen of %ld kb\n", @@ -397,17 +397,14 @@ Bool RADEONSetupMemEXA (ScreenPtr pScreen) info->frontOffset = 0; info->frontPitch = pScrn->displayWidth; - if ((info->cardType==CARD_PCIE) && info->drmMinor >= 19) { - info->pciGartSize = RADEON_PCIGART_TABLE_SIZE; - info->pciGartOffset = RADEON_ALIGN(info->exa.card.offScreenBase, - 256); - info->exa.card.offScreenBase = info->pciGartOffset + - info->pciGartSize; - xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Will use %d kb for PCI GART at offset 0x%08x\n", - RADEON_PCIGART_TABLE_SIZE / 1024, - (int)info->pciGartOffset); - } + RADEONDRIAllocatePCIGARTTable(pScreen); + + if (info->cardType==CARD_PCIE) + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Will use %d kb for PCI GART at offset 0x%08x\n", + RADEON_PCIGART_TABLE_SIZE / 1024, + (int)info->pciGartOffset); + /* Reserve a static area for the back buffer the same size as the * visible screen. XXX: This would be better initialized in ati_dri.c * when GLX is set up, but the offscreen memory manager's allocations |