This source file includes following definitions.
- reg_access
- main
1
2
3
4
5
6 #include <stdio.h>
7 #include <stdlib.h>
8
9 #include "ebb.h"
10
11
12
13
14
15
16 int reg_access(void)
17 {
18 uint64_t val, expected;
19
20 SKIP_IF(!ebb_is_supported());
21
22 expected = 0x8000000100000000ull;
23 mtspr(SPRN_BESCR, expected);
24 val = mfspr(SPRN_BESCR);
25
26 FAIL_IF(val != expected);
27
28 expected = 0x0000000001000000ull;
29 mtspr(SPRN_EBBHR, expected);
30 val = mfspr(SPRN_EBBHR);
31
32 FAIL_IF(val != expected);
33
34 return 0;
35 }
36
37 int main(void)
38 {
39 return test_harness(reg_access, "reg_access");
40 }