1
2
3
4
5
6
7
8
9 #ifndef _PSERIES_RTAS_FADUMP_H
10 #define _PSERIES_RTAS_FADUMP_H
11
12
13
14
15
16
17
18
19 #define RTAS_FADUMP_MIN_BOOT_MEM ((0x1UL << 28) + (0x1UL << 26))
20
21
22 #define RTAS_FADUMP_CPU_STATE_DATA 0x0001
23 #define RTAS_FADUMP_HPTE_REGION 0x0002
24 #define RTAS_FADUMP_REAL_MODE_REGION 0x0011
25
26
27 #define RTAS_FADUMP_REQUEST_FLAG 0x00000001
28
29
30 #define RTAS_FADUMP_ERROR_FLAG 0x2000
31
32
33 struct rtas_fadump_section {
34 __be32 request_flag;
35 __be16 source_data_type;
36 __be16 error_flags;
37 __be64 source_address;
38 __be64 source_len;
39 __be64 bytes_dumped;
40 __be64 destination_address;
41 };
42
43
44 struct rtas_fadump_section_header {
45 __be32 dump_format_version;
46 __be16 dump_num_sections;
47 __be16 dump_status_flag;
48 __be32 offset_first_dump_section;
49
50
51 __be32 dd_block_size;
52 __be64 dd_block_offset;
53 __be64 dd_num_blocks;
54 __be32 dd_offset_disk_path;
55
56
57 __be32 max_time_auto;
58 };
59
60
61
62
63
64
65
66 struct rtas_fadump_mem_struct {
67 struct rtas_fadump_section_header header;
68
69
70 struct rtas_fadump_section cpu_state_data;
71 struct rtas_fadump_section hpte_region;
72
73
74
75
76
77 struct rtas_fadump_section rmr_region;
78 };
79
80
81
82
83
84
85
86
87
88
89
90
91 struct rtas_fadump_reg_save_area_header {
92 __be64 magic_number;
93 __be32 version;
94 __be32 num_cpu_offset;
95 };
96
97
98 struct rtas_fadump_reg_entry {
99 __be64 reg_id;
100 __be64 reg_value;
101 };
102
103
104 #define RTAS_FADUMP_SKIP_TO_NEXT_CPU(reg_entry) \
105 ({ \
106 while (be64_to_cpu(reg_entry->reg_id) != \
107 fadump_str_to_u64("CPUEND")) \
108 reg_entry++; \
109 reg_entry++; \
110 })
111
112 #define RTAS_FADUMP_CPU_ID_MASK ((1UL << 32) - 1)
113
114 #endif