blob: ebbb8c0744c798eb0d68a2014488944aa5a82685 [file] [log] [blame]
Kumar Galac24a9052009-08-14 13:37:54 -05001/*
2 * Copyright 2009 Freescale Semiconductor, Inc.
3 *
4 * Kumar Gala <kumar.gala@freescale.com>
5 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02006 * SPDX-License-Identifier: GPL-2.0+
Kumar Galac24a9052009-08-14 13:37:54 -05007 */
8
9/* This file is intended to be included by other asm code since
10 * we will want to execute this on both the primary core when
11 * it does a bootm and the secondary core's that get released
12 * out of the spin table */
13
14#define SET_IVOR(vector_number, vector_offset) \
15 li r3,vector_offset@l; \
16 mtspr SPRN_IVOR##vector_number,r3;
17
18#define SET_GIVOR(vector_number, vector_offset) \
19 li r3,vector_offset@l; \
20 mtspr SPRN_GIVOR##vector_number,r3;
21
Wolfgang Denkd61fbcc2009-10-28 00:49:47 +010022 SET_IVOR(0, 0x020) /* Critical Input */
23 SET_IVOR(1, 0x000) /* Machine Check */
24 SET_IVOR(2, 0x060) /* Data Storage */
25 SET_IVOR(3, 0x080) /* Instruction Storage */
26 SET_IVOR(4, 0x0a0) /* External Input */
27 SET_IVOR(5, 0x0c0) /* Alignment */
28 SET_IVOR(6, 0x0e0) /* Program */
29 SET_IVOR(7, 0x100) /* FP Unavailable */
30 SET_IVOR(8, 0x120) /* System Call */
31 SET_IVOR(9, 0x140) /* Auxiliary Processor Unavailable */
32 SET_IVOR(10, 0x160) /* Decrementer */
33 SET_IVOR(11, 0x180) /* Fixed Interval Timer */
34 SET_IVOR(12, 0x1a0) /* Watchdog Timer */
35 SET_IVOR(13, 0x1c0) /* Data TLB Error */
36 SET_IVOR(14, 0x1e0) /* Instruction TLB Error */
37 SET_IVOR(15, 0x040) /* Debug */
Kumar Galac24a9052009-08-14 13:37:54 -050038
39/* e500v1 & e500v2 only */
40#ifndef CONFIG_E500MC
41 SET_IVOR(32, 0x200) /* SPE Unavailable */
42 SET_IVOR(33, 0x220) /* Embedded FP Data */
43 SET_IVOR(34, 0x240) /* Embedded FP Round */
44#endif
45
Wolfgang Denkd61fbcc2009-10-28 00:49:47 +010046 SET_IVOR(35, 0x260) /* Performance monitor */
Kumar Galac24a9052009-08-14 13:37:54 -050047
48/* e500mc only */
49#ifdef CONFIG_E500MC
Wolfgang Denkd61fbcc2009-10-28 00:49:47 +010050 SET_IVOR(36, 0x280) /* Processor doorbell */
51 SET_IVOR(37, 0x2a0) /* Processor doorbell critical */
52 SET_IVOR(38, 0x2c0) /* Guest Processor doorbell */
53 SET_IVOR(39, 0x2e0) /* Guest Processor critical & machine check */
54 SET_IVOR(40, 0x300) /* Hypervisor system call */
55 SET_IVOR(41, 0x320) /* Hypervisor Priviledge */
Kumar Galac24a9052009-08-14 13:37:54 -050056
Wolfgang Denkd61fbcc2009-10-28 00:49:47 +010057 SET_GIVOR(2, 0x060) /* Guest Data Storage */
58 SET_GIVOR(3, 0x080) /* Guest Instruction Storage */
59 SET_GIVOR(4, 0x0a0) /* Guest External Input */
60 SET_GIVOR(8, 0x120) /* Guest System Call */
61 SET_GIVOR(13, 0x1c0) /* Guest Data TLB Error */
62 SET_GIVOR(14, 0x1e0) /* Guest Instruction TLB Error */
Kumar Galac24a9052009-08-14 13:37:54 -050063#endif