summaryrefslogtreecommitdiffstats
path: root/include/asm-mips64
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2001-03-18 04:20:23 +0000
committerRalf Baechle <ralf@linux-mips.org>2001-03-18 04:20:23 +0000
commite62014c38d171383c54eb1fee183f14f592521fc (patch)
tree4b7633718336d145b6173478d26a39cb9dcfe088 /include/asm-mips64
parentc66599c66b70d522363bceb2dec263e76470a3c8 (diff)
Lots of cleanup from Keith with additional tweaks by me. More to
come. Stay frightened :-)
Diffstat (limited to 'include/asm-mips64')
-rw-r--r--include/asm-mips64/bootinfo.h23
-rw-r--r--include/asm-mips64/pgtable.h20
-rw-r--r--include/asm-mips64/rrm.h88
-rw-r--r--include/asm-mips64/sgialib.h4
4 files changed, 128 insertions, 7 deletions
diff --git a/include/asm-mips64/bootinfo.h b/include/asm-mips64/bootinfo.h
index dadcc4872..2c1d40205 100644
--- a/include/asm-mips64/bootinfo.h
+++ b/include/asm-mips64/bootinfo.h
@@ -144,6 +144,11 @@
#define CL_SIZE (80)
+#define BOOT_MEM_MAP_MAX 32
+#define BOOT_MEM_RAM 1
+#define BOOT_MEM_ROM_DATA 2
+#define BOOT_MEM_RESERVED 3
+
#ifndef _LANGUAGE_ASSEMBLY
/*
@@ -160,6 +165,24 @@ extern unsigned long mips_machtype;
extern unsigned long mips_machgroup;
extern unsigned long mips_tlb_entries;
+/*
+ * A memory map that's built upon what was determined
+ * or specified on the command line.
+ */
+struct boot_mem_map {
+ int nr_map;
+ struct {
+ unsigned long addr; /* start of memory segment */
+ unsigned long size; /* size of memory segment */
+ long type; /* type of memory segment */
+ } map[BOOT_MEM_MAP_MAX];
+};
+
+extern struct boot_mem_map boot_mem_map;
+
+extern void add_memory_region(unsigned long start, unsigned long size,
+ long type);
+
#endif /* _LANGUAGE_ASSEMBLY */
#endif /* _ASM_BOOTINFO_H */
diff --git a/include/asm-mips64/pgtable.h b/include/asm-mips64/pgtable.h
index 14fc10bb3..431b4f9ff 100644
--- a/include/asm-mips64/pgtable.h
+++ b/include/asm-mips64/pgtable.h
@@ -177,15 +177,25 @@ extern void (*_flush_cache_l1)(void);
#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_MODIFIED | _CACHE_MASK)
-#define PAGE_NONE __pgprot(_PAGE_PRESENT | _CACHE_CACHABLE_COW)
+#ifdef CONFIG_MIPS_UNCACHED
+#define PAGE_CACHABLE_DEFAULT _CACHE_UNCACHED
+#else /* ! UNCACHED */
+#ifdef CONFIG_SGI_IP22
+#define PAGE_CACHABLE_DEFAULT _CACHE_CACHABLE_NONCOHERENT
+#else /* ! IP22 */
+#define PAGE_CACHABLE_DEFAULT _CACHE_CACHABLE_COW
+#endif /* IP22 */
+#endif /* UNCACHED */
+
+#define PAGE_NONE __pgprot(_PAGE_PRESENT | PAGE_CACHABLE_DEFAULT)
#define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_READ | _PAGE_WRITE | \
- _CACHE_CACHABLE_COW)
+ PAGE_CACHABLE_DEFAULT)
#define PAGE_COPY __pgprot(_PAGE_PRESENT | _PAGE_READ | \
- _CACHE_CACHABLE_COW)
+ PAGE_CACHABLE_DEFAULT)
#define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_READ | \
- _CACHE_CACHABLE_COW)
+ PAGE_CACHABLE_DEFAULT)
#define PAGE_KERNEL __pgprot(_PAGE_PRESENT | __READABLE | __WRITEABLE | \
- _CACHE_CACHABLE_COW)
+ PAGE_CACHABLE_DEFAULT)
#define PAGE_USERIO __pgprot(_PAGE_PRESENT | _PAGE_READ | _PAGE_WRITE | \
_CACHE_UNCACHED)
#define PAGE_KERNEL_UNCACHED __pgprot(_PAGE_PRESENT | __READABLE | __WRITEABLE | \
diff --git a/include/asm-mips64/rrm.h b/include/asm-mips64/rrm.h
new file mode 100644
index 000000000..501fa6c1e
--- /dev/null
+++ b/include/asm-mips64/rrm.h
@@ -0,0 +1,88 @@
+/*
+ * SGI Rendering Resource Manager API (?).
+ *
+ * written by Miguel de Icaza (miguel@nuclecu.unam.mx)
+ *
+ * Ok, even if SGI choosed to do mmap trough ioctls, their
+ * kernel support for virtualizing the graphics card is nice.
+ *
+ * We should be able to make graphic applications on Linux
+ * fly.
+ *
+ * This header file should be included from GNU libc as well.
+ */
+
+
+/* Why like this you say? Well, gdb can print enums */
+#define RRM_BASE 1000
+#define RRM_CMD_LIMIT (RRM_BASE + 100)
+
+enum {
+ RRM_OPENRN = RRM_BASE, /* open rendering node */
+ RRM_CLOSERN,
+ RRM_BINDPROCTORN, /* set current rendering region for node */
+ RRM_BINDRNTOCLIP,
+ RRM_UNBINDRNFROMCLIP,
+ RRM_SWAPBUF,
+ RRM_SETSWAPINTERVAL,
+ RRM_WAITFORRETRACE,
+ RRM_SETDISPLAYMODE,
+ RRM_MESSAGE,
+ RRM_INVALIDATERN,
+ RRM_VALIDATECLIP,
+ RRM_VALIDATESWAPBUF,
+ RRM_SWAPGROUP,
+ RRM_SWAPUNGROUP,
+ RRM_VALIDATEMESSAGE,
+ RRM_GETDISPLAYMODES,
+ RRM_LOADDISPLAYMODE,
+ RRM_CUSHIONBUFFER,
+ RRM_SWAPREADY,
+ RRM_MGR_SWAPBUF,
+ RRM_SETVSYNC,
+ RRM_GETVSYNC,
+ RRM_WAITVSYNC,
+ RRM_BINDRNTOREADANDCLIP,
+ RRM_MAPCLIPTOSWPBUFID
+};
+
+/* Parameters for the above ioctls
+ *
+ * All of the ioctls take as their first argument the rendering node id.
+ *
+ */
+
+/*
+ * RRM_OPENRN:
+ *
+ * This is called by the IRIX X server with:
+ * rnid = 0xffffffff rmask = 0
+ *
+ * Returns a number like this: 0x10001.
+ * If you run the X server over and over, you get a value
+ * that is of the form (n * 0x10000) + 1.
+ *
+ * The return value seems to be the RNID.
+ */
+struct RRM_OpenRN {
+ int rnid;
+ unsigned int rmask;
+};
+
+struct RRM_CloseRN {
+ int rnid;
+};
+
+/*
+ * RRM_BINDPROCTORN:
+ *
+ * Return value when the X server calls it: 0
+ */
+struct RRM_BindProcToRN {
+ int rnid;
+};
+
+#ifdef __KERNEL__
+int rrm_command (unsigned int cmd, void *arg);
+int rrm_close (struct inode *inode, struct file *file);
+#endif
diff --git a/include/asm-mips64/sgialib.h b/include/asm-mips64/sgialib.h
index ab02c8fd9..16444eff8 100644
--- a/include/asm-mips64/sgialib.h
+++ b/include/asm-mips64/sgialib.h
@@ -1,5 +1,4 @@
-/* $Id: sgialib.h,v 1.3 1999/12/04 03:59:12 ralf Exp $
- *
+/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
@@ -7,6 +6,7 @@
* SGI ARCS firmware interface library for the Linux kernel.
*
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
+ * Copyright (C) 2001 Ralf Baechle (ralf@gnu.org)
*/
#ifndef _ASM_SGIALIB_H
#define _ASM_SGIALIB_H