forked from open-power/pdbg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake-backend.dts.m4
52 lines (44 loc) · 1.06 KB
/
fake-backend.dts.m4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
define(`CONCAT', `$1$2')dnl
dnl
dnl forloop([var], [start], [end], [iterator])
dnl
divert(`-1')
define(`forloop', `pushdef(`$1', `$2')_forloop($@)popdef(`$1')')
define(`_forloop',
`$4`'ifelse($1, `$3', `', `define(`$1', incr($1))$0($@)')')
dnl
dnl dump_backend([index], [addr])
dnl
define(`dump_backend',dnl
`define(`pib_addr', eval(`$2+100'))dnl
fsi@$2 {
#address-cells = <0x1>;
#size-cells = <0x1>;
compatible = "ibm,fake-fsi";
system-path = "/proc$1/fsi";
reg = <0x0 0x0>;
index = <0x$1>;
CONCAT(pib@,pib_addr) {
#address-cells = <0x1>;
#size-cells = <0x1>;
compatible = "ibm,fake-pib";
system-path = "/proc$1/pib";
reg = <CONCAT(0x,pib_addr) 0x0>;
index = <0x$1>;
ATTR1 = <0xc0ffee>;
};
};
')dnl
dnl
dnl dump_system([num_processors], [num_cores], [num_threads])
dnl
define(`dump_system',
`forloop(`i', `0', eval(`$1-1'), `dump_backend(i, eval(20000+i*1000))')
')
divert`'dnl
/dts-v1/;
/ {
#address-cells = <0x1>;
#size-cells = <0x1>;
dump_system(8, 4, 2)
};