1 // SPDX-License-Identifier: GPL-2.0-only
3 * APEI Error INJection support
5 * EINJ provides a hardware error injection mechanism, this is useful
6 * for debugging and testing of other APEI and RAS features.
8 * For more information about EINJ, please refer to ACPI Specification
9 * version 4.0, section 17.5.
11 * Copyright 2009-2010 Intel Corp.
12 * Author: Huang Ying <ying.huang@intel.com>
15 #include <linux/kernel.h>
16 #include <linux/module.h>
17 #include <linux/init.h>
19 #include <linux/debugfs.h>
20 #include <linux/seq_file.h>
21 #include <linux/nmi.h>
22 #include <linux/delay.h>
24 #include <asm/unaligned.h>
26 #include "apei-internal.h"
29 #define pr_fmt(fmt) "EINJ: " fmt
31 #define SPIN_UNIT 100 /* 100ns */
32 /* Firmware should respond within 1 milliseconds */
33 #define FIRMWARE_TIMEOUT (1 * NSEC_PER_MSEC)
34 #define ACPI5_VENDOR_BIT BIT(31)
35 #define MEM_ERROR_MASK (ACPI_EINJ_MEMORY_CORRECTABLE | \
36 ACPI_EINJ_MEMORY_UNCORRECTABLE | \
37 ACPI_EINJ_MEMORY_FATAL)
40 * ACPI version 5 provides a SET_ERROR_TYPE_WITH_ADDRESS action.
44 struct set_error_type_with_address
{
50 u64 memory_address_range
;
54 SETWA_FLAGS_APICID
= 1,
56 SETWA_FLAGS_PCIE_SBDF
= 4,
60 * Vendor extensions for platform specific operations
62 struct vendor_error_type_extension
{
73 static u32 vendor_flags
;
74 static struct debugfs_blob_wrapper vendor_blob
;
75 static char vendor_dev
[64];
78 * Some BIOSes allow parameters to the SET_ERROR_TYPE entries in the
79 * EINJ table through an unpublished extension. Use with caution as
80 * most will ignore the parameter and make their own choice of address
81 * for error injection. This extension is used only if
82 * param_extension module parameter is specified.
84 struct einj_parameter
{
92 #define EINJ_OP_BUSY 0x1
93 #define EINJ_STATUS_SUCCESS 0x0
94 #define EINJ_STATUS_FAIL 0x1
95 #define EINJ_STATUS_INVAL 0x2
97 #define EINJ_TAB_ENTRY(tab) \
98 ((struct acpi_whea_header *)((char *)(tab) + \
99 sizeof(struct acpi_table_einj)))
101 static bool param_extension
;
102 module_param(param_extension
, bool, 0);
104 static struct acpi_table_einj
*einj_tab
;
106 static struct apei_resources einj_resources
;
108 static struct apei_exec_ins_type einj_ins_type
[] = {
109 [ACPI_EINJ_READ_REGISTER
] = {
110 .flags
= APEI_EXEC_INS_ACCESS_REGISTER
,
111 .run
= apei_exec_read_register
,
113 [ACPI_EINJ_READ_REGISTER_VALUE
] = {
114 .flags
= APEI_EXEC_INS_ACCESS_REGISTER
,
115 .run
= apei_exec_read_register_value
,
117 [ACPI_EINJ_WRITE_REGISTER
] = {
118 .flags
= APEI_EXEC_INS_ACCESS_REGISTER
,
119 .run
= apei_exec_write_register
,
121 [ACPI_EINJ_WRITE_REGISTER_VALUE
] = {
122 .flags
= APEI_EXEC_INS_ACCESS_REGISTER
,
123 .run
= apei_exec_write_register_value
,
127 .run
= apei_exec_noop
,
132 * Prevent EINJ interpreter to run simultaneously, because the
133 * corresponding firmware implementation may not work properly when
134 * invoked simultaneously.
136 static DEFINE_MUTEX(einj_mutex
);
138 static void *einj_param
;
140 static void einj_exec_ctx_init(struct apei_exec_context
*ctx
)
142 apei_exec_ctx_init(ctx
, einj_ins_type
, ARRAY_SIZE(einj_ins_type
),
143 EINJ_TAB_ENTRY(einj_tab
), einj_tab
->entries
);
146 static int __einj_get_available_error_type(u32
*type
)
148 struct apei_exec_context ctx
;
151 einj_exec_ctx_init(&ctx
);
152 rc
= apei_exec_run(&ctx
, ACPI_EINJ_GET_ERROR_TYPE
);
155 *type
= apei_exec_ctx_get_output(&ctx
);
160 /* Get error injection capabilities of the platform */
161 static int einj_get_available_error_type(u32
*type
)
165 mutex_lock(&einj_mutex
);
166 rc
= __einj_get_available_error_type(type
);
167 mutex_unlock(&einj_mutex
);
172 static int einj_timedout(u64
*t
)
174 if ((s64
)*t
< SPIN_UNIT
) {
175 pr_warn(FW_WARN
"Firmware does not respond in time\n");
180 touch_nmi_watchdog();
184 static void check_vendor_extension(u64 paddr
,
185 struct set_error_type_with_address
*v5param
)
187 int offset
= v5param
->vendor_extension
;
188 struct vendor_error_type_extension
*v
;
193 v
= acpi_os_map_iomem(paddr
+ offset
, sizeof(*v
));
197 sprintf(vendor_dev
, "%x:%x:%x.%x vendor_id=%x device_id=%x rev_id=%x\n",
198 sbdf
>> 24, (sbdf
>> 16) & 0xff,
199 (sbdf
>> 11) & 0x1f, (sbdf
>> 8) & 0x7,
200 v
->vendor_id
, v
->device_id
, v
->rev_id
);
201 acpi_os_unmap_iomem(v
, sizeof(*v
));
204 static void *einj_get_parameter_address(void)
207 u64 pa_v4
= 0, pa_v5
= 0;
208 struct acpi_whea_header
*entry
;
210 entry
= EINJ_TAB_ENTRY(einj_tab
);
211 for (i
= 0; i
< einj_tab
->entries
; i
++) {
212 if (entry
->action
== ACPI_EINJ_SET_ERROR_TYPE
&&
213 entry
->instruction
== ACPI_EINJ_WRITE_REGISTER
&&
214 entry
->register_region
.space_id
==
215 ACPI_ADR_SPACE_SYSTEM_MEMORY
)
216 pa_v4
= get_unaligned(&entry
->register_region
.address
);
217 if (entry
->action
== ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS
&&
218 entry
->instruction
== ACPI_EINJ_WRITE_REGISTER
&&
219 entry
->register_region
.space_id
==
220 ACPI_ADR_SPACE_SYSTEM_MEMORY
)
221 pa_v5
= get_unaligned(&entry
->register_region
.address
);
225 struct set_error_type_with_address
*v5param
;
227 v5param
= acpi_os_map_iomem(pa_v5
, sizeof(*v5param
));
230 check_vendor_extension(pa_v5
, v5param
);
234 if (param_extension
&& pa_v4
) {
235 struct einj_parameter
*v4param
;
237 v4param
= acpi_os_map_iomem(pa_v4
, sizeof(*v4param
));
240 if (v4param
->reserved1
|| v4param
->reserved2
) {
241 acpi_os_unmap_iomem(v4param
, sizeof(*v4param
));
250 /* do sanity check to trigger table */
251 static int einj_check_trigger_header(struct acpi_einj_trigger
*trigger_tab
)
253 if (trigger_tab
->header_size
!= sizeof(struct acpi_einj_trigger
))
255 if (trigger_tab
->table_size
> PAGE_SIZE
||
256 trigger_tab
->table_size
< trigger_tab
->header_size
)
258 if (trigger_tab
->entry_count
!=
259 (trigger_tab
->table_size
- trigger_tab
->header_size
) /
260 sizeof(struct acpi_einj_entry
))
266 static struct acpi_generic_address
*einj_get_trigger_parameter_region(
267 struct acpi_einj_trigger
*trigger_tab
, u64 param1
, u64 param2
)
270 struct acpi_whea_header
*entry
;
272 entry
= (struct acpi_whea_header
*)
273 ((char *)trigger_tab
+ sizeof(struct acpi_einj_trigger
));
274 for (i
= 0; i
< trigger_tab
->entry_count
; i
++) {
275 if (entry
->action
== ACPI_EINJ_TRIGGER_ERROR
&&
276 entry
->instruction
<= ACPI_EINJ_WRITE_REGISTER_VALUE
&&
277 entry
->register_region
.space_id
==
278 ACPI_ADR_SPACE_SYSTEM_MEMORY
&&
279 (entry
->register_region
.address
& param2
) == (param1
& param2
))
280 return &entry
->register_region
;
286 /* Execute instructions in trigger error action table */
287 static int __einj_error_trigger(u64 trigger_paddr
, u32 type
,
288 u64 param1
, u64 param2
)
290 struct acpi_einj_trigger
*trigger_tab
= NULL
;
291 struct apei_exec_context trigger_ctx
;
292 struct apei_resources trigger_resources
;
293 struct acpi_whea_header
*trigger_entry
;
297 struct acpi_generic_address
*trigger_param_region
= NULL
;
299 r
= request_mem_region(trigger_paddr
, sizeof(*trigger_tab
),
300 "APEI EINJ Trigger Table");
302 pr_err("Can not request [mem %#010llx-%#010llx] for Trigger table\n",
303 (unsigned long long)trigger_paddr
,
304 (unsigned long long)trigger_paddr
+
305 sizeof(*trigger_tab
) - 1);
308 trigger_tab
= ioremap_cache(trigger_paddr
, sizeof(*trigger_tab
));
310 pr_err("Failed to map trigger table!\n");
313 rc
= einj_check_trigger_header(trigger_tab
);
315 pr_warn(FW_BUG
"Invalid trigger error action table.\n");
319 /* No action structures in the TRIGGER_ERROR table, nothing to do */
320 if (!trigger_tab
->entry_count
)
324 table_size
= trigger_tab
->table_size
;
325 r
= request_mem_region(trigger_paddr
+ sizeof(*trigger_tab
),
326 table_size
- sizeof(*trigger_tab
),
327 "APEI EINJ Trigger Table");
329 pr_err("Can not request [mem %#010llx-%#010llx] for Trigger Table Entry\n",
330 (unsigned long long)trigger_paddr
+ sizeof(*trigger_tab
),
331 (unsigned long long)trigger_paddr
+ table_size
- 1);
334 iounmap(trigger_tab
);
335 trigger_tab
= ioremap_cache(trigger_paddr
, table_size
);
337 pr_err("Failed to map trigger table!\n");
340 trigger_entry
= (struct acpi_whea_header
*)
341 ((char *)trigger_tab
+ sizeof(struct acpi_einj_trigger
));
342 apei_resources_init(&trigger_resources
);
343 apei_exec_ctx_init(&trigger_ctx
, einj_ins_type
,
344 ARRAY_SIZE(einj_ins_type
),
345 trigger_entry
, trigger_tab
->entry_count
);
346 rc
= apei_exec_collect_resources(&trigger_ctx
, &trigger_resources
);
349 rc
= apei_resources_sub(&trigger_resources
, &einj_resources
);
353 * Some firmware will access target address specified in
354 * param1 to trigger the error when injecting memory error.
355 * This will cause resource conflict with regular memory. So
356 * remove it from trigger table resources.
358 if ((param_extension
|| acpi5
) && (type
& MEM_ERROR_MASK
) && param2
) {
359 struct apei_resources addr_resources
;
360 apei_resources_init(&addr_resources
);
361 trigger_param_region
= einj_get_trigger_parameter_region(
362 trigger_tab
, param1
, param2
);
363 if (trigger_param_region
) {
364 rc
= apei_resources_add(&addr_resources
,
365 trigger_param_region
->address
,
366 trigger_param_region
->bit_width
/8, true);
369 rc
= apei_resources_sub(&trigger_resources
,
372 apei_resources_fini(&addr_resources
);
376 rc
= apei_resources_request(&trigger_resources
, "APEI EINJ Trigger");
379 rc
= apei_exec_pre_map_gars(&trigger_ctx
);
383 rc
= apei_exec_run(&trigger_ctx
, ACPI_EINJ_TRIGGER_ERROR
);
385 apei_exec_post_unmap_gars(&trigger_ctx
);
387 apei_resources_release(&trigger_resources
);
389 apei_resources_fini(&trigger_resources
);
391 release_mem_region(trigger_paddr
+ sizeof(*trigger_tab
),
392 table_size
- sizeof(*trigger_tab
));
394 release_mem_region(trigger_paddr
, sizeof(*trigger_tab
));
397 iounmap(trigger_tab
);
402 static int __einj_error_inject(u32 type
, u32 flags
, u64 param1
, u64 param2
,
403 u64 param3
, u64 param4
)
405 struct apei_exec_context ctx
;
406 u64 val
, trigger_paddr
, timeout
= FIRMWARE_TIMEOUT
;
409 einj_exec_ctx_init(&ctx
);
411 rc
= apei_exec_run_optional(&ctx
, ACPI_EINJ_BEGIN_OPERATION
);
414 apei_exec_ctx_set_input(&ctx
, type
);
416 struct set_error_type_with_address
*v5param
= einj_param
;
418 v5param
->type
= type
;
419 if (type
& ACPI5_VENDOR_BIT
) {
420 switch (vendor_flags
) {
421 case SETWA_FLAGS_APICID
:
422 v5param
->apicid
= param1
;
424 case SETWA_FLAGS_MEM
:
425 v5param
->memory_address
= param1
;
426 v5param
->memory_address_range
= param2
;
428 case SETWA_FLAGS_PCIE_SBDF
:
429 v5param
->pcie_sbdf
= param1
;
432 v5param
->flags
= vendor_flags
;
434 v5param
->flags
= flags
;
435 v5param
->memory_address
= param1
;
436 v5param
->memory_address_range
= param2
;
437 v5param
->apicid
= param3
;
438 v5param
->pcie_sbdf
= param4
;
441 case ACPI_EINJ_PROCESSOR_CORRECTABLE
:
442 case ACPI_EINJ_PROCESSOR_UNCORRECTABLE
:
443 case ACPI_EINJ_PROCESSOR_FATAL
:
444 v5param
->apicid
= param1
;
445 v5param
->flags
= SETWA_FLAGS_APICID
;
447 case ACPI_EINJ_MEMORY_CORRECTABLE
:
448 case ACPI_EINJ_MEMORY_UNCORRECTABLE
:
449 case ACPI_EINJ_MEMORY_FATAL
:
450 v5param
->memory_address
= param1
;
451 v5param
->memory_address_range
= param2
;
452 v5param
->flags
= SETWA_FLAGS_MEM
;
454 case ACPI_EINJ_PCIX_CORRECTABLE
:
455 case ACPI_EINJ_PCIX_UNCORRECTABLE
:
456 case ACPI_EINJ_PCIX_FATAL
:
457 v5param
->pcie_sbdf
= param1
;
458 v5param
->flags
= SETWA_FLAGS_PCIE_SBDF
;
463 rc
= apei_exec_run(&ctx
, ACPI_EINJ_SET_ERROR_TYPE
);
467 struct einj_parameter
*v4param
= einj_param
;
468 v4param
->param1
= param1
;
469 v4param
->param2
= param2
;
472 rc
= apei_exec_run(&ctx
, ACPI_EINJ_EXECUTE_OPERATION
);
476 rc
= apei_exec_run(&ctx
, ACPI_EINJ_CHECK_BUSY_STATUS
);
479 val
= apei_exec_ctx_get_output(&ctx
);
480 if (!(val
& EINJ_OP_BUSY
))
482 if (einj_timedout(&timeout
))
485 rc
= apei_exec_run(&ctx
, ACPI_EINJ_GET_COMMAND_STATUS
);
488 val
= apei_exec_ctx_get_output(&ctx
);
489 if (val
!= EINJ_STATUS_SUCCESS
)
492 rc
= apei_exec_run(&ctx
, ACPI_EINJ_GET_TRIGGER_TABLE
);
495 trigger_paddr
= apei_exec_ctx_get_output(&ctx
);
496 if (notrigger
== 0) {
497 rc
= __einj_error_trigger(trigger_paddr
, type
, param1
, param2
);
501 rc
= apei_exec_run_optional(&ctx
, ACPI_EINJ_END_OPERATION
);
506 /* Inject the specified hardware error */
507 static int einj_error_inject(u32 type
, u32 flags
, u64 param1
, u64 param2
,
508 u64 param3
, u64 param4
)
513 /* If user manually set "flags", make sure it is legal */
514 if (flags
&& (flags
&
515 ~(SETWA_FLAGS_APICID
|SETWA_FLAGS_MEM
|SETWA_FLAGS_PCIE_SBDF
)))
519 * We need extra sanity checks for memory errors.
520 * Other types leap directly to injection.
523 /* ensure param1/param2 existed */
524 if (!(param_extension
|| acpi5
))
527 /* ensure injection is memory related */
528 if (type
& ACPI5_VENDOR_BIT
) {
529 if (vendor_flags
!= SETWA_FLAGS_MEM
)
531 } else if (!(type
& MEM_ERROR_MASK
) && !(flags
& SETWA_FLAGS_MEM
))
535 * Disallow crazy address masks that give BIOS leeway to pick
536 * injection address almost anywhere. Insist on page or
537 * better granularity and that target address is normal RAM or
540 base_addr
= param1
& param2
;
543 if (((param2
& PAGE_MASK
) != PAGE_MASK
) ||
544 ((region_intersects(base_addr
, size
, IORESOURCE_SYSTEM_RAM
, IORES_DESC_NONE
)
545 != REGION_INTERSECTS
) &&
546 (region_intersects(base_addr
, size
, IORESOURCE_MEM
, IORES_DESC_PERSISTENT_MEMORY
)
547 != REGION_INTERSECTS
)))
551 mutex_lock(&einj_mutex
);
552 rc
= __einj_error_inject(type
, flags
, param1
, param2
, param3
, param4
);
553 mutex_unlock(&einj_mutex
);
558 static u32 error_type
;
559 static u32 error_flags
;
560 static u64 error_param1
;
561 static u64 error_param2
;
562 static u64 error_param3
;
563 static u64 error_param4
;
564 static struct dentry
*einj_debug_dir
;
566 static int available_error_type_show(struct seq_file
*m
, void *v
)
569 u32 available_error_type
= 0;
571 rc
= einj_get_available_error_type(&available_error_type
);
574 if (available_error_type
& 0x0001)
575 seq_printf(m
, "0x00000001\tProcessor Correctable\n");
576 if (available_error_type
& 0x0002)
577 seq_printf(m
, "0x00000002\tProcessor Uncorrectable non-fatal\n");
578 if (available_error_type
& 0x0004)
579 seq_printf(m
, "0x00000004\tProcessor Uncorrectable fatal\n");
580 if (available_error_type
& 0x0008)
581 seq_printf(m
, "0x00000008\tMemory Correctable\n");
582 if (available_error_type
& 0x0010)
583 seq_printf(m
, "0x00000010\tMemory Uncorrectable non-fatal\n");
584 if (available_error_type
& 0x0020)
585 seq_printf(m
, "0x00000020\tMemory Uncorrectable fatal\n");
586 if (available_error_type
& 0x0040)
587 seq_printf(m
, "0x00000040\tPCI Express Correctable\n");
588 if (available_error_type
& 0x0080)
589 seq_printf(m
, "0x00000080\tPCI Express Uncorrectable non-fatal\n");
590 if (available_error_type
& 0x0100)
591 seq_printf(m
, "0x00000100\tPCI Express Uncorrectable fatal\n");
592 if (available_error_type
& 0x0200)
593 seq_printf(m
, "0x00000200\tPlatform Correctable\n");
594 if (available_error_type
& 0x0400)
595 seq_printf(m
, "0x00000400\tPlatform Uncorrectable non-fatal\n");
596 if (available_error_type
& 0x0800)
597 seq_printf(m
, "0x00000800\tPlatform Uncorrectable fatal\n");
602 DEFINE_SHOW_ATTRIBUTE(available_error_type
);
604 static int error_type_get(void *data
, u64
*val
)
611 static int error_type_set(void *data
, u64 val
)
614 u32 available_error_type
= 0;
618 * Vendor defined types have 0x80000000 bit set, and
619 * are not enumerated by ACPI_EINJ_GET_ERROR_TYPE
621 vendor
= val
& ACPI5_VENDOR_BIT
;
622 tval
= val
& 0x7fffffff;
624 /* Only one error type can be specified */
625 if (tval
& (tval
- 1))
628 rc
= einj_get_available_error_type(&available_error_type
);
631 if (!(val
& available_error_type
))
639 DEFINE_DEBUGFS_ATTRIBUTE(error_type_fops
, error_type_get
, error_type_set
,
642 static int error_inject_set(void *data
, u64 val
)
647 return einj_error_inject(error_type
, error_flags
, error_param1
, error_param2
,
648 error_param3
, error_param4
);
651 DEFINE_DEBUGFS_ATTRIBUTE(error_inject_fops
, NULL
, error_inject_set
, "%llu\n");
653 static int einj_check_table(struct acpi_table_einj
*einj_tab
)
655 if ((einj_tab
->header_length
!=
656 (sizeof(struct acpi_table_einj
) - sizeof(einj_tab
->header
)))
657 && (einj_tab
->header_length
!= sizeof(struct acpi_table_einj
)))
659 if (einj_tab
->header
.length
< sizeof(struct acpi_table_einj
))
661 if (einj_tab
->entries
!=
662 (einj_tab
->header
.length
- sizeof(struct acpi_table_einj
)) /
663 sizeof(struct acpi_einj_entry
))
669 static int __init
einj_init(void)
673 struct apei_exec_context ctx
;
676 pr_warn("ACPI disabled.\n");
680 status
= acpi_get_table(ACPI_SIG_EINJ
, 0,
681 (struct acpi_table_header
**)&einj_tab
);
682 if (status
== AE_NOT_FOUND
) {
683 pr_warn("EINJ table not found.\n");
686 else if (ACPI_FAILURE(status
)) {
687 pr_err("Failed to get EINJ table: %s\n",
688 acpi_format_exception(status
));
692 rc
= einj_check_table(einj_tab
);
694 pr_warn(FW_BUG
"Invalid EINJ table.\n");
699 einj_debug_dir
= debugfs_create_dir("einj", apei_get_debugfs_dir());
701 debugfs_create_file("available_error_type", S_IRUSR
, einj_debug_dir
,
702 NULL
, &available_error_type_fops
);
703 debugfs_create_file_unsafe("error_type", 0600, einj_debug_dir
,
704 NULL
, &error_type_fops
);
705 debugfs_create_file_unsafe("error_inject", 0200, einj_debug_dir
,
706 NULL
, &error_inject_fops
);
708 apei_resources_init(&einj_resources
);
709 einj_exec_ctx_init(&ctx
);
710 rc
= apei_exec_collect_resources(&ctx
, &einj_resources
);
712 pr_err("Error collecting EINJ resources.\n");
716 rc
= apei_resources_request(&einj_resources
, "APEI EINJ");
718 pr_err("Error requesting memory/port resources.\n");
722 rc
= apei_exec_pre_map_gars(&ctx
);
724 pr_err("Error pre-mapping GARs.\n");
729 einj_param
= einj_get_parameter_address();
730 if ((param_extension
|| acpi5
) && einj_param
) {
731 debugfs_create_x32("flags", S_IRUSR
| S_IWUSR
, einj_debug_dir
,
733 debugfs_create_x64("param1", S_IRUSR
| S_IWUSR
, einj_debug_dir
,
735 debugfs_create_x64("param2", S_IRUSR
| S_IWUSR
, einj_debug_dir
,
737 debugfs_create_x64("param3", S_IRUSR
| S_IWUSR
, einj_debug_dir
,
739 debugfs_create_x64("param4", S_IRUSR
| S_IWUSR
, einj_debug_dir
,
741 debugfs_create_x32("notrigger", S_IRUSR
| S_IWUSR
,
742 einj_debug_dir
, ¬rigger
);
746 vendor_blob
.data
= vendor_dev
;
747 vendor_blob
.size
= strlen(vendor_dev
);
748 debugfs_create_blob("vendor", S_IRUSR
, einj_debug_dir
,
750 debugfs_create_x32("vendor_flags", S_IRUSR
| S_IWUSR
,
751 einj_debug_dir
, &vendor_flags
);
754 pr_info("Error INJection is initialized.\n");
759 apei_resources_release(&einj_resources
);
761 apei_resources_fini(&einj_resources
);
762 debugfs_remove_recursive(einj_debug_dir
);
764 acpi_put_table((struct acpi_table_header
*)einj_tab
);
769 static void __exit
einj_exit(void)
771 struct apei_exec_context ctx
;
774 acpi_size size
= (acpi5
) ?
775 sizeof(struct set_error_type_with_address
) :
776 sizeof(struct einj_parameter
);
778 acpi_os_unmap_iomem(einj_param
, size
);
780 einj_exec_ctx_init(&ctx
);
781 apei_exec_post_unmap_gars(&ctx
);
782 apei_resources_release(&einj_resources
);
783 apei_resources_fini(&einj_resources
);
784 debugfs_remove_recursive(einj_debug_dir
);
785 acpi_put_table((struct acpi_table_header
*)einj_tab
);
788 module_init(einj_init
);
789 module_exit(einj_exit
);
791 MODULE_AUTHOR("Huang Ying");
792 MODULE_DESCRIPTION("APEI Error INJection support");
793 MODULE_LICENSE("GPL");