This source file includes following definitions.
- mmio_nvram_init
1
2
3
4
5 #ifndef _ASM_POWERPC_NVRAM_H
6 #define _ASM_POWERPC_NVRAM_H
7
8 #include <linux/types.h>
9 #include <linux/errno.h>
10 #include <linux/list.h>
11 #include <uapi/asm/nvram.h>
12
13
14
15
16
17
18 #define OOPS_HDR_VERSION 5000
19
20 struct err_log_info {
21 __be32 error_type;
22 __be32 seq_num;
23 };
24
25 struct nvram_os_partition {
26 const char *name;
27 int req_size;
28 int min_size;
29 long size;
30 long index;
31 bool os_partition;
32 };
33
34 struct oops_log_info {
35 __be16 version;
36 __be16 report_length;
37 __be64 timestamp;
38 } __attribute__((packed));
39
40 extern struct nvram_os_partition oops_log_partition;
41
42 #ifdef CONFIG_PPC_PSERIES
43 extern struct nvram_os_partition rtas_log_partition;
44
45 extern int nvram_write_error_log(char * buff, int length,
46 unsigned int err_type, unsigned int err_seq);
47 extern int nvram_read_error_log(char * buff, int length,
48 unsigned int * err_type, unsigned int *err_seq);
49 extern int nvram_clear_error_log(void);
50 extern int pSeries_nvram_init(void);
51 #endif
52
53 #ifdef CONFIG_MMIO_NVRAM
54 extern int mmio_nvram_init(void);
55 #else
56 static inline int mmio_nvram_init(void)
57 {
58 return -ENODEV;
59 }
60 #endif
61
62 extern int __init nvram_scan_partitions(void);
63 extern loff_t nvram_create_partition(const char *name, int sig,
64 int req_size, int min_size);
65 extern int nvram_remove_partition(const char *name, int sig,
66 const char *exceptions[]);
67 extern int nvram_get_partition_size(loff_t data_index);
68 extern loff_t nvram_find_partition(const char *name, int sig, int *out_size);
69
70
71 extern int pmac_get_partition(int partition);
72
73
74 extern u8 pmac_xpram_read(int xpaddr);
75 extern void pmac_xpram_write(int xpaddr, u8 data);
76
77
78 extern int __init nvram_init_os_partition(struct nvram_os_partition *part);
79
80
81 extern void __init nvram_init_oops_partition(int rtas_partition_exists);
82
83
84 extern int nvram_read_partition(struct nvram_os_partition *part, char *buff,
85 int length, unsigned int *err_type,
86 unsigned int *error_log_cnt);
87
88
89 extern int nvram_write_os_partition(struct nvram_os_partition *part,
90 char *buff, int length,
91 unsigned int err_type,
92 unsigned int error_log_cnt);
93
94 #endif