]> rtime.felk.cvut.cz Git - jailhouse.git/blob - Documentation/memory-layout.txt
Documentation: Move BananaPi-related docs out
[jailhouse.git] / Documentation / memory-layout.txt
1 Memory Layout of the Jailhouse Hypervisor
2 =========================================
3
4 While the hypervisor is running, two memory regions are visible in its address
5 space: the hypervisor region and the remapping region. Jailhouse cells are not
6 mapped into the hypervisor's address space, with the exception of explicitly
7 shared pages and pages that are temporarily mapped, e.g. during MMIO instruction
8 parsing.
9
10
11 Hypervisor region
12 -----------------
13
14 The hypervisor region contains both code and data of the hypervisor. It
15 consists of contiguous physical RAM, mapped at a fixed virtual address, both
16 in the hypervisor and the Linux address space. This identical mapping is
17 required during startup and shutdown of the hypervisor.
18
19 Virtual address: JAILHOUSE_BASE
20 Size: as defined in the system configuration (see hypervisor_memory.size) [1]
21
22         +--------------------------------------+ - lower address
23         | Header [2]                           |
24         +--------------------------------------+
25         | Text Segment                         |
26         |                                      |
27         |                                      |
28         +--------------------------------------+
29         | Read-only Data Segment               |
30         |                                      |
31         +--------------------------------------+
32         | Data Segment                         |
33         |                                      |
34         +--------------------------------------+
35         | BSS Segment                          |
36         |                                      |
37         +--------------------------------------+
38         | Page +-----------------------------+ |
39         | Pool | Per-CPU Data                | |
40         |      |                             | |
41         |      |                             | |
42         |      +-----------------------------+ |
43         |      | System Config               | |
44         |      |                             | |
45         |      +-----------------------------+ |
46         |      | Page Pool Allocation Bitmap | |
47         |      +-----------------------------+ |
48         |      | Dynamic Page Pool           | |
49         :      :                             : :
50         :      :                             : :
51         |      |                             | |
52         |      +-----------------------------+ |
53         +--------------------------------------+ - higher address
54
55
56 Remapping region
57 ----------------
58
59 The remapping region is a range of reserved virtual memory in the hypervisor
60 address space. It is used to map MMIO, platform configuration memory (ACPI on
61 x86) and, temporarily, selected guest pages for hypervisor access.
62
63 Virtual address: REMAP_BASE
64 Size: PAGE_SIZE * NUM_REMAP_BITMAP_PAGES * PAGE_SIZE * 8
65
66         +--------------------------------------+ - lower address
67         | Per-CPU Temporary Mapping Region     |
68         |                                      |
69         +--------------------------------------+
70         | Dynamic Remapping Page pool          |
71         :                                      :
72         :                                      :
73         |                                      |
74         +--------------------------------------+ - higher address
75
76
77 References
78 ----------
79
80 [1] Documentation/configuration-format.txt
81 [2] Documentation/bootstrap-interface.txt