]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - UnixPkg/Sec/Ia32/GasketTemplate.c
Fix token dup caused by merge.
[mirror_edk2.git] / UnixPkg / Sec / Ia32 / GasketTemplate.c
... / ...
CommitLineData
1/** @file
2 Template file used to create Gasket.S
3
4 This file is built on the command line via gcc GasketTemplate.c -S
5 and it will create GasketTemplate.s and this was used to create
6 Gasket.S. You still have to add the extra stack alignment code to
7 the assembly functions.
8
9Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
10Portions copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
11This program and the accompanying materials
12are licensed and made available under the terms and conditions of the BSD License
13which accompanies this distribution. The full text of the license may be found at
14http://opensource.org/licenses/bsd-license.php
15
16THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
17WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18
19**/
20
21
22#include <stdint.h>
23#include <sys/stat.h>
24
25typedef int8_t INT8;
26typedef uint8_t UINT8;
27typedef int16_t INT16;
28typedef uint16_t UINT16;
29typedef int32_t INT32;
30typedef uint32_t UINT32;
31typedef int64_t INT64;
32typedef uint64_t UINT64;
33typedef UINT32 UINTN;
34
35
36typedef int (*GASKET_VOID) ();
37typedef int (*GASKET_UINTN) (UINTN);
38typedef int (*GASKET_UINT64) (UINT64);
39typedef int (*GASKET_UINT64UINT64) (UINT64, UINT64);
40typedef int (*GASKET_UINTN_UINTN) (UINTN, UINTN);
41typedef int (*GASKET_UINTN_UINTN_UINTN) (UINTN, UINTN, UINTN);
42typedef int (*GASKET_UINTN_UINTN_UINTN_UINTN) (UINTN, UINTN, UINTN, UINTN);
43typedef int (*GASKET_UINTN_10ARGS) (UINTN, UINTN, UINTN, UINTN, UINTN, UINTN, UINTN, UINTN, UINTN, UINTN);
44typedef int (*GASKET_UINT64_UINTN) (UINT64, UINTN);
45typedef UINT64 (*GASKET_UINTN_UINT64_UINTN) (UINTN, UINT64, UINTN);
46typedef int (*GASKET_UINTN_UINT16) (UINTN, UINT16);
47
48int GasketVoid (void *api);
49int GasketUintn (void *api, UINTN a);
50int GasketUintnUintn (void *api, UINTN a, UINTN b);
51int GasketUintnUintnUintn (void *api, UINTN a, UINTN b, UINTN c);
52int GasketUintnUintnUintnUintn (void *api, UINTN a, UINTN b, UINTN c, UINTN d);
53int GasketUintn10Args (void *api, UINTN a, UINTN b, UINTN c, UINTN d, UINTN e, UINTN f, UINTN g, UINTN h, UINTN i, UINTN j);
54int GasketUint64Uintn (void *api, UINT64 a, UINTN b);
55UINT64 GasketUintnUiny64Uintn (void *api, UINTN a, UINT64 b, UINTN c);
56int GasketUintnUint16 (void *api, UINTN a, UINT16 b);
57
58
59
60int
61GasketVoid (void *api)
62{
63 GASKET_VOID func;
64
65 func = (GASKET_VOID)api;
66 return func ();
67}
68
69int
70GasketUintn (void *api, UINTN a)
71{
72 GASKET_UINTN func;
73
74 func = (GASKET_UINTN)api;
75 return func (a);
76}
77
78int
79GasketUintnUintn (void *api, UINTN a, UINTN b)
80{
81 GASKET_UINTN_UINTN func;
82
83 func = (GASKET_UINTN_UINTN)api;
84 return func (a, b);
85}
86
87
88int
89GasketUintnUintnUintn (void *api, UINTN a, UINTN b, UINTN c)
90{
91 GASKET_UINTN_UINTN_UINTN func;
92
93 func = (GASKET_UINTN_UINTN_UINTN)api;
94 return func (a, b, c);
95}
96
97int
98GasketUintnUintnUintnUintn (void *api, UINTN a, UINTN b, UINTN c, UINTN d)
99{
100 GASKET_UINTN_UINTN_UINTN_UINTN func;
101
102 func = (GASKET_UINTN_UINTN_UINTN_UINTN)api;
103 return func (a, b, c, d);
104}
105
106int
107GasketUintn10Args (void *api, UINTN a, UINTN b, UINTN c, UINTN d, UINTN e, UINTN f, UINTN g, UINTN h, UINTN i, UINTN j)
108{
109 GASKET_UINTN_10ARGS func;
110
111 func = (GASKET_UINTN_10ARGS)api;
112 return func (a, b, c, d, e, f, g, h, i, j);
113}
114
115
116int
117GasketUint64Uintn (void *api, UINT64 a, UINTN b)
118{
119 GASKET_UINT64_UINTN func;
120
121 func = (GASKET_UINT64_UINTN)api;
122 return func (a, b);
123}
124
125UINT64
126GasketUintnUint64Uintn (void *api, UINTN a, UINT64 b, UINTN c)
127{
128 GASKET_UINTN_UINT64_UINTN func;
129
130 func = (GASKET_UINTN_UINT64_UINTN)api;
131 return func (a, b, c);
132}
133
134int
135GasketUintnUint16 (void *api, UINTN a, UINT16 b)
136{
137 GASKET_UINTN_UINT16 func;
138
139 func = (GASKET_UINTN_UINT16)api;
140 return func (a, b);
141}
142
143void
144ReverseGasketUint64 (void *api, UINT64 a)
145{
146 GASKET_UINTN func;
147
148 func = (GASKET_UINT64)api;
149 func (a);
150 return;
151}
152
153void
154ReverseGasketUint64UINT64 (void *api, UINT64 a, UINT64 b)
155{
156 GASKET_UINT64UINT64 func;
157
158 func = (GASKET_UINT64UINT64)api;
159 func (a, b);
160 return;
161}
162
163