fixmap.h (b97547761b02cc95e0e6be827dc9ca9da8142761) fixmap.h (414c109bdf496195269bc03d40841fe67fc2f839)
1/*
2 * fixmap.h: compile-time virtual memory allocation
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 1998 Ingo Molnar
9 * Copyright (C) 2013 Mark Salter <msalter@redhat.com>
10 *
11 * Adapted from arch/x86 version.
12 *
13 */
14
15#ifndef _ASM_ARM64_FIXMAP_H
16#define _ASM_ARM64_FIXMAP_H
17
18#ifndef __ASSEMBLY__
19#include <linux/kernel.h>
1/*
2 * fixmap.h: compile-time virtual memory allocation
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 1998 Ingo Molnar
9 * Copyright (C) 2013 Mark Salter <msalter@redhat.com>
10 *
11 * Adapted from arch/x86 version.
12 *
13 */
14
15#ifndef _ASM_ARM64_FIXMAP_H
16#define _ASM_ARM64_FIXMAP_H
17
18#ifndef __ASSEMBLY__
19#include <linux/kernel.h>
20#include <linux/math.h>
20#include <linux/sizes.h>
21#include <asm/boot.h>
22#include <asm/page.h>
23#include <asm/pgtable-prot.h>
24
25/*
26 * Here we define all the compile-time 'special' virtual
27 * addresses. The point is to have a constant address at
28 * compile time, but to set the physical address only
29 * in the boot process.
30 *
31 * Each enum increment in these 'compile-time allocated'
32 * memory buffers is page-sized. Use set_fixmap(idx,phys)
33 * to associate physical memory with a fixmap index.
34 */
35enum fixed_addresses {
36 FIX_HOLE,
37
38 /*
21#include <linux/sizes.h>
22#include <asm/boot.h>
23#include <asm/page.h>
24#include <asm/pgtable-prot.h>
25
26/*
27 * Here we define all the compile-time 'special' virtual
28 * addresses. The point is to have a constant address at
29 * compile time, but to set the physical address only
30 * in the boot process.
31 *
32 * Each enum increment in these 'compile-time allocated'
33 * memory buffers is page-sized. Use set_fixmap(idx,phys)
34 * to associate physical memory with a fixmap index.
35 */
36enum fixed_addresses {
37 FIX_HOLE,
38
39 /*
39 * Reserve a virtual window for the FDT that is 2 MB larger than the
40 * maximum supported size, and put it at the top of the fixmap region.
41 * The additional space ensures that any FDT that does not exceed
42 * MAX_FDT_SIZE can be mapped regardless of whether it crosses any
43 * 2 MB alignment boundaries.
44 *
45 * Keep this at the top so it remains 2 MB aligned.
40 * Reserve a virtual window for the FDT that is a page bigger than the
41 * maximum supported size. The additional space ensures that any FDT
42 * that does not exceed MAX_FDT_SIZE can be mapped regardless of
43 * whether it crosses any page boundary.
46 */
44 */
47#define FIX_FDT_SIZE (MAX_FDT_SIZE + SZ_2M)
48 FIX_FDT_END,
45 FIX_FDT_END,
49 FIX_FDT = FIX_FDT_END + FIX_FDT_SIZE / PAGE_SIZE - 1,
46 FIX_FDT = FIX_FDT_END + DIV_ROUND_UP(MAX_FDT_SIZE, PAGE_SIZE) + 1,
50
51 FIX_EARLYCON_MEM_BASE,
52 FIX_TEXT_POKE0,
53
54#ifdef CONFIG_ACPI_APEI_GHES
55 /* Used for GHES mapping from assorted contexts */
56 FIX_APEI_GHES_IRQ,
57 FIX_APEI_GHES_SEA,

--- 61 unchanged lines hidden ---
47
48 FIX_EARLYCON_MEM_BASE,
49 FIX_TEXT_POKE0,
50
51#ifdef CONFIG_ACPI_APEI_GHES
52 /* Used for GHES mapping from assorted contexts */
53 FIX_APEI_GHES_IRQ,
54 FIX_APEI_GHES_SEA,

--- 61 unchanged lines hidden ---