]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/arm/commpage/commpage_sigs.h
2 * Copyright (c) 2017 Apple Inc. All rights reserved.
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
29 (((x) << 24) & 0xff000000) | \
30 (((x) << 8) & 0x00ff0000) | \
31 (((x) >> 8) & 0x0000ff00) | \
32 (((x) >> 24) & 0x000000ff)
34 #define BSWAP_32_OFFSET(x) \
35 BSWAP_32(x + _COMM_PAGE_SIGS_OFFSET)
37 #define COMMPAGE_SIGS_BEGIN \
40 .private_extern _commpage_sigs_begin ; \
43 #define COMMPAGE_SIGS_DONE \
44 .private_extern _commpage_sigs_end ; \
45 _commpage_sigs_end: ; \
47 #define COMMPAGE_SIG_START(x) \
48 .private_extern _commpage_sig ## x ; \
49 _commpage_sig ## x ## : ; \
50 .long BSWAP_32(0x14400000) ; \
51 .long BSWAP_32(0x00000001) ; \
54 .long BSWAP_32(0x14400000)
56 #define COMMPAGE_SIG_END(x) \
57 .long BSWAP_32(0x4e800020) ; \
58 .long BSWAP_32(0x14400000) ; \
59 .long BSWAP_32(0x00000000) ; \
62 .long BSWAP_32(0x14400000)
64 #define OBJCRTP_SIG_START(x) COMMPAGE_SIG_START(x)
66 #define OBJCRTP_SIG_END(x) \
67 .long BSWAP_32(0x14400000) ; \
68 .long BSWAP_32(0x00000000) ; \
71 .long BSWAP_32(0x14400000)
73 #define OBJCRTP_SIG_CALL_SUBJECT(x) \
74 .long BSWAP_32(0x14400002) ; \
75 .long BSWAP_32(0x00000000) ; \
76 .long BSWAP_32(0x00040000) ; \
77 .long BSWAP_32(0x00000000) ; \
80 .long BSWAP_32(0x14400002)
83 ((((n * 2) + 6) << 20) + 4)
85 #define COMMPAGE_SIG_ARG(n) \
86 .long BSWAP_32(0x14400001) ; \
87 .long BSWAP_32(ARG(n)) ; \
88 .long BSWAP_32(0x14400001)
90 #define COMMPAGE_SIG_CALL(x, n) \
91 .long BSWAP_32(0x14400002) ; \
93 .long BSWAP_32(0x00000000) ; \
94 .long BSWAP_32(0x00000000) ; \
97 .long BSWAP_32(0x14400002)
99 #define COMMPAGE_SIG_CALL_VOID(x) \
100 COMMPAGE_SIG_CALL(x, 0)
102 #define COMMPAGE_SIG_CALL_RET0(x) \
103 COMMPAGE_SIG_CALL(x, ARG(0))
105 #define COMMPAGE_SIG_CALL_RET1(x) \
106 COMMPAGE_SIG_CALL(x, ARG(1))
108 #define COMMPAGE_FAST_TRAP(x) \
109 .long BSWAP_32(0x14400005) ; \
110 .long BSWAP_32_OFFSET(x) ; \
111 .long BSWAP_32(0x14400005)