blob: 95de8a078204861f70a36b52b7442d1f4e563449 [file] [log] [blame]
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 ****************************************************************************
11 ****************************************************************************/
12#ifndef _ASM_FIXMAP_H
13#define _ASM_FIXMAP_H
Ben Cheng4b29af02012-03-07 16:14:53 -080014
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080015#define FIXADDR_USER_START __fix_to_virt(FIX_VDSO)
16#define FIXADDR_USER_END __fix_to_virt(FIX_VDSO - 1)
Ben Cheng4b29af02012-03-07 16:14:53 -080017
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080018#ifndef __ASSEMBLY__
19#include <linux/kernel.h>
20#include <asm/acpi.h>
21#include <asm/apicdef.h>
22#include <asm/page.h>
Ben Cheng4b29af02012-03-07 16:14:53 -080023
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080024enum fixed_addresses {
25 FIX_HOLE,
26 FIX_VDSO,
27 FIX_DBGP_BASE,
28 FIX_EARLYCON_MEM_BASE,
29 __end_of_permanent_fixed_addresses,
Ben Cheng4b29af02012-03-07 16:14:53 -080030
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080031#define NR_FIX_BTMAPS 16
32 FIX_BTMAP_END = __end_of_permanent_fixed_addresses,
33 FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS - 1,
34 FIX_WP_TEST,
35 __end_of_fixed_addresses
36};
Ben Cheng4b29af02012-03-07 16:14:53 -080037
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080038#define set_fixmap(idx, phys) __set_fixmap(idx, phys, PAGE_KERNEL)
Ben Cheng4b29af02012-03-07 16:14:53 -080039
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080040#define set_fixmap_nocache(idx, phys) __set_fixmap(idx, phys, PAGE_KERNEL_NOCACHE)
Ben Cheng4b29af02012-03-07 16:14:53 -080041
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080042#define clear_fixmap(idx) __set_fixmap(idx, 0, __pgprot(0))
Ben Cheng4b29af02012-03-07 16:14:53 -080043
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080044#define FIXADDR_TOP ((unsigned long)__FIXADDR_TOP)
Ben Cheng4b29af02012-03-07 16:14:53 -080045
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080046#define __FIXADDR_SIZE (__end_of_permanent_fixed_addresses << PAGE_SHIFT)
47#define __FIXADDR_BOOT_SIZE (__end_of_fixed_addresses << PAGE_SHIFT)
48#define FIXADDR_START (FIXADDR_TOP - __FIXADDR_SIZE)
49#define FIXADDR_BOOT_START (FIXADDR_TOP - __FIXADDR_BOOT_SIZE)
Ben Cheng4b29af02012-03-07 16:14:53 -080050
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080051#define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT))
52#define __virt_to_fix(x) ((FIXADDR_TOP - ((x)&PAGE_MASK)) >> PAGE_SHIFT)
Ben Cheng4b29af02012-03-07 16:14:53 -080053
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080054#endif
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080055#endif