svga_limits.h revision 6df26cac
16df26cacSmrg/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/vmware/svga_limits.h,v 1.1 2001/04/05 19:29:44 dawes Exp $ */
26df26cacSmrg/* **********************************************************
36df26cacSmrg * Copyright (C) 1998-2001 VMware, Inc.
46df26cacSmrg * All Rights Reserved
56df26cacSmrg * $Id: svga_limits.h,v 1.1.1.1 2008/08/02 05:18:37 mrg Exp $
66df26cacSmrg * **********************************************************/
76df26cacSmrg
86df26cacSmrg/*
96df26cacSmrg * svga_limits.h --
106df26cacSmrg *
116df26cacSmrg * SVGA limits
126df26cacSmrg */
136df26cacSmrg
146df26cacSmrg#ifndef _SVGA_LIMITS_H_
156df26cacSmrg#define _SVGA_LIMITS_H_
166df26cacSmrg
176df26cacSmrg#define INCLUDE_ALLOW_USERLEVEL
186df26cacSmrg#define INCLUDE_ALLOW_MONITOR
196df26cacSmrg#include "includeCheck.h"
206df26cacSmrg
216df26cacSmrg/*
226df26cacSmrg * Location and size of SVGA frame buffer and the FIFO.
236df26cacSmrg */
246df26cacSmrg#define SVGA_VRAM_SIZE         (16*1024*1024)
256df26cacSmrg#define SVGA_MEM_SIZE          (256*1024)
266df26cacSmrg
276df26cacSmrg/*
286df26cacSmrg * SVGA_FB_START is the default starting address of the SVGA frame
296df26cacSmrg * buffer in the guest's physical address space.
306df26cacSmrg * SVGA_FB_START_BIGMEM is the starting address of the SVGA frame
316df26cacSmrg * buffer for VMs that have a large amount of physical memory.
326df26cacSmrg *
336df26cacSmrg * The address of SVGA_FB_START is set to 2GB - (SVGA_FB_MAX_SIZE + SVGA_MEM_SIZE),
346df26cacSmrg * thus the SVGA frame buffer sits at [SVGA_FB_START .. 2GB-1] in the
356df26cacSmrg * physical address space.  Our older SVGA drivers for NT treat the
366df26cacSmrg * address of the frame buffer as a signed integer.  For backwards
376df26cacSmrg * compatibility, we keep the default location of the frame buffer
386df26cacSmrg * at under 2GB in the address space.  This restricts VMs to have "only"
396df26cacSmrg * up to ~2031MB (i.e., up to SVGA_FB_START) of physical memory.
406df26cacSmrg *
416df26cacSmrg * For VMs that want more memory than the ~2031MB, we place the SVGA
426df26cacSmrg * frame buffer at SVGA_FB_START_BIGMEM.  This allows VMs to have up
436df26cacSmrg * to 3584MB, at least as far as the SVGA frame buffer is concerned
446df26cacSmrg * (note that there may be other issues that limit the VM memory
456df26cacSmrg * size).  PCI devices use high memory addresses, so we have to put
466df26cacSmrg * SVGA_FB_START_BIGMEM low enough so that it doesn't overlap with any
476df26cacSmrg * of these devices.  Placing SVGA_FB_START_BIGMEM at 0xE0000000
486df26cacSmrg * should leave plenty of room for the PCI devices.
496df26cacSmrg *
506df26cacSmrg * NOTE: All of that is only true for the 0710 chipset.  As of the 0405
516df26cacSmrg * chipset, the framebuffer start is determined solely based on the value
526df26cacSmrg * the guest BIOS or OS programs into the PCI base address registers.
536df26cacSmrg */
546df26cacSmrg#define SVGA_FB_LEGACY_START		0x7EFC0000
556df26cacSmrg#define SVGA_FB_LEGACY_START_BIGMEM	0xE0000000
566df26cacSmrg
576df26cacSmrg#endif
58