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