@@ -33,6 +33,22 @@ u8 __read_mostly acpi_disable_value;
u32 __read_mostly x86_acpiid_to_apicid[MAX_MADT_ENTRIES] =
{[0 ... MAX_MADT_ENTRIES - 1] = BAD_APICID };
+void __iomem *
+arch_acpi_os_map_memory(acpi_physical_address phys, acpi_size size)
+{
+ if (system_state >= SYS_STATE_active) {
+ mfn_t mfn = _mfn(PFN_DOWN(phys));
+ unsigned int offs = phys & (PAGE_SIZE - 1);
+
+ /* The low first Mb is always mapped. */
+ if ( !((phys + size - 1) >> 20) )
+ return __va(phys);
+ return __vmap(&mfn, PFN_UP(offs + size), 1, 1,
+ PAGE_HYPERVISOR_NOCACHE) + offs;
+ }
+ return __acpi_map_table(phys, size);
+}
+
/*
* Important Safety Note: The fixed ACPI page numbers are *subtracted*
* from the fixed base. That's why we start at FIX_ACPI_END and
@@ -88,17 +88,7 @@ acpi_physical_address __init acpi_os_get_root_pointer(void)
void __iomem *
acpi_os_map_memory(acpi_physical_address phys, acpi_size size)
{
- if (system_state >= SYS_STATE_active) {
- mfn_t mfn = _mfn(PFN_DOWN(phys));
- unsigned int offs = phys & (PAGE_SIZE - 1);
-
- /* The low first Mb is always mapped. */
- if ( !((phys + size - 1) >> 20) )
- return __va(phys);
- return __vmap(&mfn, PFN_UP(offs + size), 1, 1,
- PAGE_HYPERVISOR_NOCACHE) + offs;
- }
- return __acpi_map_table(phys, size);
+ return arch_acpi_os_map_memory(phys, size);
}
void acpi_os_unmap_memory(void __iomem * virt, acpi_size size)
@@ -54,6 +54,8 @@ typedef int (*acpi_table_handler) (struct acpi_table_header *table);
typedef int (*acpi_table_entry_handler) (struct acpi_subtable_header *header, const unsigned long end);
+void __iomem *
+arch_acpi_os_map_memory(acpi_physical_address phys, acpi_size size);
unsigned int acpi_get_processor_id (unsigned int cpu);
char * __acpi_map_table (paddr_t phys_addr, unsigned long size);
int acpi_boot_init (void);