xref: /illumos-gate/usr/src/test/bhyve-tests/tests/common/payload_common.h (revision 5103e761e384621c5728a6d1f4b0bfdc1be233a4)
1 /*
2  * This file and its contents are supplied under the terms of the
3  * Common Development and Distribution License ("CDDL"), version 1.0.
4  * You may only use this file in accordance with the terms of version
5  * 1.0 of the CDDL.
6  *
7  * A full copy of the text of the CDDL should have accompanied this
8  * source.  A copy of the CDDL is also available via the Internet at
9  * http://www.illumos.org/license/CDDL.
10  */
11 
12 /*
13  * Copyright 2022 Oxide Computer Company
14  */
15 
16 #ifndef _PAYLOAD_COMMON_H_
17 #define	_PAYLOAD_COMMON_H_
18 
19 #define	MEM_TOTAL_SZ	(64 * 1024 * 1024)
20 
21 /* 2MiB-page entries for identity-mapped table at 2MiB */
22 #define	MEM_LOC_PAGE_TABLE_2M	0x200000
23 #define	MEM_LOC_PAGE_TABLE_1G	0x204000
24 #define	MEM_LOC_PAGE_TABLE_512G	0x205000
25 #define	MEM_LOC_GDT		0x206000
26 #define	MEM_LOC_TSS		0x206200
27 #define	MEM_LOC_IDT		0x207000
28 #define	MEM_LOC_STACK		0x400000
29 #define	MEM_LOC_PAYLOAD		0x800000
30 
31 /* IO port set aside for emitting test result */
32 #define	IOP_TEST_RESULT		0xef00U
33 
34 /* IO port set aside for emitting test value */
35 #define	IOP_TEST_VALUE		0xef10U
36 
37 /* IO port set aside for inputting test param(s) */
38 #define	IOP_TEST_PARAM		IOP_TEST_PARAM0
39 #define	IOP_TEST_PARAM0		0xef20U
40 #define	IOP_TEST_PARAM1		0xef21U
41 #define	IOP_TEST_PARAM2		0xef22U
42 #define	IOP_TEST_PARAM3		0xef23U
43 
44 #endif /* _PAYLOAD_COMMON_H_ */
45