master
h 55 lines 1.53 KB
Raw
1 /*
2 * Copyright (c) 2018 Red Hat, Inc. and/or its affiliates
3 *
4 * This work is licensed under the terms of the GNU GPL, version 2 or later.
5 * See the COPYING file in the top-level directory.
6 */
7
8 #ifndef BOOTFILE_H
9 #define BOOTFILE_H
10
11 /*
12 * This file is included from qtest, but also from the assembly code
13 * that generates the header file containing the guest workload. Don't
14 * expose the function declarations and non-standard types to it.
15 */
16 #ifdef __ASSEMBLER__
17 #define MIGRATION_GUEST_CODE
18 #endif
19
20 /* Common */
21 #define TEST_MEM_PAGE_SIZE 4096
22
23 /* x86 */
24 #define X86_TEST_MEM_START (1 * 1024 * 1024)
25 #define X86_TEST_MEM_END (100 * 1024 * 1024)
26
27 /* S390 */
28 #define S390_TEST_MEM_START (1 * 1024 * 1024)
29 #define S390_TEST_MEM_END (100 * 1024 * 1024)
30
31 /* PPC */
32 #define PPC_TEST_MEM_START (1 * 1024 * 1024)
33 #define PPC_TEST_MEM_END (100 * 1024 * 1024)
34 #define PPC_H_PUT_TERM_CHAR 0x58
35
36 /* ARM */
37 #define ARM_TEST_MEM_START (0x40000000 + 1 * 1024 * 1024)
38 #define ARM_TEST_MEM_END (0x40000000 + 100 * 1024 * 1024)
39 #define ARM_MACH_VIRT_UART 0x09000000
40 /* AArch64 kernel load address is 0x40080000, and the test memory starts at
41 * 0x40100000. So the maximum allowable kernel size is 512KB.
42 */
43 #define ARM_TEST_MAX_KERNEL_SIZE (512 * 1024)
44
45 /* LoongArch64 */
46 #define LOONGARCH_TEST_MEM_START (32 * 1024 * 1024)
47 #define LOONGARCH_TEST_MEM_END (100 * 1024 * 1024)
48
49 #ifndef MIGRATION_GUEST_CODE
50 void bootfile_delete(void);
51 char *bootfile_create(const char *arch, const char *dir, bool suspend_me);
52 char *bootfile_get(void);
53 #endif
54
55 #endif /* BOOTFILE_H */