source: trunk/packages/xen-3.1/xen-3.1/xen/arch/powerpc/of_handler/papr.S @ 34

Last change on this file since 34 was 34, checked in by hartmans, 18 years ago

Add xen and xen-common

File size: 3.2 KB
Line 
1/*
2 * Copyright (C) 2005 Jimi Xenidis <jimix@watson.ibm.com>, IBM Corporation
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 */
18
19#include <asm/config.h>
20#include <asm/processor.h>
21#include <asm/papr.h>
22#include <asm/asm-offsets.h>
23
24#define HSC     .long 0x44000022
25
26       
27/* in is unsused */
28#define PAPR(in, out, name, func_code)  \
29        _GLOBAL(name);                  \
30        std r3,-GPR_WIDTH(r1);          \
31        li r3,func_code;                \
32        HSC;                            \
33        ld r12,-GPR_WIDTH(r1);          \
34        cmpi 0,r12,0;                   \
35        bne ret ## out; /* only store regs if r12 != NULL */ \
36        b ret0
37
38ret8:   std r11, 7 * GPR_WIDTH(r12)
39ret7:   std r10, 6 * GPR_WIDTH(r12)
40ret6:   std r9, 5 * GPR_WIDTH(r12)
41ret5:   std r8, 4 * GPR_WIDTH(r12)
42ret4:   std r7, 3 * GPR_WIDTH(r12)
43ret3:   std r6, 2 * GPR_WIDTH(r12)
44ret2:   std r5, 1 * GPR_WIDTH(r12)
45ret1:   std r4, 0 * GPR_WIDTH(r12)
46        nop
47ret0:   blr
48       
49PAPR(5, 2,papr_remove, H_REMOVE)
50PAPR(5, 1,papr_clear_mod, H_CLEAR_MOD)
51PAPR(5, 1,papr_clear_ref, H_CLEAR_REF)
52PAPR(5, 0,papr_protect, H_PROTECT)
53PAPR(1, 0,papr_eoi, H_EOI)
54PAPR(5, 1,papr_cppr, H_CPPR)
55PAPR(5, 2,papr_ipi, H_IPI)
56PAPR(5, 1,papr_ipoll, H_IPOLL)
57PAPR(5, 1,papr_xirr, H_XIRR)
58PAPR(2, 0,papr_interrupt, H_INTERRUPT)
59PAPR(5, 1,papr_logical_ci_load_64, H_LOGICAL_CI_LOAD)
60PAPR(5, 0,papr_logical_ci_store_64, H_LOGICAL_CI_STORE)
61PAPR(5, 1,papr_logical_cache_load_64, H_LOGICAL_CACHE_LOAD)
62PAPR(5, 0,papr_logical_cache_store_64, H_LOGICAL_CACHE_STORE)
63PAPR(5, 0,papr_logical_icbi, H_LOGICAL_ICBI)
64PAPR(5, 0,papr_logical_dcbf, H_LOGICAL_DCBF)
65PAPR(5, 1,papr_set_dabr, H_SET_DABR)
66PAPR(5, 1,papr_real_to_logical, H_REAL_TO_LOGICAL)
67PAPR(5, 1,papr_pci_config_read, H_PCI_CONFIG_READ)
68PAPR(5, 0,papr_pci_config_write, H_PCI_CONFIG_WRITE)
69
70        PAPR(5, 1,papr_grant_logical, H_GRANT_LOGICAL)
71PAPR(1, 1,papr_accept_logical, H_ACCEPT_LOGICAL)
72PAPR(0, 2,papr_rescind_logical, H_RESCIND_LOGICAL)
73PAPR(3, 0,papr_register_vterm, H_REGISTER_VTERM)
74PAPR(4, 0,papr_vterm_partner_info, H_VTERM_PARTNER_INFO)
75PAPR(1, 0,papr_free_vterm, H_FREE_VTERM)
76
77/* Definitions for hypervisor functions. Note that we do not use the
78 * first macro arg */
79
80PAPR(x, 1,papr_enter, H_ENTER)
81PAPR(x, 8,papr_read, H_READ)
82PAPR(x, 1,papr_thread_control, H_THREAD_CONTROL)
83PAPR(x, 0,papr_cede, H_CEDE)
84
85PAPR(x, 0,papr_page_init, H_PAGE_INIT)
86PAPR(x, 1,papr_set_asr, H_SET_ASR)  /* ISTAR only. */
87PAPR(x, 0,papr_asr_on, H_ASR_ON)  /* ISTAR only. */
88PAPR(x, 0,papr_asr_off, H_ASR_OFF)  /* ISTAR only. */
89
90PAPR(x, 8,papr_hypervisor_data, H_HYPERVISOR_DATA)
91
92PAPR(x, 2,papr_get_xive, H_GET_XIVE)
93PAPR(x, 0,papr_set_xive, H_SET_XIVE)
94
95
96PAPR(x, 0,papr_put_term_char, H_PUT_TERM_CHAR)
97PAPR(x, 3,papr_get_term_char, H_GET_TERM_CHAR)
Note: See TracBrowser for help on using the repository browser.