Skip to content

Commit b13a3e5

Browse files
djbwrafaeljw
authored andcommitted
ACPI: APEI: Fix _EINJ vs EFI_MEMORY_SP
When a platform marks a memory range as "special purpose" it is not onlined as System RAM by default. However, it is still suitable for error injection. Add IORES_DESC_SOFT_RESERVED to einj_error_inject() as a permissible memory type in the sanity checking of the arguments to _EINJ. Fixes: 262b45a ("x86/efi: EFI soft reservation to E820 enumeration") Reviewed-by: Tony Luck <[email protected]> Reported-by: Omar Avelar <[email protected]> Signed-off-by: Dan Williams <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent c3481b6 commit b13a3e5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/acpi/apei/einj.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,8 @@ static int einj_error_inject(u32 type, u32 flags, u64 param1, u64 param2,
546546
!= REGION_INTERSECTS) &&
547547
(region_intersects(base_addr, size, IORESOURCE_MEM, IORES_DESC_PERSISTENT_MEMORY)
548548
!= REGION_INTERSECTS) &&
549+
(region_intersects(base_addr, size, IORESOURCE_MEM, IORES_DESC_SOFT_RESERVED)
550+
!= REGION_INTERSECTS) &&
549551
!arch_is_platform_page(base_addr)))
550552
return -EINVAL;
551553

0 commit comments

Comments
 (0)