xref: /netbsd-src/external/gpl2/dtc/dist/tests/testdata.h (revision 1580a27b92f58fcdcb23fdfbc04a7c2b54a0b7c8)
1 /*	$NetBSD: testdata.h,v 1.1.1.2 2017/06/08 15:59:27 skrll Exp $	*/
2 
3 #ifdef __ASSEMBLY__
4 #define ASM_CONST_LL(x)	(x)
5 #else
6 #define ASM_CONST_LL(x)	(x##ULL)
7 #endif
8 
9 #define TEST_ADDR_1	ASM_CONST_LL(0xdeadbeef00000000)
10 #define TEST_SIZE_1	ASM_CONST_LL(0x100000)
11 #define TEST_ADDR_2	ASM_CONST_LL(123456789)
12 #define TEST_SIZE_2	ASM_CONST_LL(010000)
13 
14 #define TEST_VALUE_1	0xdeadbeef
15 #define TEST_VALUE_2	123456789
16 
17 #define TEST_VALUE64_1	ASM_CONST_LL(0xdeadbeef01abcdef)
18 
19 #define PHANDLE_1	0x2000
20 #define PHANDLE_2	0x2001
21 
22 #define TEST_STRING_1	"hello world"
23 #define TEST_STRING_2	"nastystring: \a\b\t\n\v\f\r\\\""
24 #define TEST_STRING_3	"\xde\xad\xbe\xef"
25 
26 #define TEST_STRING_4_PARTIAL	"foobar"
27 #define TEST_STRING_4_RESULT	"testfoobar"
28 
29 #define TEST_CHAR1	'\r'
30 #define TEST_CHAR2	'b'
31 #define TEST_CHAR3	'\0'
32 #define TEST_CHAR4	'\''
33 #define TEST_CHAR5	'\xff'
34 
35 #ifndef __ASSEMBLY__
36 extern struct fdt_header _test_tree1;
37 extern struct fdt_header _truncated_property;
38 extern struct fdt_header _bad_node_char;
39 extern struct fdt_header _bad_node_format;
40 extern struct fdt_header _bad_prop_char;
41 extern struct fdt_header _ovf_size_strings;
42 #endif /* ! __ASSEMBLY */
43