ia64/xen-unstable

view xen/include/asm-ia64/dom_fw.h @ 5704:9b73afea874e

Certain types of event channel are now auto-bound to vcpu0 by Xen.
Make sure that xenolinux agrees with this.
author sos22@douglas.cl.cam.ac.uk
date Fri Jul 08 15:35:43 2005 +0000 (2005-07-08)
parents 73f9c9685211
children eae5812f33f1
line source
1 /*
2 * Xen domain firmware emulation
3 *
4 * Copyright (C) 2004 Hewlett-Packard Co
5 * Dan Magenheimer (dan.magenheimer@hp.com)
6 */
8 extern unsigned long dom_pa(unsigned long);
9 extern unsigned long dom_fw_setup(struct domain *, char *, int);
11 #ifndef MB
12 #define MB (1024*1024)
13 #endif
15 /* This is used to determined the portion of a domain's metaphysical memory
16 space reserved for the hypercall patch table. */
17 //FIXME: experiment with smaller sizes
18 #define HYPERCALL_START 1*MB
19 #define HYPERCALL_END 2*MB
21 #define FW_HYPERCALL_BASE_PADDR HYPERCALL_START
22 #define FW_HYPERCALL_END_PADDR HYPERCALL_END
23 #define FW_HYPERCALL_PADDR(index) (FW_HYPERCALL_BASE_PADDR + (16UL * index))
25 /*
26 * PAL can be called in physical or virtual mode simply by
27 * branching to pal_entry_point, which is found in one of the
28 * SAL system table entrypoint descriptors (type=0). Parameters
29 * may be passed in r28-r31 (static) or r32-r35 (stacked); which
30 * convention is used depends on which procedure is being called.
31 * r28 contains the PAL index, the indicator of which PAL procedure
32 * is to be called: Index=0 is reserved, 1-255 indicates static
33 * parameters, 256-511 indicates stacked parameters. 512-1023
34 * are implementation-specific and 1024+ are reserved.
35 * rp=b0 indicates the return point.
36 *
37 * A single hypercall is used for all PAL calls.
38 */
40 #define FW_HYPERCALL_PAL_CALL_INDEX 0x80UL
41 #define FW_HYPERCALL_PAL_CALL_PADDR FW_HYPERCALL_PADDR(FW_HYPERCALL_PAL_CALL_INDEX)
42 #define FW_HYPERCALL_PAL_CALL 0x1000UL
44 /*
45 * SAL consists of a table of descriptors, one of which (type=0)
46 * contains a sal_entry_point which provides access to a number of
47 * functions. Parameters are passed in r33-r39; r32 contains the
48 * index of the SAL function being called. At entry, r1=gp contains
49 * a global pointer which may be needed by the function. rp=b0
50 * indicates the return point. SAL may not be re-entrant; an
51 * OS must ensure it is called by one processor at a time.
52 *
53 * A single hypercall is used for all SAL calls.
54 */
56 #define FW_HYPERCALL_SAL_CALL_INDEX 0x81UL
57 #define FW_HYPERCALL_SAL_CALL_PADDR FW_HYPERCALL_PADDR(FW_HYPERCALL_SAL_CALL_INDEX)
58 #define FW_HYPERCALL_SAL_CALL 0x1001UL
60 /*
61 * EFI is accessed via the EFI system table, which contains:
62 * - a header which contains version info
63 * - console information (stdin,stdout,stderr)
64 * as well as pointers to:
65 * - the EFI configuration table, which contains GUID/pointer pairs,
66 * one of which is a pointer to the SAL system table; another is
67 * a pointer to the ACPI table
68 * - the runtime services table, which contains a header followed by
69 * a list of (11) unique "runtime" entry points. EFI runtime entry
70 * points are real function descriptors so contain both a (physical)
71 * address and a global pointer. They are entered (at first) in
72 * physical mode, though it is possible (optionally... requests can
73 * be ignored and calls still must be OK) to call one entry point
74 * which switches the others so they are capable of being called in
75 * virtual mode. Parameters are passed in stacked registers, and
76 * rp=b0 indicates the return point.
77 * - the boot services table, which contains bootloader-related
78 * entry points (ADD MORE HERE LATER)
79 *
80 * Each runtime (and boot) entry point requires a unique hypercall.
81 */
83 /* these are indexes into the runtime services table */
84 #define FW_HYPERCALL_EFI_BASE
85 #define FW_HYPERCALL_EFI_GET_TIME_INDEX 0UL
86 #define FW_HYPERCALL_EFI_SET_TIME_INDEX 1UL
87 #define FW_HYPERCALL_EFI_GET_WAKEUP_TIME_INDEX 2UL
88 #define FW_HYPERCALL_EFI_SET_WAKEUP_TIME_INDEX 3UL
89 #define FW_HYPERCALL_EFI_SET_VIRTUAL_ADDRESS_MAP_INDEX 4UL
90 #define FW_HYPERCALL_EFI_GET_VARIABLE_INDEX 5UL
91 #define FW_HYPERCALL_EFI_GET_NEXT_VARIABLE_INDEX 6UL
92 #define FW_HYPERCALL_EFI_SET_VARIABLE_INDEX 7UL
93 #define FW_HYPERCALL_EFI_GET_NEXT_HIGH_MONO_COUNT_INDEX 8UL
94 #define FW_HYPERCALL_EFI_RESET_SYSTEM_INDEX 9UL
96 /* these are hypercall numbers */
97 #define FW_HYPERCALL_EFI_GET_TIME 0x300UL
98 #define FW_HYPERCALL_EFI_SET_TIME 0x301UL
99 #define FW_HYPERCALL_EFI_GET_WAKEUP_TIME 0x302UL
100 #define FW_HYPERCALL_EFI_SET_WAKEUP_TIME 0x303UL
101 #define FW_HYPERCALL_EFI_SET_VIRTUAL_ADDRESS_MAP 0x304UL
102 #define FW_HYPERCALL_EFI_GET_VARIABLE 0x305UL
103 #define FW_HYPERCALL_EFI_GET_NEXT_VARIABLE 0x306UL
104 #define FW_HYPERCALL_EFI_SET_VARIABLE 0x307UL
105 #define FW_HYPERCALL_EFI_GET_NEXT_HIGH_MONO_COUNT 0x308UL
106 #define FW_HYPERCALL_EFI_RESET_SYSTEM 0x309UL
108 /* these are the physical addresses of the pseudo-entry points that
109 * contain the hypercalls */
110 #define FW_HYPERCALL_EFI_GET_TIME_PADDR FW_HYPERCALL_PADDR(FW_HYPERCALL_EFI_GET_TIME_INDEX)
111 #define FW_HYPERCALL_EFI_SET_TIME_PADDR FW_HYPERCALL_PADDR(FW_HYPERCALL_EFI_SET_TIME_INDEX)
112 #define FW_HYPERCALL_EFI_GET_WAKEUP_TIME_PADDR FW_HYPERCALL_PADDR(FW_HYPERCALL_EFI_GET_WAKEUP_TIME_INDEX)
113 #define FW_HYPERCALL_EFI_SET_WAKEUP_TIME_PADDR FW_HYPERCALL_PADDR(FW_HYPERCALL_EFI_SET_WAKEUP_TIME_INDEX)
114 #define FW_HYPERCALL_EFI_SET_VIRTUAL_ADDRESS_MAP_PADDR FW_HYPERCALL_PADDR(FW_HYPERCALL_EFI_SET_VIRTUAL_ADDRESS_MAP_INDEX)
115 #define FW_HYPERCALL_EFI_GET_VARIABLE_PADDR FW_HYPERCALL_PADDR(FW_HYPERCALL_EFI_GET_VARIABLE_INDEX)
116 #define FW_HYPERCALL_EFI_GET_NEXT_VARIABLE_PADDR FW_HYPERCALL_PADDR(FW_HYPERCALL_EFI_GET_NEXT_VARIABLE_INDEX)
117 #define FW_HYPERCALL_EFI_SET_VARIABLE_PADDR FW_HYPERCALL_PADDR(FW_HYPERCALL_EFI_SET_VARIABLE_INDEX)
118 #define FW_HYPERCALL_EFI_GET_NEXT_HIGH_MONO_COUNT_PADDR FW_HYPERCALL_PADDR(FW_HYPERCALL_EFI_GET_NEXT_HIGH_MONO_COUNT_INDEX)
119 #define FW_HYPERCALL_EFI_RESET_SYSTEM_PADDR FW_HYPERCALL_PADDR(FW_HYPERCALL_EFI_RESET_SYSTEM_INDEX)