1
2
3
4
5
6
7
8
9#define TAR_1 10
10#define TAR_2 20
11#define TAR_3 30
12#define TAR_4 40
13#define TAR_5 50
14
15#define DSCR_1 100
16#define DSCR_2 200
17#define DSCR_3 300
18#define DSCR_4 400
19#define DSCR_5 500
20
21#define PPR_1 0x4000000000000
22#define PPR_2 0x8000000000000
23#define PPR_3 0xc000000000000
24#define PPR_4 0x10000000000000
25
26char *user_read = "[User Read (Running)]";
27char *user_write = "[User Write (Running)]";
28char *ptrace_read_running = "[Ptrace Read (Running)]";
29char *ptrace_write_running = "[Ptrace Write (Running)]";
30char *ptrace_read_ckpt = "[Ptrace Read (Checkpointed)]";
31char *ptrace_write_ckpt = "[Ptrace Write (Checkpointed)]";
32
33int validate_tar_registers(unsigned long *reg, unsigned long tar,
34 unsigned long ppr, unsigned long dscr)
35{
36 int match = 1;
37
38 if (reg[0] != tar)
39 match = 0;
40
41 if (reg[1] != ppr)
42 match = 0;
43
44 if (reg[2] != dscr)
45 match = 0;
46
47 if (!match)
48 return TEST_FAIL;
49 return TEST_PASS;
50}
51