FreeNOS
IntelMap.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 <MemoryBlock.h>
19 #include "IntelMap.h"
20 
22 {
24 
27 
30 
31  m_regions[UserData].virt = 0x80000000;
33 
34  m_regions[UserHeap].virt = 0xb0000000;
36 
37  m_regions[UserStack].virt = 0xc0000000;
39 
40  m_regions[UserPrivate].virt = 0xa0000000;
42 
43  m_regions[UserShare].virt = 0xd0000000;
45 
46  m_regions[UserArgs].virt = 0xe0000000;
48 }
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
IntelMap::IntelMap
IntelMap()
Constructor.
Definition: IntelMap.cpp:21
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
MegaByte
#define MegaByte(v)
Convert megabytes to bytes.
Definition: Macros.h:57
KiloByte
#define KiloByte(v)
Convert kilobytes to bytes.
Definition: Macros.h:54
MemoryMap::UserPrivate
@ UserPrivate
< User private dynamic memory mappings
Definition: MemoryMap.h:59
MemoryMap::KernelPrivate
@ KernelPrivate
< Kernel dynamic memory mappings
Definition: MemoryMap.h:55
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
IntelMap.h
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