Skip to content

Commit 80a4da0

Browse files
maciej-w-rozyckiKAGA-KOKO
authored andcommitted
x86/EISA: Use memremap() to probe for the EISA BIOS signature
The area at the 0x0FFFD9 physical location in the PC memory space is regular memory, traditionally ROM BIOS and more recently a copy of BIOS code and data in RAM, write-protected. Therefore use memremap() to get access to it rather than ioremap(), avoiding issues in virtualization scenarios and complementing changes such as commit f7750a7 ("x86, mpparse, x86/acpi, x86/PCI, x86/dmi, SFI: Use memremap() for RAM mappings") or commit 5997efb ("x86/boot: Use memremap() to map the MPF and MPC data"). Reported-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/alpine.DEB.2.21.2408242025210.30766@angie.orcam.me.uk Closes: https://lore.kernel.org/r/20240822095122.736522-1-kirill.shutemov@linux.intel.com
1 parent 741fc1d commit 80a4da0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

arch/x86/kernel/eisa.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111

1212
static __init int eisa_bus_probe(void)
1313
{
14-
void __iomem *p;
14+
void *p;
1515

1616
if ((xen_pv_domain() && !xen_initial_domain()) || cc_platform_has(CC_ATTR_GUEST_SEV_SNP))
1717
return 0;
1818

19-
p = ioremap(0x0FFFD9, 4);
19+
p = memremap(0x0FFFD9, 4, MEMREMAP_WB);
2020
if (p && readl(p) == 'E' + ('I' << 8) + ('S' << 16) + ('A' << 24))
2121
EISA_bus = 1;
22-
iounmap(p);
22+
memunmap(p);
2323
return 0;
2424
}
2525
subsys_initcall(eisa_bus_probe);

0 commit comments

Comments
 (0)