xref: /titanic_50/usr/src/uts/i86xpv/ml/xenguest.s (revision 843e19887f64dde75055cf8842fc4db2171eff45)
1*843e1988Sjohnlev/*
2*843e1988Sjohnlev * CDDL HEADER START
3*843e1988Sjohnlev *
4*843e1988Sjohnlev * The contents of this file are subject to the terms of the
5*843e1988Sjohnlev * Common Development and Distribution License (the "License").
6*843e1988Sjohnlev * You may not use this file except in compliance with the License.
7*843e1988Sjohnlev *
8*843e1988Sjohnlev * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*843e1988Sjohnlev * or http://www.opensolaris.org/os/licensing.
10*843e1988Sjohnlev * See the License for the specific language governing permissions
11*843e1988Sjohnlev * and limitations under the License.
12*843e1988Sjohnlev *
13*843e1988Sjohnlev * When distributing Covered Code, include this CDDL HEADER in each
14*843e1988Sjohnlev * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*843e1988Sjohnlev * If applicable, add the following below this CDDL HEADER, with the
16*843e1988Sjohnlev * fields enclosed by brackets "[]" replaced with your own identifying
17*843e1988Sjohnlev * information: Portions Copyright [yyyy] [name of copyright owner]
18*843e1988Sjohnlev *
19*843e1988Sjohnlev * CDDL HEADER END
20*843e1988Sjohnlev */
21*843e1988Sjohnlev
22*843e1988Sjohnlev/*
23*843e1988Sjohnlev * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
24*843e1988Sjohnlev * Use is subject to license terms.
25*843e1988Sjohnlev */
26*843e1988Sjohnlev
27*843e1988Sjohnlev#pragma ident	"%Z%%M%	%I%	%E% SMI"
28*843e1988Sjohnlev
29*843e1988Sjohnlev#if defined(__lint)
30*843e1988Sjohnlev
31*843e1988Sjohnlev/*
32*843e1988Sjohnlev * Stop lint complaining about an empty compilation unit!
33*843e1988Sjohnlev * Sigh.  There should be a better way to handle this.
34*843e1988Sjohnlev */
35*843e1988Sjohnlevint __lint_xen_guest;
36*843e1988Sjohnlev
37*843e1988Sjohnlev#else	/* __lint */
38*843e1988Sjohnlev
39*843e1988Sjohnlev#include <xen/public/elfnote.h>
40*843e1988Sjohnlev
41*843e1988Sjohnlev/*
42*843e1988Sjohnlev * A note is a name/value pair that belongs to some class.
43*843e1988Sjohnlev */
44*843e1988Sjohnlev#define NOTE(class, id, type, value)	\
45*843e1988Sjohnlev	.align	4;			\
46*843e1988Sjohnlev	.4byte	2f - 1f;		\
47*843e1988Sjohnlev	.4byte	4f - 3f;		\
48*843e1988Sjohnlev	.4byte	id;			\
49*843e1988Sjohnlev1: ;					\
50*843e1988Sjohnlev	.string class;			\
51*843e1988Sjohnlev2: ;					\
52*843e1988Sjohnlev	.align	4;			\
53*843e1988Sjohnlev3: ;					\
54*843e1988Sjohnlev	type	value;			\
55*843e1988Sjohnlev4: ;
56*843e1988Sjohnlev
57*843e1988Sjohnlev	.section .note
58*843e1988Sjohnlev	NOTE("Xen", XEN_ELFNOTE_LOADER, .string, "generic")
59*843e1988Sjohnlev	NOTE("Xen", XEN_ELFNOTE_XEN_VERSION, .string, "xen-3.0")
60*843e1988Sjohnlev	NOTE("Xen", XEN_ELFNOTE_GUEST_OS, .string, "Solaris")
61*843e1988Sjohnlev	NOTE("Xen", XEN_ELFNOTE_VIRT_BASE, .4byte, 0x40000000)
62*843e1988Sjohnlev	NOTE("Xen", XEN_ELFNOTE_PADDR_OFFSET, .4byte, 0x40000000)
63*843e1988Sjohnlev#if defined(__i386)
64*843e1988Sjohnlev	/*
65*843e1988Sjohnlev	 * NB: If you want to build a kernel that works on a non-PAE
66*843e1988Sjohnlev	 * hypervisor, just comment out the next line and rebuild Solaris.
67*843e1988Sjohnlev	 * It'll just work, the kernel figures everything out dynamically.
68*843e1988Sjohnlev	 */
69*843e1988Sjohnlev	NOTE("Xen", XEN_ELFNOTE_PAE_MODE, .string, "yes,bimodal")
70*843e1988Sjohnlev	/*
71*843e1988Sjohnlev	 * XXPV: implement XEN_ELFNOTE_HV_START_LOW
72*843e1988Sjohnlev	 */
73*843e1988Sjohnlev#endif
74*843e1988Sjohnlev
75*843e1988Sjohnlev#endif /* __lint */
76