MonkOS
v0.1
A simple 64-bit operating system (x86_64)
kmem.h
Go to the documentation of this file.
1
//============================================================================
2
/// @file kmem.h
3
/// @brief Kernel physical (and virtual) memory map.
4
//
5
// Copyright 2016 Brett Vickers.
6
// Use of this source code is governed by a BSD-style license that can
7
// be found in the MonkOS LICENSE file.
8
//============================================================================
9
10
#include <
kernel/mem/paging.h
>
11
12
// Kernel physical (and virtual) memory layout
13
#define KMEM_IDT 0x00001000
14
#define KMEM_ISR_TABLE 0x00002000
15
#define KMEM_ISR_THUNKS 0x00002800
16
#define KMEM_GDT 0x00003000
17
#define KMEM_TSS 0x00003100
18
#define KMEM_GLOBALS 0x00003200
19
#define KMEM_BOOT_PAGETABLE 0x00010000
20
#define KMEM_BOOT_PAGETABLE_LOADED 0x00014000
21
#define KMEM_BOOT_PAGETABLE_END 0x00020000
22
#define KMEM_KERNEL_PAGETABLE 0x00020000
23
#define KMEM_KERNEL_PAGETABLE_END 0x00070000
24
#define KMEM_TABLE_BIOS 0x00070000
25
#define KMEM_STACK_NMI_BOTTOM 0x0008a000
26
#define KMEM_STACK_NMI_TOP 0x0008c000
27
#define KMEM_STACK_DF_BOTTOM 0x0008c000
28
#define KMEM_STACK_DF_TOP 0x0008e000
29
#define KMEM_STACK_MC_BOTTOM 0x0008e000
30
#define KMEM_STACK_MC_TOP 0x00090000
31
#define KMEM_EXTENDED_BIOS 0x0009f800
32
#define KMEM_VIDEO 0x000a0000
33
#define KMEM_SYSTEM_ROM 0x000c0000
34
#define KMEM_STACK_INTERRUPT_BOTTOM 0x00100000
35
#define KMEM_STACK_INTERRUPT_TOP 0x00200000
36
#define KMEM_STACK_KERNEL_BOTTOM 0x00200000
37
#define KMEM_STACK_KERNEL_TOP 0x00300000
38
#define KMEM_KERNEL_IMAGE 0x00300000
39
#define KMEM_KERNEL_ENTRYPOINT 0x00301000
40
#define KMEM_KERNEL_IMAGE_END 0x00a00000
41
42
#define KMEM_EXTENDED_BIOS_SIZE 0x00000800
43
#define KMEM_VIDEO_SIZE 0x00020000
44
#define KMEM_SYSTEM_ROM_SIZE 0x00040000
45
#define KMEM_KERNEL_PAGETABLE_SIZE 0x00050000
46
47
//----------------------------------------------------------------------------
48
// @function kmem_init
49
/// @brief Using the contents of the physical memory map, identity
50
/// map all physical memory into the kernel's page table.
51
/// @param[inout] pt The pagetable structure to hold a description of the
52
/// kernel's page table.
53
//----------------------------------------------------------------------------
54
void
55
kmem_init
(
pagetable_t
*
pt
);
heap::pt
pagetable_t * pt
Definition:
heap.c:34
pagetable_t
A pagetable structure.
Definition:
paging.h:66
paging.h
Paged memory management.
kmem_init
void kmem_init(pagetable_t *pt)
Using the contents of the physical memory map, identity map all physical memory into the kernel's pag...
Definition:
kmem.c:189
include
kernel
mem
kmem.h
Generated by
1.8.11