162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci *  PS3 hvcall interface.
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci *  Copyright (C) 2006 Sony Computer Entertainment Inc.
662306a36Sopenharmony_ci *  Copyright 2006 Sony Corp.
762306a36Sopenharmony_ci *  Copyright 2003, 2004 (c) MontaVista Software, Inc.
862306a36Sopenharmony_ci */
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci#if !defined(_ASM_POWERPC_LV1CALL_H)
1162306a36Sopenharmony_ci#define _ASM_POWERPC_LV1CALL_H
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci#if !defined(__ASSEMBLY__)
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci#include <linux/types.h>
1662306a36Sopenharmony_ci#include <linux/export.h>
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ci/* lv1 call declaration macros */
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci#define LV1_1_IN_ARG_DECL u64 in_1
2162306a36Sopenharmony_ci#define LV1_2_IN_ARG_DECL LV1_1_IN_ARG_DECL, u64 in_2
2262306a36Sopenharmony_ci#define LV1_3_IN_ARG_DECL LV1_2_IN_ARG_DECL, u64 in_3
2362306a36Sopenharmony_ci#define LV1_4_IN_ARG_DECL LV1_3_IN_ARG_DECL, u64 in_4
2462306a36Sopenharmony_ci#define LV1_5_IN_ARG_DECL LV1_4_IN_ARG_DECL, u64 in_5
2562306a36Sopenharmony_ci#define LV1_6_IN_ARG_DECL LV1_5_IN_ARG_DECL, u64 in_6
2662306a36Sopenharmony_ci#define LV1_7_IN_ARG_DECL LV1_6_IN_ARG_DECL, u64 in_7
2762306a36Sopenharmony_ci#define LV1_8_IN_ARG_DECL LV1_7_IN_ARG_DECL, u64 in_8
2862306a36Sopenharmony_ci#define LV1_1_OUT_ARG_DECL u64 *out_1
2962306a36Sopenharmony_ci#define LV1_2_OUT_ARG_DECL LV1_1_OUT_ARG_DECL, u64 *out_2
3062306a36Sopenharmony_ci#define LV1_3_OUT_ARG_DECL LV1_2_OUT_ARG_DECL, u64 *out_3
3162306a36Sopenharmony_ci#define LV1_4_OUT_ARG_DECL LV1_3_OUT_ARG_DECL, u64 *out_4
3262306a36Sopenharmony_ci#define LV1_5_OUT_ARG_DECL LV1_4_OUT_ARG_DECL, u64 *out_5
3362306a36Sopenharmony_ci#define LV1_6_OUT_ARG_DECL LV1_5_OUT_ARG_DECL, u64 *out_6
3462306a36Sopenharmony_ci#define LV1_7_OUT_ARG_DECL LV1_6_OUT_ARG_DECL, u64 *out_7
3562306a36Sopenharmony_ci
3662306a36Sopenharmony_ci#define LV1_0_IN_0_OUT_ARG_DECL void
3762306a36Sopenharmony_ci#define LV1_1_IN_0_OUT_ARG_DECL LV1_1_IN_ARG_DECL
3862306a36Sopenharmony_ci#define LV1_2_IN_0_OUT_ARG_DECL LV1_2_IN_ARG_DECL
3962306a36Sopenharmony_ci#define LV1_3_IN_0_OUT_ARG_DECL LV1_3_IN_ARG_DECL
4062306a36Sopenharmony_ci#define LV1_4_IN_0_OUT_ARG_DECL LV1_4_IN_ARG_DECL
4162306a36Sopenharmony_ci#define LV1_5_IN_0_OUT_ARG_DECL LV1_5_IN_ARG_DECL
4262306a36Sopenharmony_ci#define LV1_6_IN_0_OUT_ARG_DECL LV1_6_IN_ARG_DECL
4362306a36Sopenharmony_ci#define LV1_7_IN_0_OUT_ARG_DECL LV1_7_IN_ARG_DECL
4462306a36Sopenharmony_ci
4562306a36Sopenharmony_ci#define LV1_0_IN_1_OUT_ARG_DECL                    LV1_1_OUT_ARG_DECL
4662306a36Sopenharmony_ci#define LV1_1_IN_1_OUT_ARG_DECL LV1_1_IN_ARG_DECL, LV1_1_OUT_ARG_DECL
4762306a36Sopenharmony_ci#define LV1_2_IN_1_OUT_ARG_DECL LV1_2_IN_ARG_DECL, LV1_1_OUT_ARG_DECL
4862306a36Sopenharmony_ci#define LV1_3_IN_1_OUT_ARG_DECL LV1_3_IN_ARG_DECL, LV1_1_OUT_ARG_DECL
4962306a36Sopenharmony_ci#define LV1_4_IN_1_OUT_ARG_DECL LV1_4_IN_ARG_DECL, LV1_1_OUT_ARG_DECL
5062306a36Sopenharmony_ci#define LV1_5_IN_1_OUT_ARG_DECL LV1_5_IN_ARG_DECL, LV1_1_OUT_ARG_DECL
5162306a36Sopenharmony_ci#define LV1_6_IN_1_OUT_ARG_DECL LV1_6_IN_ARG_DECL, LV1_1_OUT_ARG_DECL
5262306a36Sopenharmony_ci#define LV1_7_IN_1_OUT_ARG_DECL LV1_7_IN_ARG_DECL, LV1_1_OUT_ARG_DECL
5362306a36Sopenharmony_ci#define LV1_8_IN_1_OUT_ARG_DECL LV1_8_IN_ARG_DECL, LV1_1_OUT_ARG_DECL
5462306a36Sopenharmony_ci
5562306a36Sopenharmony_ci#define LV1_0_IN_2_OUT_ARG_DECL                    LV1_2_OUT_ARG_DECL
5662306a36Sopenharmony_ci#define LV1_1_IN_2_OUT_ARG_DECL LV1_1_IN_ARG_DECL, LV1_2_OUT_ARG_DECL
5762306a36Sopenharmony_ci#define LV1_2_IN_2_OUT_ARG_DECL LV1_2_IN_ARG_DECL, LV1_2_OUT_ARG_DECL
5862306a36Sopenharmony_ci#define LV1_3_IN_2_OUT_ARG_DECL LV1_3_IN_ARG_DECL, LV1_2_OUT_ARG_DECL
5962306a36Sopenharmony_ci#define LV1_4_IN_2_OUT_ARG_DECL LV1_4_IN_ARG_DECL, LV1_2_OUT_ARG_DECL
6062306a36Sopenharmony_ci#define LV1_5_IN_2_OUT_ARG_DECL LV1_5_IN_ARG_DECL, LV1_2_OUT_ARG_DECL
6162306a36Sopenharmony_ci#define LV1_6_IN_2_OUT_ARG_DECL LV1_6_IN_ARG_DECL, LV1_2_OUT_ARG_DECL
6262306a36Sopenharmony_ci#define LV1_7_IN_2_OUT_ARG_DECL LV1_7_IN_ARG_DECL, LV1_2_OUT_ARG_DECL
6362306a36Sopenharmony_ci
6462306a36Sopenharmony_ci#define LV1_0_IN_3_OUT_ARG_DECL                    LV1_3_OUT_ARG_DECL
6562306a36Sopenharmony_ci#define LV1_1_IN_3_OUT_ARG_DECL LV1_1_IN_ARG_DECL, LV1_3_OUT_ARG_DECL
6662306a36Sopenharmony_ci#define LV1_2_IN_3_OUT_ARG_DECL LV1_2_IN_ARG_DECL, LV1_3_OUT_ARG_DECL
6762306a36Sopenharmony_ci#define LV1_3_IN_3_OUT_ARG_DECL LV1_3_IN_ARG_DECL, LV1_3_OUT_ARG_DECL
6862306a36Sopenharmony_ci#define LV1_4_IN_3_OUT_ARG_DECL LV1_4_IN_ARG_DECL, LV1_3_OUT_ARG_DECL
6962306a36Sopenharmony_ci#define LV1_5_IN_3_OUT_ARG_DECL LV1_5_IN_ARG_DECL, LV1_3_OUT_ARG_DECL
7062306a36Sopenharmony_ci#define LV1_6_IN_3_OUT_ARG_DECL LV1_6_IN_ARG_DECL, LV1_3_OUT_ARG_DECL
7162306a36Sopenharmony_ci#define LV1_7_IN_3_OUT_ARG_DECL LV1_7_IN_ARG_DECL, LV1_3_OUT_ARG_DECL
7262306a36Sopenharmony_ci
7362306a36Sopenharmony_ci#define LV1_0_IN_4_OUT_ARG_DECL                    LV1_4_OUT_ARG_DECL
7462306a36Sopenharmony_ci#define LV1_1_IN_4_OUT_ARG_DECL LV1_1_IN_ARG_DECL, LV1_4_OUT_ARG_DECL
7562306a36Sopenharmony_ci#define LV1_2_IN_4_OUT_ARG_DECL LV1_2_IN_ARG_DECL, LV1_4_OUT_ARG_DECL
7662306a36Sopenharmony_ci#define LV1_3_IN_4_OUT_ARG_DECL LV1_3_IN_ARG_DECL, LV1_4_OUT_ARG_DECL
7762306a36Sopenharmony_ci#define LV1_4_IN_4_OUT_ARG_DECL LV1_4_IN_ARG_DECL, LV1_4_OUT_ARG_DECL
7862306a36Sopenharmony_ci#define LV1_5_IN_4_OUT_ARG_DECL LV1_5_IN_ARG_DECL, LV1_4_OUT_ARG_DECL
7962306a36Sopenharmony_ci#define LV1_6_IN_4_OUT_ARG_DECL LV1_6_IN_ARG_DECL, LV1_4_OUT_ARG_DECL
8062306a36Sopenharmony_ci#define LV1_7_IN_4_OUT_ARG_DECL LV1_7_IN_ARG_DECL, LV1_4_OUT_ARG_DECL
8162306a36Sopenharmony_ci
8262306a36Sopenharmony_ci#define LV1_0_IN_5_OUT_ARG_DECL                    LV1_5_OUT_ARG_DECL
8362306a36Sopenharmony_ci#define LV1_1_IN_5_OUT_ARG_DECL LV1_1_IN_ARG_DECL, LV1_5_OUT_ARG_DECL
8462306a36Sopenharmony_ci#define LV1_2_IN_5_OUT_ARG_DECL LV1_2_IN_ARG_DECL, LV1_5_OUT_ARG_DECL
8562306a36Sopenharmony_ci#define LV1_3_IN_5_OUT_ARG_DECL LV1_3_IN_ARG_DECL, LV1_5_OUT_ARG_DECL
8662306a36Sopenharmony_ci#define LV1_4_IN_5_OUT_ARG_DECL LV1_4_IN_ARG_DECL, LV1_5_OUT_ARG_DECL
8762306a36Sopenharmony_ci#define LV1_5_IN_5_OUT_ARG_DECL LV1_5_IN_ARG_DECL, LV1_5_OUT_ARG_DECL
8862306a36Sopenharmony_ci#define LV1_6_IN_5_OUT_ARG_DECL LV1_6_IN_ARG_DECL, LV1_5_OUT_ARG_DECL
8962306a36Sopenharmony_ci#define LV1_7_IN_5_OUT_ARG_DECL LV1_7_IN_ARG_DECL, LV1_5_OUT_ARG_DECL
9062306a36Sopenharmony_ci
9162306a36Sopenharmony_ci#define LV1_0_IN_6_OUT_ARG_DECL                    LV1_6_OUT_ARG_DECL
9262306a36Sopenharmony_ci#define LV1_1_IN_6_OUT_ARG_DECL LV1_1_IN_ARG_DECL, LV1_6_OUT_ARG_DECL
9362306a36Sopenharmony_ci#define LV1_2_IN_6_OUT_ARG_DECL LV1_2_IN_ARG_DECL, LV1_6_OUT_ARG_DECL
9462306a36Sopenharmony_ci#define LV1_3_IN_6_OUT_ARG_DECL LV1_3_IN_ARG_DECL, LV1_6_OUT_ARG_DECL
9562306a36Sopenharmony_ci#define LV1_4_IN_6_OUT_ARG_DECL LV1_4_IN_ARG_DECL, LV1_6_OUT_ARG_DECL
9662306a36Sopenharmony_ci#define LV1_5_IN_6_OUT_ARG_DECL LV1_5_IN_ARG_DECL, LV1_6_OUT_ARG_DECL
9762306a36Sopenharmony_ci#define LV1_6_IN_6_OUT_ARG_DECL LV1_6_IN_ARG_DECL, LV1_6_OUT_ARG_DECL
9862306a36Sopenharmony_ci#define LV1_7_IN_6_OUT_ARG_DECL LV1_7_IN_ARG_DECL, LV1_6_OUT_ARG_DECL
9962306a36Sopenharmony_ci
10062306a36Sopenharmony_ci#define LV1_0_IN_7_OUT_ARG_DECL                    LV1_7_OUT_ARG_DECL
10162306a36Sopenharmony_ci#define LV1_1_IN_7_OUT_ARG_DECL LV1_1_IN_ARG_DECL, LV1_7_OUT_ARG_DECL
10262306a36Sopenharmony_ci#define LV1_2_IN_7_OUT_ARG_DECL LV1_2_IN_ARG_DECL, LV1_7_OUT_ARG_DECL
10362306a36Sopenharmony_ci#define LV1_3_IN_7_OUT_ARG_DECL LV1_3_IN_ARG_DECL, LV1_7_OUT_ARG_DECL
10462306a36Sopenharmony_ci#define LV1_4_IN_7_OUT_ARG_DECL LV1_4_IN_ARG_DECL, LV1_7_OUT_ARG_DECL
10562306a36Sopenharmony_ci#define LV1_5_IN_7_OUT_ARG_DECL LV1_5_IN_ARG_DECL, LV1_7_OUT_ARG_DECL
10662306a36Sopenharmony_ci#define LV1_6_IN_7_OUT_ARG_DECL LV1_6_IN_ARG_DECL, LV1_7_OUT_ARG_DECL
10762306a36Sopenharmony_ci#define LV1_7_IN_7_OUT_ARG_DECL LV1_7_IN_ARG_DECL, LV1_7_OUT_ARG_DECL
10862306a36Sopenharmony_ci
10962306a36Sopenharmony_ci#define LV1_1_IN_ARGS in_1
11062306a36Sopenharmony_ci#define LV1_2_IN_ARGS LV1_1_IN_ARGS, in_2
11162306a36Sopenharmony_ci#define LV1_3_IN_ARGS LV1_2_IN_ARGS, in_3
11262306a36Sopenharmony_ci#define LV1_4_IN_ARGS LV1_3_IN_ARGS, in_4
11362306a36Sopenharmony_ci#define LV1_5_IN_ARGS LV1_4_IN_ARGS, in_5
11462306a36Sopenharmony_ci#define LV1_6_IN_ARGS LV1_5_IN_ARGS, in_6
11562306a36Sopenharmony_ci#define LV1_7_IN_ARGS LV1_6_IN_ARGS, in_7
11662306a36Sopenharmony_ci#define LV1_8_IN_ARGS LV1_7_IN_ARGS, in_8
11762306a36Sopenharmony_ci
11862306a36Sopenharmony_ci#define LV1_1_OUT_ARGS out_1
11962306a36Sopenharmony_ci#define LV1_2_OUT_ARGS LV1_1_OUT_ARGS, out_2
12062306a36Sopenharmony_ci#define LV1_3_OUT_ARGS LV1_2_OUT_ARGS, out_3
12162306a36Sopenharmony_ci#define LV1_4_OUT_ARGS LV1_3_OUT_ARGS, out_4
12262306a36Sopenharmony_ci#define LV1_5_OUT_ARGS LV1_4_OUT_ARGS, out_5
12362306a36Sopenharmony_ci#define LV1_6_OUT_ARGS LV1_5_OUT_ARGS, out_6
12462306a36Sopenharmony_ci#define LV1_7_OUT_ARGS LV1_6_OUT_ARGS, out_7
12562306a36Sopenharmony_ci
12662306a36Sopenharmony_ci#define LV1_0_IN_0_OUT_ARGS
12762306a36Sopenharmony_ci#define LV1_1_IN_0_OUT_ARGS LV1_1_IN_ARGS
12862306a36Sopenharmony_ci#define LV1_2_IN_0_OUT_ARGS LV1_2_IN_ARGS
12962306a36Sopenharmony_ci#define LV1_3_IN_0_OUT_ARGS LV1_3_IN_ARGS
13062306a36Sopenharmony_ci#define LV1_4_IN_0_OUT_ARGS LV1_4_IN_ARGS
13162306a36Sopenharmony_ci#define LV1_5_IN_0_OUT_ARGS LV1_5_IN_ARGS
13262306a36Sopenharmony_ci#define LV1_6_IN_0_OUT_ARGS LV1_6_IN_ARGS
13362306a36Sopenharmony_ci#define LV1_7_IN_0_OUT_ARGS LV1_7_IN_ARGS
13462306a36Sopenharmony_ci
13562306a36Sopenharmony_ci#define LV1_0_IN_1_OUT_ARGS                LV1_1_OUT_ARGS
13662306a36Sopenharmony_ci#define LV1_1_IN_1_OUT_ARGS LV1_1_IN_ARGS, LV1_1_OUT_ARGS
13762306a36Sopenharmony_ci#define LV1_2_IN_1_OUT_ARGS LV1_2_IN_ARGS, LV1_1_OUT_ARGS
13862306a36Sopenharmony_ci#define LV1_3_IN_1_OUT_ARGS LV1_3_IN_ARGS, LV1_1_OUT_ARGS
13962306a36Sopenharmony_ci#define LV1_4_IN_1_OUT_ARGS LV1_4_IN_ARGS, LV1_1_OUT_ARGS
14062306a36Sopenharmony_ci#define LV1_5_IN_1_OUT_ARGS LV1_5_IN_ARGS, LV1_1_OUT_ARGS
14162306a36Sopenharmony_ci#define LV1_6_IN_1_OUT_ARGS LV1_6_IN_ARGS, LV1_1_OUT_ARGS
14262306a36Sopenharmony_ci#define LV1_7_IN_1_OUT_ARGS LV1_7_IN_ARGS, LV1_1_OUT_ARGS
14362306a36Sopenharmony_ci#define LV1_8_IN_1_OUT_ARGS LV1_8_IN_ARGS, LV1_1_OUT_ARGS
14462306a36Sopenharmony_ci
14562306a36Sopenharmony_ci#define LV1_0_IN_2_OUT_ARGS                LV1_2_OUT_ARGS
14662306a36Sopenharmony_ci#define LV1_1_IN_2_OUT_ARGS LV1_1_IN_ARGS, LV1_2_OUT_ARGS
14762306a36Sopenharmony_ci#define LV1_2_IN_2_OUT_ARGS LV1_2_IN_ARGS, LV1_2_OUT_ARGS
14862306a36Sopenharmony_ci#define LV1_3_IN_2_OUT_ARGS LV1_3_IN_ARGS, LV1_2_OUT_ARGS
14962306a36Sopenharmony_ci#define LV1_4_IN_2_OUT_ARGS LV1_4_IN_ARGS, LV1_2_OUT_ARGS
15062306a36Sopenharmony_ci#define LV1_5_IN_2_OUT_ARGS LV1_5_IN_ARGS, LV1_2_OUT_ARGS
15162306a36Sopenharmony_ci#define LV1_6_IN_2_OUT_ARGS LV1_6_IN_ARGS, LV1_2_OUT_ARGS
15262306a36Sopenharmony_ci#define LV1_7_IN_2_OUT_ARGS LV1_7_IN_ARGS, LV1_2_OUT_ARGS
15362306a36Sopenharmony_ci
15462306a36Sopenharmony_ci#define LV1_0_IN_3_OUT_ARGS                LV1_3_OUT_ARGS
15562306a36Sopenharmony_ci#define LV1_1_IN_3_OUT_ARGS LV1_1_IN_ARGS, LV1_3_OUT_ARGS
15662306a36Sopenharmony_ci#define LV1_2_IN_3_OUT_ARGS LV1_2_IN_ARGS, LV1_3_OUT_ARGS
15762306a36Sopenharmony_ci#define LV1_3_IN_3_OUT_ARGS LV1_3_IN_ARGS, LV1_3_OUT_ARGS
15862306a36Sopenharmony_ci#define LV1_4_IN_3_OUT_ARGS LV1_4_IN_ARGS, LV1_3_OUT_ARGS
15962306a36Sopenharmony_ci#define LV1_5_IN_3_OUT_ARGS LV1_5_IN_ARGS, LV1_3_OUT_ARGS
16062306a36Sopenharmony_ci#define LV1_6_IN_3_OUT_ARGS LV1_6_IN_ARGS, LV1_3_OUT_ARGS
16162306a36Sopenharmony_ci#define LV1_7_IN_3_OUT_ARGS LV1_7_IN_ARGS, LV1_3_OUT_ARGS
16262306a36Sopenharmony_ci
16362306a36Sopenharmony_ci#define LV1_0_IN_4_OUT_ARGS                LV1_4_OUT_ARGS
16462306a36Sopenharmony_ci#define LV1_1_IN_4_OUT_ARGS LV1_1_IN_ARGS, LV1_4_OUT_ARGS
16562306a36Sopenharmony_ci#define LV1_2_IN_4_OUT_ARGS LV1_2_IN_ARGS, LV1_4_OUT_ARGS
16662306a36Sopenharmony_ci#define LV1_3_IN_4_OUT_ARGS LV1_3_IN_ARGS, LV1_4_OUT_ARGS
16762306a36Sopenharmony_ci#define LV1_4_IN_4_OUT_ARGS LV1_4_IN_ARGS, LV1_4_OUT_ARGS
16862306a36Sopenharmony_ci#define LV1_5_IN_4_OUT_ARGS LV1_5_IN_ARGS, LV1_4_OUT_ARGS
16962306a36Sopenharmony_ci#define LV1_6_IN_4_OUT_ARGS LV1_6_IN_ARGS, LV1_4_OUT_ARGS
17062306a36Sopenharmony_ci#define LV1_7_IN_4_OUT_ARGS LV1_7_IN_ARGS, LV1_4_OUT_ARGS
17162306a36Sopenharmony_ci
17262306a36Sopenharmony_ci#define LV1_0_IN_5_OUT_ARGS                LV1_5_OUT_ARGS
17362306a36Sopenharmony_ci#define LV1_1_IN_5_OUT_ARGS LV1_1_IN_ARGS, LV1_5_OUT_ARGS
17462306a36Sopenharmony_ci#define LV1_2_IN_5_OUT_ARGS LV1_2_IN_ARGS, LV1_5_OUT_ARGS
17562306a36Sopenharmony_ci#define LV1_3_IN_5_OUT_ARGS LV1_3_IN_ARGS, LV1_5_OUT_ARGS
17662306a36Sopenharmony_ci#define LV1_4_IN_5_OUT_ARGS LV1_4_IN_ARGS, LV1_5_OUT_ARGS
17762306a36Sopenharmony_ci#define LV1_5_IN_5_OUT_ARGS LV1_5_IN_ARGS, LV1_5_OUT_ARGS
17862306a36Sopenharmony_ci#define LV1_6_IN_5_OUT_ARGS LV1_6_IN_ARGS, LV1_5_OUT_ARGS
17962306a36Sopenharmony_ci#define LV1_7_IN_5_OUT_ARGS LV1_7_IN_ARGS, LV1_5_OUT_ARGS
18062306a36Sopenharmony_ci
18162306a36Sopenharmony_ci#define LV1_0_IN_6_OUT_ARGS                LV1_6_OUT_ARGS
18262306a36Sopenharmony_ci#define LV1_1_IN_6_OUT_ARGS LV1_1_IN_ARGS, LV1_6_OUT_ARGS
18362306a36Sopenharmony_ci#define LV1_2_IN_6_OUT_ARGS LV1_2_IN_ARGS, LV1_6_OUT_ARGS
18462306a36Sopenharmony_ci#define LV1_3_IN_6_OUT_ARGS LV1_3_IN_ARGS, LV1_6_OUT_ARGS
18562306a36Sopenharmony_ci#define LV1_4_IN_6_OUT_ARGS LV1_4_IN_ARGS, LV1_6_OUT_ARGS
18662306a36Sopenharmony_ci#define LV1_5_IN_6_OUT_ARGS LV1_5_IN_ARGS, LV1_6_OUT_ARGS
18762306a36Sopenharmony_ci#define LV1_6_IN_6_OUT_ARGS LV1_6_IN_ARGS, LV1_6_OUT_ARGS
18862306a36Sopenharmony_ci#define LV1_7_IN_6_OUT_ARGS LV1_7_IN_ARGS, LV1_6_OUT_ARGS
18962306a36Sopenharmony_ci
19062306a36Sopenharmony_ci#define LV1_0_IN_7_OUT_ARGS                LV1_7_OUT_ARGS
19162306a36Sopenharmony_ci#define LV1_1_IN_7_OUT_ARGS LV1_1_IN_ARGS, LV1_7_OUT_ARGS
19262306a36Sopenharmony_ci#define LV1_2_IN_7_OUT_ARGS LV1_2_IN_ARGS, LV1_7_OUT_ARGS
19362306a36Sopenharmony_ci#define LV1_3_IN_7_OUT_ARGS LV1_3_IN_ARGS, LV1_7_OUT_ARGS
19462306a36Sopenharmony_ci#define LV1_4_IN_7_OUT_ARGS LV1_4_IN_ARGS, LV1_7_OUT_ARGS
19562306a36Sopenharmony_ci#define LV1_5_IN_7_OUT_ARGS LV1_5_IN_ARGS, LV1_7_OUT_ARGS
19662306a36Sopenharmony_ci#define LV1_6_IN_7_OUT_ARGS LV1_6_IN_ARGS, LV1_7_OUT_ARGS
19762306a36Sopenharmony_ci#define LV1_7_IN_7_OUT_ARGS LV1_7_IN_ARGS, LV1_7_OUT_ARGS
19862306a36Sopenharmony_ci
19962306a36Sopenharmony_ci/*
20062306a36Sopenharmony_ci * This LV1_CALL() macro is for use by callers.  It expands into an
20162306a36Sopenharmony_ci * inline call wrapper and an underscored HV call declaration.  The
20262306a36Sopenharmony_ci * wrapper can be used to instrument the lv1 call interface.  The
20362306a36Sopenharmony_ci * file lv1call.S defines its own LV1_CALL() macro to expand into
20462306a36Sopenharmony_ci * the actual underscored call definition.
20562306a36Sopenharmony_ci */
20662306a36Sopenharmony_ci
20762306a36Sopenharmony_ci#if !defined(LV1_CALL)
20862306a36Sopenharmony_ci#define LV1_CALL(name, in, out, num)                               \
20962306a36Sopenharmony_ci  extern s64 _lv1_##name(LV1_##in##_IN_##out##_OUT_ARG_DECL);      \
21062306a36Sopenharmony_ci  static inline int lv1_##name(LV1_##in##_IN_##out##_OUT_ARG_DECL) \
21162306a36Sopenharmony_ci    {return _lv1_##name(LV1_##in##_IN_##out##_OUT_ARGS);}
21262306a36Sopenharmony_ci#endif
21362306a36Sopenharmony_ci
21462306a36Sopenharmony_ci#endif /* !defined(__ASSEMBLY__) */
21562306a36Sopenharmony_ci
21662306a36Sopenharmony_ci/* lv1 call table */
21762306a36Sopenharmony_ci
21862306a36Sopenharmony_ciLV1_CALL(allocate_memory,                               4, 2,   0 )
21962306a36Sopenharmony_ciLV1_CALL(write_htab_entry,                              4, 0,   1 )
22062306a36Sopenharmony_ciLV1_CALL(construct_virtual_address_space,               3, 2,   2 )
22162306a36Sopenharmony_ciLV1_CALL(invalidate_htab_entries,                       5, 0,   3 )
22262306a36Sopenharmony_ciLV1_CALL(get_virtual_address_space_id_of_ppe,           0, 1,   4 )
22362306a36Sopenharmony_ciLV1_CALL(query_logical_partition_address_region_info,   1, 5,   6 )
22462306a36Sopenharmony_ciLV1_CALL(select_virtual_address_space,                  1, 0,   7 )
22562306a36Sopenharmony_ciLV1_CALL(pause,                                         1, 0,   9 )
22662306a36Sopenharmony_ciLV1_CALL(destruct_virtual_address_space,                1, 0,  10 )
22762306a36Sopenharmony_ciLV1_CALL(configure_irq_state_bitmap,                    3, 0,  11 )
22862306a36Sopenharmony_ciLV1_CALL(connect_irq_plug_ext,                          5, 0,  12 )
22962306a36Sopenharmony_ciLV1_CALL(release_memory,                                1, 0,  13 )
23062306a36Sopenharmony_ciLV1_CALL(put_iopte,                                     5, 0,  15 )
23162306a36Sopenharmony_ciLV1_CALL(disconnect_irq_plug_ext,                       3, 0,  17 )
23262306a36Sopenharmony_ciLV1_CALL(construct_event_receive_port,                  0, 1,  18 )
23362306a36Sopenharmony_ciLV1_CALL(destruct_event_receive_port,                   1, 0,  19 )
23462306a36Sopenharmony_ciLV1_CALL(send_event_locally,                            1, 0,  24 )
23562306a36Sopenharmony_ciLV1_CALL(end_of_interrupt,                              1, 0,  27 )
23662306a36Sopenharmony_ciLV1_CALL(connect_irq_plug,                              2, 0,  28 )
23762306a36Sopenharmony_ciLV1_CALL(disconnect_irq_plug,                           1, 0,  29 )
23862306a36Sopenharmony_ciLV1_CALL(end_of_interrupt_ext,                          3, 0,  30 )
23962306a36Sopenharmony_ciLV1_CALL(did_update_interrupt_mask,                     2, 0,  31 )
24062306a36Sopenharmony_ciLV1_CALL(shutdown_logical_partition,                    1, 0,  44 )
24162306a36Sopenharmony_ciLV1_CALL(destruct_logical_spe,                          1, 0,  54 )
24262306a36Sopenharmony_ciLV1_CALL(construct_logical_spe,                         7, 6,  57 )
24362306a36Sopenharmony_ciLV1_CALL(set_spe_interrupt_mask,                        3, 0,  61 )
24462306a36Sopenharmony_ciLV1_CALL(set_spe_transition_notifier,                   3, 0,  64 )
24562306a36Sopenharmony_ciLV1_CALL(disable_logical_spe,                           2, 0,  65 )
24662306a36Sopenharmony_ciLV1_CALL(clear_spe_interrupt_status,                    4, 0,  66 )
24762306a36Sopenharmony_ciLV1_CALL(get_spe_interrupt_status,                      2, 1,  67 )
24862306a36Sopenharmony_ciLV1_CALL(get_logical_ppe_id,                            0, 1,  69 )
24962306a36Sopenharmony_ciLV1_CALL(set_interrupt_mask,                            5, 0,  73 )
25062306a36Sopenharmony_ciLV1_CALL(get_logical_partition_id,                      0, 1,  74 )
25162306a36Sopenharmony_ciLV1_CALL(configure_execution_time_variable,             1, 0,  77 )
25262306a36Sopenharmony_ciLV1_CALL(get_spe_irq_outlet,                            2, 1,  78 )
25362306a36Sopenharmony_ciLV1_CALL(set_spe_privilege_state_area_1_register,       3, 0,  79 )
25462306a36Sopenharmony_ciLV1_CALL(create_repository_node,                        6, 0,  90 )
25562306a36Sopenharmony_ciLV1_CALL(read_repository_node,                          5, 2,  91 )
25662306a36Sopenharmony_ciLV1_CALL(write_repository_node,                         6, 0,  92 )
25762306a36Sopenharmony_ciLV1_CALL(delete_repository_node,                        4, 0,  93 )
25862306a36Sopenharmony_ciLV1_CALL(read_htab_entries,                             2, 5,  95 )
25962306a36Sopenharmony_ciLV1_CALL(set_dabr,                                      2, 0,  96 )
26062306a36Sopenharmony_ciLV1_CALL(get_total_execution_time,                      2, 1, 103 )
26162306a36Sopenharmony_ciLV1_CALL(allocate_io_segment,                           3, 1, 116 )
26262306a36Sopenharmony_ciLV1_CALL(release_io_segment,                            2, 0, 117 )
26362306a36Sopenharmony_ciLV1_CALL(construct_io_irq_outlet,                       1, 1, 120 )
26462306a36Sopenharmony_ciLV1_CALL(destruct_io_irq_outlet,                        1, 0, 121 )
26562306a36Sopenharmony_ciLV1_CALL(map_htab,                                      1, 1, 122 )
26662306a36Sopenharmony_ciLV1_CALL(unmap_htab,                                    1, 0, 123 )
26762306a36Sopenharmony_ciLV1_CALL(get_version_info,                              0, 2, 127 )
26862306a36Sopenharmony_ciLV1_CALL(insert_htab_entry,                             6, 3, 158 )
26962306a36Sopenharmony_ciLV1_CALL(read_virtual_uart,                             3, 1, 162 )
27062306a36Sopenharmony_ciLV1_CALL(write_virtual_uart,                            3, 1, 163 )
27162306a36Sopenharmony_ciLV1_CALL(set_virtual_uart_param,                        3, 0, 164 )
27262306a36Sopenharmony_ciLV1_CALL(get_virtual_uart_param,                        2, 1, 165 )
27362306a36Sopenharmony_ciLV1_CALL(configure_virtual_uart_irq,                    1, 1, 166 )
27462306a36Sopenharmony_ciLV1_CALL(open_device,                                   3, 0, 170 )
27562306a36Sopenharmony_ciLV1_CALL(close_device,                                  2, 0, 171 )
27662306a36Sopenharmony_ciLV1_CALL(map_device_mmio_region,                        5, 1, 172 )
27762306a36Sopenharmony_ciLV1_CALL(unmap_device_mmio_region,                      3, 0, 173 )
27862306a36Sopenharmony_ciLV1_CALL(allocate_device_dma_region,                    5, 1, 174 )
27962306a36Sopenharmony_ciLV1_CALL(free_device_dma_region,                        3, 0, 175 )
28062306a36Sopenharmony_ciLV1_CALL(map_device_dma_region,                         6, 0, 176 )
28162306a36Sopenharmony_ciLV1_CALL(unmap_device_dma_region,                       4, 0, 177 )
28262306a36Sopenharmony_ciLV1_CALL(net_add_multicast_address,                     4, 0, 185 )
28362306a36Sopenharmony_ciLV1_CALL(net_remove_multicast_address,                  4, 0, 186 )
28462306a36Sopenharmony_ciLV1_CALL(net_start_tx_dma,                              4, 0, 187 )
28562306a36Sopenharmony_ciLV1_CALL(net_stop_tx_dma,                               2, 0, 188 )
28662306a36Sopenharmony_ciLV1_CALL(net_start_rx_dma,                              4, 0, 189 )
28762306a36Sopenharmony_ciLV1_CALL(net_stop_rx_dma,                               2, 0, 190 )
28862306a36Sopenharmony_ciLV1_CALL(net_set_interrupt_status_indicator,            4, 0, 191 )
28962306a36Sopenharmony_ciLV1_CALL(net_set_interrupt_mask,                        4, 0, 193 )
29062306a36Sopenharmony_ciLV1_CALL(net_control,                                   6, 2, 194 )
29162306a36Sopenharmony_ciLV1_CALL(connect_interrupt_event_receive_port,          4, 0, 197 )
29262306a36Sopenharmony_ciLV1_CALL(disconnect_interrupt_event_receive_port,       4, 0, 198 )
29362306a36Sopenharmony_ciLV1_CALL(get_spe_all_interrupt_statuses,                1, 1, 199 )
29462306a36Sopenharmony_ciLV1_CALL(deconfigure_virtual_uart_irq,                  0, 0, 202 )
29562306a36Sopenharmony_ciLV1_CALL(enable_logical_spe,                            2, 0, 207 )
29662306a36Sopenharmony_ciLV1_CALL(gpu_open,                                      1, 0, 210 )
29762306a36Sopenharmony_ciLV1_CALL(gpu_close,                                     0, 0, 211 )
29862306a36Sopenharmony_ciLV1_CALL(gpu_device_map,                                1, 2, 212 )
29962306a36Sopenharmony_ciLV1_CALL(gpu_device_unmap,                              1, 0, 213 )
30062306a36Sopenharmony_ciLV1_CALL(gpu_memory_allocate,                           5, 2, 214 )
30162306a36Sopenharmony_ciLV1_CALL(gpu_memory_free,                               1, 0, 216 )
30262306a36Sopenharmony_ciLV1_CALL(gpu_context_allocate,                          2, 5, 217 )
30362306a36Sopenharmony_ciLV1_CALL(gpu_context_free,                              1, 0, 218 )
30462306a36Sopenharmony_ciLV1_CALL(gpu_context_iomap,                             5, 0, 221 )
30562306a36Sopenharmony_ciLV1_CALL(gpu_context_attribute,                         6, 0, 225 )
30662306a36Sopenharmony_ciLV1_CALL(gpu_context_intr,                              1, 1, 227 )
30762306a36Sopenharmony_ciLV1_CALL(gpu_attribute,                                 3, 0, 228 )
30862306a36Sopenharmony_ciLV1_CALL(get_rtc,                                       0, 2, 232 )
30962306a36Sopenharmony_ciLV1_CALL(set_ppe_periodic_tracer_frequency,             1, 0, 240 )
31062306a36Sopenharmony_ciLV1_CALL(start_ppe_periodic_tracer,                     5, 0, 241 )
31162306a36Sopenharmony_ciLV1_CALL(stop_ppe_periodic_tracer,                      1, 1, 242 )
31262306a36Sopenharmony_ciLV1_CALL(storage_read,                                  6, 1, 245 )
31362306a36Sopenharmony_ciLV1_CALL(storage_write,                                 6, 1, 246 )
31462306a36Sopenharmony_ciLV1_CALL(storage_send_device_command,                   6, 1, 248 )
31562306a36Sopenharmony_ciLV1_CALL(storage_get_async_status,                      1, 2, 249 )
31662306a36Sopenharmony_ciLV1_CALL(storage_check_async_status,                    2, 1, 254 )
31762306a36Sopenharmony_ciLV1_CALL(panic,                                         1, 0, 255 )
31862306a36Sopenharmony_ciLV1_CALL(construct_lpm,                                 6, 3, 140 )
31962306a36Sopenharmony_ciLV1_CALL(destruct_lpm,                                  1, 0, 141 )
32062306a36Sopenharmony_ciLV1_CALL(start_lpm,                                     1, 0, 142 )
32162306a36Sopenharmony_ciLV1_CALL(stop_lpm,                                      1, 1, 143 )
32262306a36Sopenharmony_ciLV1_CALL(copy_lpm_trace_buffer,                         3, 1, 144 )
32362306a36Sopenharmony_ciLV1_CALL(add_lpm_event_bookmark,                        5, 0, 145 )
32462306a36Sopenharmony_ciLV1_CALL(delete_lpm_event_bookmark,                     3, 0, 146 )
32562306a36Sopenharmony_ciLV1_CALL(set_lpm_interrupt_mask,                        3, 1, 147 )
32662306a36Sopenharmony_ciLV1_CALL(get_lpm_interrupt_status,                      1, 1, 148 )
32762306a36Sopenharmony_ciLV1_CALL(set_lpm_general_control,                       5, 2, 149 )
32862306a36Sopenharmony_ciLV1_CALL(set_lpm_interval,                              3, 1, 150 )
32962306a36Sopenharmony_ciLV1_CALL(set_lpm_trigger_control,                       3, 1, 151 )
33062306a36Sopenharmony_ciLV1_CALL(set_lpm_counter_control,                       4, 1, 152 )
33162306a36Sopenharmony_ciLV1_CALL(set_lpm_group_control,                         3, 1, 153 )
33262306a36Sopenharmony_ciLV1_CALL(set_lpm_debug_bus_control,                     3, 1, 154 )
33362306a36Sopenharmony_ciLV1_CALL(set_lpm_counter,                               5, 2, 155 )
33462306a36Sopenharmony_ciLV1_CALL(set_lpm_signal,                                7, 0, 156 )
33562306a36Sopenharmony_ciLV1_CALL(set_lpm_spr_trigger,                           2, 0, 157 )
33662306a36Sopenharmony_ci
33762306a36Sopenharmony_ci#endif
338