summaryrefslogtreecommitdiffstats
path: root/docs/templates/development/overview
diff options
context:
space:
mode:
Diffstat (limited to 'docs/templates/development/overview')
0 files changed, 0 insertions, 0 deletions
color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*
 * 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.
 *
 * Copyright (C) 2001, 2003 Keith M Wesolowski
 * Copyright (C) 2005 Ilya A. Volynets <ilya@total-knowledge.com>
 */
#include <linux/types.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <asm/bootinfo.h>
#include <asm/io.h>
#include <asm/mipsregs.h>
#include <asm/page.h>
#include <asm/ip32/crime.h>
#include <asm/ip32/mace.h>

struct sgi_crime __iomem *crime;
struct sgi_mace __iomem *mace;

EXPORT_SYMBOL_GPL(mace);

void __init crime_init(void)
{
	unsigned int id, rev;
	const int field = 2 * sizeof(unsigned long);

	set_io_port_base((unsigned long) ioremap(MACEPCI_LOW_IO, 0x2000000));
	crime = ioremap(CRIME_BASE, sizeof(struct sgi_crime));
	mace = ioremap(MACE_BASE, sizeof(struct sgi_mace));

	id = crime->id;
	rev = id & CRIME_ID_REV;
	id = (id & CRIME_ID_IDBITS) >> 4;
	printk(KERN_INFO "CRIME id %1x rev %d at 0x%0*lx\n",
	       id, rev, field, (unsigned long) CRIME_BASE);
}

irqreturn_t crime_memerr_intr(unsigned int irq, void *dev_id)
{
	unsigned long stat, addr;
	int fatal = 0;

	stat = crime->mem_error_stat & CRIME_MEM_ERROR_STAT_MASK;
	addr = crime->mem_error_addr & CRIME_MEM_ERROR_ADDR_MASK;

	printk("CRIME memory error at 0x%08lx ST 0x%08lx<", addr, stat);

	if (stat & CRIME_MEM_ERROR_INV)
		printk("INV,");
	if (stat & CRIME_MEM_ERROR_ECC) {
		unsigned long ecc_syn =
			crime->mem_ecc_syn & CRIME_MEM_ERROR_ECC_SYN_MASK;
		unsigned long ecc_gen =
			crime->mem_ecc_chk & CRIME_MEM_ERROR_ECC_CHK_MASK;
		printk("ECC,SYN=0x%08lx,GEN=0x%08lx,", ecc_syn, ecc_gen);
	}
	if (stat & CRIME_MEM_ERROR_MULTIPLE) {
		fatal = 1;
		printk("MULTIPLE,");
	}
	if (stat & CRIME_MEM_ERROR_HARD_ERR) {
		fatal = 1;
		printk("HARD,");
	}
	if (stat & CRIME_MEM_ERROR_SOFT_ERR)
		printk("SOFT,");
	if (stat & CRIME_MEM_ERROR_CPU_ACCESS)
		printk("CPU,");
	if (stat & CRIME_MEM_ERROR_VICE_ACCESS)
		printk("VICE,");
	if (stat & CRIME_MEM_ERROR_GBE_ACCESS)
		printk("GBE,");
	if (stat & CRIME_MEM_ERROR_RE_ACCESS)
		printk("RE,REID=0x%02lx,", (stat & CRIME_MEM_ERROR_RE_ID)>>8);
	if (stat & CRIME_MEM_ERROR_MACE_ACCESS)
		printk("MACE,MACEID=0x%02lx,", stat & CRIME_MEM_ERROR_MACE_ID);

	crime->mem_error_stat = 0;

	if (fatal) {
		printk("FATAL>\n");
		panic("Fatal memory error.");
	} else
		printk("NONFATAL>\n");

	return IRQ_HANDLED;
}

irqreturn_t crime_cpuerr_intr(unsigned int irq, void *dev_id)
{
	unsigned long stat = crime->cpu_error_stat & CRIME_CPU_ERROR_MASK;
	unsigned long addr = crime->cpu_error_addr & CRIME_CPU_ERROR_ADDR_MASK;

	addr <<= 2;
	printk("CRIME CPU error at 0x%09lx status 0x%08lx\n", addr, stat);
	crime->cpu_error_stat = 0;

	return IRQ_HANDLED;
}