coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
memlayout.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
/* This file contains macro definitions for memlayout.ld linker scripts. */
4
5
#ifndef __ARCH_MEMLAYOUT_H
6
#define __ARCH_MEMLAYOUT_H
7
8
#define SUPERPAGE_SIZE ((1 + CONFIG(ARM_LPAE)) * 1M)
9
10
#define TTB(addr, size) \
11
REGION(ttb, addr, size, 16K) \
12
_ = ASSERT(size >= 16K + CONFIG(ARM_LPAE) * 32, \
13
"TTB must be 16K (+ 32 for LPAE)!"
);
14
15
#define TTB_SUBTABLES(addr, size) \
16
REGION(ttb_subtables, addr, size, CONFIG(ARM_LPAE)*3K + 1K) \
17
_ = ASSERT(size % (1K + 3K * CONFIG(ARM_LPAE)) == 0, \
18
"TTB subtable region must be evenly divisible by table size!"
);
19
20
/* ARM stacks need 8-byte alignment and stay in one place through ramstage. */
21
#define STACK(addr, size) \
22
REGION(stack, addr, size, 8) \
23
_ = ASSERT(size >= 2K, "stack should be >= 2K, see toolchain.inc"
);
24
25
#define DMA_COHERENT(addr, size) \
26
REGION(dma_coherent, addr, size, SUPERPAGE_SIZE) \
27
_ = ASSERT(size % SUPERPAGE_SIZE == 0, \
28
"DMA coherency buffer must fit exactly in full superpages!"
);
29
30
#define FRAMEBUFFER(addr, size) \
31
REGION(framebuffer, addr, size, SUPERPAGE_SIZE) \
32
_ = ASSERT(size % SUPERPAGE_SIZE == 0, \
33
"Framebuffer must fit exactly in full superpages!"
);
34
35
#endif
/* __ARCH_MEMLAYOUT_H */
src
arch
arm
include
arch
memlayout.h
Generated by
1.9.1