mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 17:02:17 +00:00
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 commitf7750a7956("x86, mpparse, x86/acpi, x86/PCI, x86/dmi, SFI: Use memremap() for RAM mappings") or commit5997efb967("x86/boot: Use memremap() to map the MPF and MPC data"). Reported-by: Kirill A. Shutemov <[email protected]> Signed-off-by: Maciej W. Rozycki <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/all/[email protected] Closes: https://lore.kernel.org/r/[email protected]
This commit is contained in:
committed by
Thomas Gleixner
parent
741fc1d788
commit
80a4da0564
@@ -11,15 +11,15 @@
|
||||
|
||||
static __init int eisa_bus_probe(void)
|
||||
{
|
||||
void __iomem *p;
|
||||
void *p;
|
||||
|
||||
if ((xen_pv_domain() && !xen_initial_domain()) || cc_platform_has(CC_ATTR_GUEST_SEV_SNP))
|
||||
return 0;
|
||||
|
||||
p = ioremap(0x0FFFD9, 4);
|
||||
p = memremap(0x0FFFD9, 4, MEMREMAP_WB);
|
||||
if (p && readl(p) == 'E' + ('I' << 8) + ('S' << 16) + ('A' << 24))
|
||||
EISA_bus = 1;
|
||||
iounmap(p);
|
||||
memunmap(p);
|
||||
return 0;
|
||||
}
|
||||
subsys_initcall(eisa_bus_probe);
|
||||
|
||||
Reference in New Issue
Block a user