summaryrefslogtreecommitdiff
path: root/src/svga_limits.h
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-14 16:48:55 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-14 16:48:55 +0000
commit0b01e22c9cd727cce23c4a9670806f7a839e1937 (patch)
treec45d8ec9eae889f01eed015235e6887a014f47a2 /src/svga_limits.h
Initial revision
Diffstat (limited to 'src/svga_limits.h')
-rw-r--r--src/svga_limits.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/svga_limits.h b/src/svga_limits.h
new file mode 100644
index 0000000..016c2b8
--- /dev/null
+++ b/src/svga_limits.h
@@ -0,0 +1,57 @@
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/vmware/svga_limits.h,v 1.2 2002/10/16 22:12:53 alanh Exp $ */
+/* **********************************************************
+ * Copyright (C) 1998-2001 VMware, Inc.
+ * All Rights Reserved
+ * $Id$
+ * **********************************************************/
+
+/*
+ * svga_limits.h --
+ *
+ * SVGA limits
+ */
+
+#ifndef _SVGA_LIMITS_H_
+#define _SVGA_LIMITS_H_
+
+#define INCLUDE_ALLOW_USERLEVEL
+#define INCLUDE_ALLOW_MONITOR
+#include "includeCheck.h"
+
+/*
+ * Location and size of SVGA frame buffer and the FIFO.
+ */
+#define SVGA_VRAM_SIZE (16*1024*1024)
+#define SVGA_MEM_SIZE (256*1024)
+
+/*
+ * SVGA_FB_START is the default starting address of the SVGA frame
+ * buffer in the guest's physical address space.
+ * SVGA_FB_START_BIGMEM is the starting address of the SVGA frame
+ * buffer for VMs that have a large amount of physical memory.
+ *
+ * The address of SVGA_FB_START is set to 2GB - (SVGA_FB_MAX_SIZE + SVGA_MEM_SIZE),
+ * thus the SVGA frame buffer sits at [SVGA_FB_START .. 2GB-1] in the
+ * physical address space. Our older SVGA drivers for NT treat the
+ * address of the frame buffer as a signed integer. For backwards
+ * compatibility, we keep the default location of the frame buffer
+ * at under 2GB in the address space. This restricts VMs to have "only"
+ * up to ~2031MB (i.e., up to SVGA_FB_START) of physical memory.
+ *
+ * For VMs that want more memory than the ~2031MB, we place the SVGA
+ * frame buffer at SVGA_FB_START_BIGMEM. This allows VMs to have up
+ * to 3584MB, at least as far as the SVGA frame buffer is concerned
+ * (note that there may be other issues that limit the VM memory
+ * size). PCI devices use high memory addresses, so we have to put
+ * SVGA_FB_START_BIGMEM low enough so that it doesn't overlap with any
+ * of these devices. Placing SVGA_FB_START_BIGMEM at 0xE0000000
+ * should leave plenty of room for the PCI devices.
+ *
+ * NOTE: All of that is only true for the 0710 chipset. As of the 0405
+ * chipset, the framebuffer start is determined solely based on the value
+ * the guest BIOS or OS programs into the PCI base address registers.
+ */
+#define SVGA_FB_LEGACY_START 0x7EFC0000
+#define SVGA_FB_LEGACY_START_BIGMEM 0xE0000000
+
+#endif