1 #ifndef _ASM_IA64_CRASH_H
2 #define _ASM_IA64_CRASH_H
5 * linux/include/asm-ia64/crash.h
7 * Copyright (c) 2004 Red Hat, Inc. All rights reserved.
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2, or (at your option)
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 #include <linux/efi.h>
29 #include <asm/mmzone.h>
32 map_virtual(u64 offset, struct page **pp)
38 if (REGION_NUMBER(offset) == 5) {
41 if (__get_user(byte, (char *)offset) == 0)
42 return (void *)offset;
47 switch (type = efi_mem_type(offset))
51 case EFI_BOOT_SERVICES_CODE:
52 case EFI_BOOT_SERVICES_DATA:
53 case EFI_CONVENTIONAL_MEMORY:
58 "crash memory driver: invalid memory type for %lx: %d\n",
63 pfn = offset >> PAGE_SHIFT;
65 if (!pfn_valid(pfn)) {
67 "crash memory driver: invalid pfn: %lx )\n", pfn);
71 page = pfn_to_page(pfn);
75 "crash memory driver: offset: %lx page: %lx page->virtual: NULL\n",
76 offset, (unsigned long)page);
80 return (page->virtual + (offset & (PAGE_SIZE-1)));
83 static inline void unmap_virtual(struct page *page)
88 #endif /* __KERNEL__ */
90 #endif /* _ASM_IA64_CRASH_H */