Blame view

include/acpi/apei.h 1.34 KB
b24413180   Greg Kroah-Hartman   License cleanup: ...
1
  /* SPDX-License-Identifier: GPL-2.0 */
9dc966641   Huang Ying   ACPI, APEI, HEST ...
2
3
4
5
6
7
  /*
   * apei.h - ACPI Platform Error Interface
   */
  
  #ifndef ACPI_APEI_H
  #define ACPI_APEI_H
a08f82d08   Huang Ying   ACPI, APEI, Error...
8
9
10
11
12
13
14
15
16
17
  #include <linux/acpi.h>
  #include <linux/cper.h>
  #include <asm/ioctls.h>
  
  #define APEI_ERST_INVALID_RECORD_ID	0xffffffffffffffffULL
  
  #define APEI_ERST_CLEAR_RECORD		_IOW('E', 1, u64)
  #define APEI_ERST_GET_RECORD_COUNT	_IOR('E', 2, u32)
  
  #ifdef __KERNEL__
e931d0dab   Punit Agrawal   ACPI / APEI: Supp...
18
19
20
21
22
23
24
  enum hest_status {
  	HEST_ENABLED,
  	HEST_DISABLED,
  	HEST_NOT_FOUND,
  };
  
  extern int hest_disable;
a08f82d08   Huang Ying   ACPI, APEI, Error...
25
  extern int erst_disable;
a7e09d450   Len Brown   ACPI: APEI build fix
26
  #ifdef CONFIG_ACPI_APEI_GHES
90ab5ee94   Rusty Russell   module_param: mak...
27
  extern bool ghes_disable;
a7e09d450   Len Brown   ACPI: APEI build fix
28
29
30
  #else
  #define ghes_disable 1
  #endif
9dc966641   Huang Ying   ACPI, APEI, HEST ...
31

415e12b23   Rafael J. Wysocki   PCI/ACPI: Request...
32
33
34
35
36
  #ifdef CONFIG_ACPI_APEI
  void __init acpi_hest_init(void);
  #else
  static inline void acpi_hest_init(void) { return; }
  #endif
9dc966641   Huang Ying   ACPI, APEI, HEST ...
37
38
  typedef int (*apei_hest_func_t)(struct acpi_hest_header *hest_hdr, void *data);
  int apei_hest_parse(apei_hest_func_t func, void *data);
a08f82d08   Huang Ying   ACPI, APEI, Error...
39
40
  int erst_write(const struct cper_record_header *record);
  ssize_t erst_get_record_count(void);
885b976fa   Huang Ying   ACPI, APEI, Add E...
41
42
43
  int erst_get_record_id_begin(int *pos);
  int erst_get_record_id_next(int *pos, u64 *record_id);
  void erst_get_record_id_end(void);
a08f82d08   Huang Ying   ACPI, APEI, Error...
44
45
  ssize_t erst_read(u64 record_id, struct cper_record_header *record,
  		  size_t buflen);
a08f82d08   Huang Ying   ACPI, APEI, Error...
46
  int erst_clear(u64 record_id);
9dae3d0d9   Tomasz Nowicki   apei, mce: Factor...
47
48
  int arch_apei_enable_cmcff(struct acpi_hest_header *hest_hdr, void *data);
  void arch_apei_report_mem_error(int sev, struct cper_sec_mem_err *mem_err);
a08f82d08   Huang Ying   ACPI, APEI, Error...
49
  #endif
9dc966641   Huang Ying   ACPI, APEI, HEST ...
50
  #endif