FreeNOS
ARMMap.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Niek Linnenbank
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #include <FreeNOS/System.h>
19 #include <MemoryBlock.h>
20 #include <Memory.h>
21 #include "ARMMap.h"
22 
24 {
26 
27  m_regions[KernelData].virt = RAM_ADDR;
28  m_regions[KernelData].phys = RAM_ADDR;
31 
36 
37  m_regions[UserData].virt = 0x80000000;
39 
40  m_regions[UserHeap].virt = 0xb0000000;
42 
43  m_regions[UserStack].virt = 0xc0000000;
45 
46  m_regions[UserPrivate].virt = 0xa0000000;
48 
49  m_regions[UserShare].virt = 0xd0000000;
51 
52  m_regions[UserArgs].virt = 0xe0000000;
54 }
Memory::Executable
@ Executable
Definition: Memory.h:43
MemoryBlock::set
static void * set(void *dest, int ch, unsigned count)
Fill memory with a constant byte.
Definition: MemoryBlock.cpp:25
MemoryMap::UserStack
@ UserStack
< User stack
Definition: MemoryMap.h:58
Memory::Writable
@ Writable
Definition: Memory.h:42
MemoryMap::UserShare
@ UserShare
< User shared dynamic memory mappings
Definition: MemoryMap.h:60
MemoryBlock.h
MemoryMap::UserData
@ UserData
< User program data from libexec, e.g.
Definition: MemoryMap.h:56
Memory::Readable
@ Readable
Definition: Memory.h:41
MegaByte
#define MegaByte(v)
Convert megabytes to bytes.
Definition: Macros.h:57
ARMMap::ARMMap
ARMMap()
Constructor.
Definition: ARMMap.cpp:23
KiloByte
#define KiloByte(v)
Convert kilobytes to bytes.
Definition: Macros.h:54
Memory::Range::phys
Address phys
Physical address.
Definition: Memory.h:58
ARMMap.h
MemoryMap::UserPrivate
@ UserPrivate
< User private dynamic memory mappings
Definition: MemoryMap.h:59
MemoryMap::KernelPrivate
@ KernelPrivate
< Kernel dynamic memory mappings
Definition: MemoryMap.h:55
Memory.h
Memory::Range::virt
Address virt
Virtual address.
Definition: Memory.h:57
MemoryMap::UserArgs
@ UserArgs
< Used for copying program arguments and file descriptors
Definition: MemoryMap.h:61
GigaByte
#define GigaByte(v)
Convert gigabytes to bytes.
Definition: Macros.h:60
MemoryMap::UserHeap
@ UserHeap
< User heap
Definition: MemoryMap.h:57
Memory::Range::size
Size size
Size in number of bytes.
Definition: Memory.h:59
Memory::Range::access
Access access
Page access flags.
Definition: Memory.h:60
MemoryMap::KernelData
@ KernelData
< Kernel program data from libexec, e.g.
Definition: MemoryMap.h:54
MemoryMap::m_regions
Memory::Range m_regions[MEMORYMAP_MAX_REGIONS]
Memory ranges.
Definition: MemoryMap.h:95